Add and fix filters
This commit is contained in:
@@ -86,7 +86,7 @@ class SP_Admin_Menus {
|
|||||||
global $typenow;
|
global $typenow;
|
||||||
$screen = get_current_screen();
|
$screen = get_current_screen();
|
||||||
if ( $screen->id == 'sp_role' ) {
|
if ( $screen->id == 'sp_role' ) {
|
||||||
$this->highlight_admin_menu( 'edit.php?post_type=sp_staff', 'edit-tags.php?taxonomy=sp_role&post_type=sp_staff' );
|
$this->highlight_admin_menu( 'edit.php?post_type=sp_staff', 'edit-tags.php?taxonomy=sp_role&post_type=sp_staff' );
|
||||||
} elseif ( is_sp_config_type( $typenow ) ) {
|
} elseif ( is_sp_config_type( $typenow ) ) {
|
||||||
$this->highlight_admin_menu( 'sportspress', 'sportspress-config' );
|
$this->highlight_admin_menu( 'sportspress', 'sportspress-config' );
|
||||||
} elseif ( $typenow == 'sp_calendar' ) {
|
} elseif ( $typenow == 'sp_calendar' ) {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
'name' => 'tax_input[sp_season][]',
|
'name' => 'tax_input[sp_season][]',
|
||||||
'selected' => $season_ids,
|
'selected' => $season_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Competitions', 'sportspress' ) ),
|
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ class SP_Post_types {
|
|||||||
foreach ( $object_types as $object_type ):
|
foreach ( $object_types as $object_type ):
|
||||||
register_taxonomy_for_object_type( 'sp_role', $object_type );
|
register_taxonomy_for_object_type( 'sp_role', $object_type );
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
|
do_action( 'sportspress_after_register_taxonomy' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -485,6 +487,8 @@ class SP_Post_types {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
do_action( 'sportspress_after_register_post_type' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete_config_post( $post_id ) {
|
public function delete_config_post( $post_id ) {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if ( ! function_exists( 'sp_config_types' ) ) {
|
|||||||
*/
|
*/
|
||||||
if ( ! function_exists( 'sp_taxonomies' ) ) {
|
if ( ! function_exists( 'sp_taxonomies' ) ) {
|
||||||
function sp_taxonomies() {
|
function sp_taxonomies() {
|
||||||
return apply_filters( 'sportspress_terms', array( 'sp_league', 'sp_season', 'sp_venue', 'sp_position' ) );
|
return apply_filters( 'sportspress_taxonomies', array( 'sp_league', 'sp_season', 'sp_venue', 'sp_position' ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user