Add importable post types function
This commit is contained in:
@@ -102,7 +102,7 @@ class SP_Admin {
|
||||
*/
|
||||
public function action_links() {
|
||||
global $pagenow, $typenow;
|
||||
if ( in_array( $typenow, sp_primary_post_types() ) ) {
|
||||
if ( in_array( $typenow, sp_importable_post_types() ) ) {
|
||||
if ( 'sp_event' === $typenow ) {
|
||||
if ( 'edit.php' === $pagenow ) {
|
||||
?>
|
||||
|
||||
@@ -58,6 +58,18 @@ if ( ! function_exists( 'sp_secondary_post_types' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sp_importable_post_types - Returns array of SP post types with importers
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
if ( ! function_exists( 'sp_importable_post_types' ) ) {
|
||||
function sp_importable_post_types() {
|
||||
return apply_filters( 'sportspress_importable_post_types', array( 'sp_event', 'sp_team', 'sp_player', 'sp_staff' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sp_config_types - Returns array of SP config types
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user