components/Pages.php
public function page_check() {

		if ( self::$checked ) {
			return;
		}

		global $pods;

		// Fix any global confusion wherever this runs
		if ( isset( $pods ) && ! isset( $GLOBALS['pods'] ) ) {
			$GLOBALS['pods'] =& $pods;
		} elseif ( ! isset( $pods ) && isset( $GLOBALS['pods'] ) ) {
			$pods =& $GLOBALS['pods'];
		}

		if ( ! defined( 'PODS_DISABLE_POD_PAGE_CHECK' ) || ! PODS_DISABLE_POD_PAGE_CHECK ) {
			if ( null === self::$exists ) {
				self::$exists = pod_page_exists();
			}

			if ( false !== self::$exists ) {
				$pods = apply_filters( 'pods_global', $pods, self::$exists );

				if ( ! is_wp_error( $pods ) && ( is_object( $pods ) || 404 != $pods ) ) {
					add_action( 'template_redirect', array( $this, 'template_redirect' ) );
					add_filter( 'redirect_canonical', '__return_false' );
					add_action( 'wp_head', array( $this, 'wp_head' ) );
					add_filter( 'wp_title', array( $this, 'wp_title' ), 0, 3 );
					add_filter( 'body_class', array( $this, 'body_class' ), 0, 1 );
					add_filter( 'status_header', array( $this, 'status_header' ) );
					add_action( 'after_setup_theme', array( $this, 'precode' ) );
					add_action( 'wp', array( $this, 'silence_404' ), 1 );

					// Genesis theme integration
					add_action( 'genesis_loop', 'pods_content', 11 );
				}
			}

			self::$checked = true;
		}//end if
	}
public function page_check() {

		if ( self::$checked ) {
			return;
		}

		global $pods;

		// Fix any global confusion wherever this runs
		if ( isset( $pods ) && ! isset( $GLOBALS['pods'] ) ) {
			$GLOBALS['pods'] =& $pods;
		} elseif ( ! isset( $pods ) && isset( $GLOBALS['pods'] ) ) {
			$pods =& $GLOBALS['pods'];
		}

		if ( ! defined( 'PODS_DISABLE_POD_PAGE_CHECK' ) || ! PODS_DISABLE_POD_PAGE_CHECK ) {
			if ( null === self::$exists ) {
				self::$exists = pod_page_exists();
			}

			if ( false !== self::$exists ) {
				$pods = apply_filters( 'pods_global', $pods, self::$exists );

				if ( ! is_wp_error( $pods ) && ( is_object( $pods ) || 404 != $pods ) ) {
					add_action( 'template_redirect', array( $this, 'template_redirect' ) );
					add_filter( 'redirect_canonical', '__return_false' );
					add_action( 'wp_head', array( $this, 'wp_head' ) );
					add_filter( 'wp_title', array( $this, 'wp_title' ), 0, 3 );
					add_filter( 'body_class', array( $this, 'body_class' ), 0, 1 );
					add_filter( 'status_header', array( $this, 'status_header' ) );
					add_action( 'after_setup_theme', array( $this, 'precode' ) );
					add_action( 'wp', array( $this, 'silence_404' ), 1 );

					// Genesis theme integration
					add_action( 'genesis_loop', 'pods_content', 11 );
				}
			}

			self::$checked = true;
		}//end if
	}
public function page_check ( ) { if ( self :: $ checked ) { return ; } global $ pods ; // Fix any global confusion wherever this runs if ( isset ( $ pods ) && ! isset ( $ GLOBALS [ 'pods' ] ) ) { $ GLOBALS [ 'pods' ] = & $ pods ; } elseif ( ! isset ( $ pods ) && isset ( $ GLOBALS [ 'pods' ] ) ) { $ pods = & $ GLOBALS [ 'pods' ] ; } if ( ! defined ( 'PODS_DISABLE_POD_PAGE_CHECK' ) || ! PODS_DISABLE_POD_PAGE_CHECK ) { if ( null === self :: $ exists ) { self :: $ exists = pod_page_exists ( ) ; } if ( false !== self :: $ exists ) { $ pods = apply_filters ( 'pods_global' , $ pods , self :: $ exists ) ; if ( ! is_wp_error ( $ pods ) && ( is_object ( $ pods ) || 404 != $ pods ) ) { add_action ( 'template_redirect' , array ( $ this , 'template_redirect' ) ) ; add_filter ( 'redirect_canonical' , '__return_false' ) ; add_action ( 'wp_head' , array ( $ this , 'wp_head' ) ) ; add_filter ( 'wp_title' , array ( $ this , 'wp_title' ) , 0 , 3 ) ; add_filter ( 'body_class' , array ( $ this , 'body_class' ) , 0 , 1 ) ; add_filter ( 'status_header' , array ( $ this , 'status_header' ) ) ; add_action ( 'after_setup_theme' , array ( $ this , 'precode' ) ) ; add_action ( 'wp' , array ( $ this , 'silence_404' ) , 1 ) ; // Genesis theme integration add_action ( 'genesis_loop' , 'pods_content' , 11 ) ; } } self :: $ checked = true ; } //end if }
Check if a Pod Page exists
Check if a Pod Page exists