Conditional Functions
Migration to module
This commit is contained in:
@@ -36,6 +36,7 @@ class SportsPress_Event_Specs {
|
||||
// Filters
|
||||
add_filter( 'sportspress_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
||||
add_filter( 'sportspress_screen_ids', array( $this, 'screen_ids' ) );
|
||||
add_filter( 'sportspress_config_types', array( $this, 'add_post_type' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,6 +99,11 @@ class SportsPress_Event_Specs {
|
||||
'sp_spec',
|
||||
) );
|
||||
}
|
||||
|
||||
public static function add_post_type( $post_types = array() ) {
|
||||
$post_types[] = 'sp_spec';
|
||||
return $post_types;
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditonally load the class and functions only needed when viewing this post type.
|
||||
|
||||
Reference in New Issue
Block a user