Inventory_Presser_Allow_Inventory_As_Home_Page::redirect_the_page( WP_Query $wp_query )
redirect_the_page
Contents
Description Description
Performs the redirect from our special page to the inventory archive
Parameters Parameters
- $wp_query
-
(WP_Query) (Required)
Return Return
(void)
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; } }
Expand full source code Collapse full source code View on Github