From adb7324349a2da37fc82fd2a207cffb5252b30a7 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 19 Oct 2014 12:41:52 +1100 Subject: [PATCH] Option to hide rank column in player lists fix #52 --- .../class-sp-meta-box-list-data.php | 25 +++++++++++++------ includes/class-sp-player-list.php | 13 ++++++---- templates/player-list.php | 24 ++++++++++-------- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php index dd4a6929..1a448e12 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php @@ -20,9 +20,9 @@ class SP_Meta_Box_List_Data { */ public static function output( $post ) { $list = new SP_Player_List( $post ); - list( $columns, $data, $placeholders, $merged ) = $list->data( true ); + list( $columns, $data, $placeholders, $merged, $orderby ) = $list->data( true ); $adjustments = $list->adjustments; - self::table( $columns, $data, $placeholders, $adjustments ); + self::table( $columns, $data, $placeholders, $adjustments, $orderby ); } /** @@ -36,7 +36,7 @@ class SP_Meta_Box_List_Data { /** * Admin edit table */ - public static function table( $columns = array(), $data = array(), $placeholders = array(), $adjustments = array() ) { + public static function table( $columns = array(), $data = array(), $placeholders = array(), $adjustments = array(), $orderby = 'number' ) { $show_player_photo = get_option( 'sportspress_list_show_photos', 'no' ) == 'yes' ? true : false; ?>