Display calendar and list layouts
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post_Types
|
||||
* @version 0.9
|
||||
* @version 1.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -50,6 +50,7 @@ class SP_Admin_CPT_Calendar extends SP_Admin_CPT {
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_team' => __( 'Team', 'sportspress' ),
|
||||
'sp_events' => __( 'Events', 'sportspress' ),
|
||||
'sp_layout' => __( 'Layout', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_calendar_admin_columns', $columns );
|
||||
}
|
||||
@@ -93,6 +94,9 @@ class SP_Admin_CPT_Calendar extends SP_Admin_CPT {
|
||||
$calendar = new SP_Calendar( $post_id );
|
||||
echo sizeof( $calendar->data() );
|
||||
break;
|
||||
case 'sp_layout':
|
||||
echo sp_array_value( SP()->formats->calendar, get_post_meta( $post_id, 'sp_format', true ), '—' );
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Post_Types
|
||||
* @version 0.9
|
||||
* @version 1.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -49,6 +49,7 @@ class SP_Admin_CPT_List extends SP_Admin_CPT {
|
||||
'sp_season' => __( 'Season', 'sportspress' ),
|
||||
'sp_team' => __( 'Team', 'sportspress' ),
|
||||
'sp_player' => __( 'Players', 'sportspress' ),
|
||||
'sp_layout' => __( 'Layout', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_list_admin_columns', $columns );
|
||||
}
|
||||
@@ -81,6 +82,9 @@ class SP_Admin_CPT_List extends SP_Admin_CPT {
|
||||
endforeach;
|
||||
endif;
|
||||
break;
|
||||
case 'sp_layout':
|
||||
echo sp_array_value( SP()->formats->list, get_post_meta( $post_id, 'sp_format', true ), '—' );
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user