Add settings and presets

This commit is contained in:
ThemeBoy
2013-12-28 05:37:41 +11:00
parent 03f0ce2893
commit 51bf14e85d
35 changed files with 1882 additions and 184 deletions

View File

@@ -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',

View File

@@ -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 );
?>

View File

@@ -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',

View File

@@ -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',

View 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' );
?>

View File

@@ -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 );
}

View File

@@ -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',

View File

@@ -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 );
?>