Inventory_Presser_Allow_Inventory_As_Home_Page::redirect_the_page( WP_Query $wp_query )

redirect_the_page


Description Description

Performs the redirect from our special page to the inventory archive


Top ↑

Parameters Parameters

$wp_query

(WP_Query) (Required)


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-allow-inventory-as-home-page.php

	function redirect_the_page( $wp_query )
	{
		if( is_admin() )
		{
			return;
		}

		if( $wp_query->get( 'page_id' ) == get_option( 'page_on_front' ) && $wp_query->get( 'page_id' ) == self::find_page_id() )
		{
			wp_redirect( get_post_type_archive_link( INVP::POST_TYPE ) );
			exit;
		}
	}