Format and add column filters
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8.4
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -53,7 +53,7 @@ class SP_Admin_CPT_Calendar extends SP_Admin_CPT {
|
||||
'sp_events' => __( 'Events', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_calendar_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.7
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -45,8 +45,9 @@ class SP_Admin_CPT_Column extends SP_Admin_CPT {
|
||||
'sp_equation' => __( 'Equation', 'sportspress' ),
|
||||
'sp_precision' => __( 'Rounding', 'sportspress' ),
|
||||
'sp_order' => __( 'Sort Order', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_column_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,6 +69,10 @@ class SP_Admin_CPT_Column extends SP_Admin_CPT {
|
||||
case 'sp_order':
|
||||
echo sp_get_post_order( $post_id );
|
||||
break;
|
||||
case 'sp_description':
|
||||
global $post;
|
||||
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8.4
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -97,7 +97,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_event_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8.4
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -52,7 +52,7 @@ class SP_Admin_CPT_List extends SP_Admin_CPT {
|
||||
'sp_player' => __( 'Players', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_list_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -42,8 +42,9 @@ class SP_Admin_CPT_Metric extends SP_Admin_CPT {
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_metric_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,10 @@ class SP_Admin_CPT_Metric extends SP_Admin_CPT {
|
||||
global $post;
|
||||
echo $post->post_name;
|
||||
break;
|
||||
case 'sp_description':
|
||||
global $post;
|
||||
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.7
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -42,8 +42,9 @@ class SP_Admin_CPT_Outcome extends SP_Admin_CPT {
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_outcome_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,10 @@ class SP_Admin_CPT_Outcome extends SP_Admin_CPT {
|
||||
global $post;
|
||||
echo $post->post_name;
|
||||
break;
|
||||
case 'sp_description':
|
||||
global $post;
|
||||
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -42,8 +42,9 @@ class SP_Admin_CPT_Performance extends SP_Admin_CPT {
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_performance_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,10 @@ class SP_Admin_CPT_Performance extends SP_Admin_CPT {
|
||||
global $post;
|
||||
echo $post->post_name;
|
||||
break;
|
||||
case 'sp_description':
|
||||
global $post;
|
||||
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8.4
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -69,7 +69,7 @@ class SP_Admin_CPT_Player extends SP_Admin_CPT {
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_player_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.7
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -42,8 +42,9 @@ class SP_Admin_CPT_Result extends SP_Admin_CPT {
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_result_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,10 @@ class SP_Admin_CPT_Result extends SP_Admin_CPT {
|
||||
global $post;
|
||||
echo $post->post_name . 'for, ' . $post->post_name . 'against';
|
||||
break;
|
||||
case 'sp_description':
|
||||
global $post;
|
||||
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8.4
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -68,7 +68,7 @@ class SP_Admin_CPT_Staff extends SP_Admin_CPT {
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_staff_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -44,8 +44,9 @@ class SP_Admin_CPT_Statistic extends SP_Admin_CPT {
|
||||
'sp_key' => __( 'Key', 'sportspress' ),
|
||||
'sp_equation' => __( 'Equation', 'sportspress' ),
|
||||
'sp_precision' => __( 'Rounding', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_statistic_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,10 @@ class SP_Admin_CPT_Statistic extends SP_Admin_CPT {
|
||||
case 'sp_precision':
|
||||
echo sp_get_post_precision( $post_id );
|
||||
break;
|
||||
case 'sp_description':
|
||||
global $post;
|
||||
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8.4
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -51,7 +51,7 @@ class SP_Admin_CPT_Table extends SP_Admin_CPT {
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_table_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post Types
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -67,7 +67,7 @@ class SP_Admin_CPT_Team extends SP_Admin_CPT {
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_views' => __( 'Views', 'sportspress' ),
|
||||
);
|
||||
return $columns;
|
||||
return apply_filters( 'sportspress_team_admin_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user