Add overview page with sitemap

This commit is contained in:
Brian Miyaji
2014-08-11 01:43:06 +10:00
parent ce1590cdf2
commit a193ba1ca3
15 changed files with 1178 additions and 3 deletions

44
includes/sp-conditional-functions.php Normal file → Executable file
View 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
*