switching from /demo components to /tutorial with fallback
This commit is contained in:
parent
571e39bd65
commit
cbe7732afa
|
|
@ -17,13 +17,17 @@ add_action('template_redirect', 'redirect_to_demo_components_page');
|
|||
function redirect_to_demo_components_page()
|
||||
{
|
||||
// if ($_SERVER['REQUEST_URI'] == '/demo-components' && is_user_logged_in()) {
|
||||
if ($_SERVER['REQUEST_URI'] == '/demo-components') {
|
||||
if ($_SERVER['REQUEST_URI'] == '/tutorial') {
|
||||
global $wp_query;
|
||||
$wp_query->is_404 = false;
|
||||
status_header(200);
|
||||
include(dirname(__DIR__, 1) . '/demo-components.php');
|
||||
exit();
|
||||
}
|
||||
if ($_SERVER['REQUEST_URI'] == '/demo-components') {
|
||||
wp_redirect('/tutorial');
|
||||
exit();
|
||||
}
|
||||
if ($_SERVER['REQUEST_URI'] == '/sitemap-progress') {
|
||||
global $wp_query;
|
||||
$wp_query->is_404 = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user