Add settings and presets
This commit is contained in:
@@ -8,8 +8,6 @@ function sp_column_cpt_init() {
|
||||
'label' => $name,
|
||||
'labels' => $labels,
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'page-attributes' ),
|
||||
'register_meta_box_cb' => 'sp_column_meta_init',
|
||||
|
||||
@@ -52,7 +52,8 @@ function sp_list_player_meta( $post ) {
|
||||
'show_option_none' => sprintf( __( 'Select %s', 'sportspress' ), __( 'League', 'sportspress' ) ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $league_id
|
||||
'selected' => $league_id,
|
||||
'value' => 'term_id'
|
||||
);
|
||||
sp_dropdown_taxonomies( $args );
|
||||
?>
|
||||
|
||||
@@ -8,8 +8,6 @@ function sp_outcome_cpt_init() {
|
||||
'label' => $name,
|
||||
'labels' => $labels,
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'page-attributes' ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_event',
|
||||
|
||||
@@ -8,8 +8,6 @@ function sp_result_cpt_init() {
|
||||
'label' => $name,
|
||||
'labels' => $labels,
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'page-attributes' ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_event',
|
||||
|
||||
11
admin/post-types/separator.php
Normal file
11
admin/post-types/separator.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
function sp_separator_cpt_init() {
|
||||
$args = array(
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
);
|
||||
register_post_type( 'sp_separator', $args );
|
||||
}
|
||||
add_action( 'init', 'sp_separator_cpt_init' );
|
||||
?>
|
||||
@@ -12,7 +12,7 @@ function sp_staff_cpt_init() {
|
||||
'supports' => array( 'title', 'author', 'thumbnail' ),
|
||||
'register_meta_box_cb' => 'sp_staff_meta_init',
|
||||
'rewrite' => array( 'slug' => get_option( 'sp_staff_slug', 'staff' ) ),
|
||||
'capability_type' => array( 'sp_staff', 'sp_staff' )
|
||||
'capability_type' => 'sp_staff'
|
||||
);
|
||||
register_post_type( 'sp_staff', $args );
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ function sp_statistic_cpt_init() {
|
||||
'label' => $name,
|
||||
'labels' => $labels,
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'page-attributes' ),
|
||||
'register_meta_box_cb' => 'sp_statistic_meta_init',
|
||||
|
||||
@@ -13,7 +13,7 @@ function sp_table_cpt_init() {
|
||||
'register_meta_box_cb' => 'sp_table_meta_init',
|
||||
'rewrite' => array( 'slug' => 'table' ),
|
||||
'show_in_menu' => 'edit.php?post_type=sp_team',
|
||||
'capability_type' => 'sp_table'
|
||||
// 'capability_type' => 'sp_table'
|
||||
);
|
||||
register_post_type( 'sp_table', $args );
|
||||
}
|
||||
@@ -50,7 +50,8 @@ function sp_table_team_meta( $post, $test ) {
|
||||
'show_option_none' => sprintf( __( 'Select %s', 'sportspress' ), __( 'League', 'sportspress' ) ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $league_id
|
||||
'selected' => $league_id,
|
||||
'value' => 'term_id'
|
||||
);
|
||||
sp_dropdown_taxonomies( $args );
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user