Make is_sportspress dependant on post types
This commit is contained in:
@@ -24,7 +24,7 @@ class SP_Template_Loader {
|
||||
add_filter( 'the_content', array( $this, 'staff_content' ) );
|
||||
}
|
||||
|
||||
public function add_content( $content, $template, $append = false) {
|
||||
public function add_content( $content, $template, $append = false ) {
|
||||
ob_start();
|
||||
call_user_func( 'sp_get_template_part', 'content', 'single-' . $template );
|
||||
if ( $append )
|
||||
|
||||
@@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
* @return bool
|
||||
*/
|
||||
function is_sportspress() {
|
||||
return apply_filters( 'is_sportspress', ( is_singular( array( 'sp_event', 'sp_calendar', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) ) ? true : false );
|
||||
return apply_filters( 'is_sportspress', ( is_singular( sp_post_types() ) ) ? true : false );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user