Widgets added and PHP error fixed for version < 5.2
This commit is contained in:
@@ -45,6 +45,8 @@ function sportspress_list_meta_init( $post ) {
|
||||
if ( $players && $players != array(0) ):
|
||||
add_meta_box( 'sp_statsdiv', __( 'Player List', 'sportspress' ), 'sportspress_list_stats_meta', 'sp_list', 'normal', 'high' );
|
||||
endif;
|
||||
|
||||
add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_list_details_meta', 'sp_list', 'normal', 'high' );
|
||||
}
|
||||
|
||||
function sportspress_list_player_meta( $post ) {
|
||||
@@ -105,3 +107,7 @@ function sportspress_list_stats_meta( $post ) {
|
||||
sportspress_edit_player_list_table( $columns, $data, $placeholders );
|
||||
sportspress_nonce();
|
||||
}
|
||||
|
||||
function sportspress_list_details_meta( $post ) {
|
||||
wp_editor( $post->post_content, 'content' );
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ function sportspress_separator_post_init() {
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'show_in_admin_bar' => false,
|
||||
'capability_type' => 'sp_private'
|
||||
'show_in_admin_bar' => false
|
||||
);
|
||||
register_post_type( 'sp_separator', $args );
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ function sportspress_table_post_init() {
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt' ),
|
||||
'supports' => array( 'title', 'author', 'thumbnail' ),
|
||||
'register_meta_box_cb' => 'sportspress_table_meta_init',
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_table_slug', 'tables' ) ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_team',
|
||||
@@ -44,6 +44,8 @@ function sportspress_table_meta_init( $post ) {
|
||||
if ( $teams && $teams != array(0) ):
|
||||
add_meta_box( 'sp_columnsdiv', __( 'League Table', 'sportspress' ), 'sportspress_table_columns_meta', 'sp_table', 'normal', 'high' );
|
||||
endif;
|
||||
|
||||
add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_table_details_meta', 'sp_table', 'normal', 'high' );
|
||||
}
|
||||
|
||||
function sportspress_table_team_meta( $post, $test ) {
|
||||
@@ -93,3 +95,7 @@ function sportspress_table_columns_meta( $post ) {
|
||||
|
||||
sportspress_nonce();
|
||||
}
|
||||
|
||||
function sportspress_table_details_meta( $post ) {
|
||||
wp_editor( $post->post_content, 'content' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user