Add overview page with sitemap
This commit is contained in:
44
includes/sp-conditional-functions.php
Normal file → Executable file
44
includes/sp-conditional-functions.php
Normal file → Executable file
@@ -34,6 +34,38 @@ if ( ! function_exists( 'sp_post_types' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sp_post_type_hierarchy - Returns array of SP primary post types
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
if ( ! function_exists( 'sp_post_type_hierarchy' ) ) {
|
||||
function sp_post_type_hierarchy() {
|
||||
return apply_filters(
|
||||
'sportspress_post_type_hierarchy',
|
||||
array(
|
||||
'sp_event' => array( 'sp_calendar' ),
|
||||
'sp_team' => array( 'sp_table' ),
|
||||
'sp_player' => array( 'sp_list' ),
|
||||
'sp_staff' => array()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sp_secondary_post_types - Returns array of SP secondary post types
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
if ( ! function_exists( 'sp_secondary_post_types' ) ) {
|
||||
function sp_secondary_post_types() {
|
||||
return apply_filters( 'sportspress_secondary_post_types', array( 'sp_calendar', 'sp_table', 'sp_list' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sp_config_types - Returns array of SP config types
|
||||
*
|
||||
@@ -46,6 +78,18 @@ if ( ! function_exists( 'sp_config_types' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sp_taxonomies - Returns array of SP taxonomies
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
if ( ! function_exists( 'sp_taxonomies' ) ) {
|
||||
function sp_taxonomies() {
|
||||
return apply_filters( 'sportspress_terms', array( 'sp_league', 'sp_season', 'sp_venue', 'sp_position' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* is_sp_post_type - Returns true if post is SportsPress post type
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user