array( 'sp_calendar' ), 'sp_team' => array( 'sp_table' ), 'sp_player' => array( 'sp_list' ), 'sp_staff' => array(), ) ); } } /** * is_sp_post_type - Returns true if post is SportsPress post type * * @access public * @return bool */ if ( ! function_exists( 'is_sp_post_type' ) ) { function is_sp_post_type( $typenow = null ) { if ( $typenow == null ) { global $typenow; } $post_types = sp_post_types(); if ( in_array( $typenow, $post_types ) ) { return true; } return false; } } /** * is_sp_config_type - Returns true if post is SportsPress config type * * @access public * @return bool */ if ( ! function_exists( 'is_sp_config_type' ) ) { function is_sp_config_type( $typenow = null ) { if ( $typenow == null ) { global $typenow; } $post_types = sp_config_types(); if ( in_array( $typenow, $post_types ) ) { return true; } return false; } } /** * is_sp_taxonomy - Returns true if post is SportsPress taxonomy * * @access public * @return bool */ if ( ! function_exists( 'is_sp_taxonomy' ) ) { function is_sp_taxonomy( $typenow = null ) { if ( $typenow == null ) { global $typenow; } $taxonomies = sp_taxonomies(); if ( in_array( $typenow, $taxonomies ) ) { return true; } return false; } } if ( ! function_exists( 'is_ajax' ) ) { /** * is_ajax - Returns true when the page is loaded via ajax. * * @access public * @return bool */ function is_ajax() { return defined( 'DOING_AJAX' ); } }