Making WordPress.org


Ignore:
Timestamp:
02/27/2019 01:13:53 AM (7 years ago)
Author:
iandunn
Message:

Plan Redirects: Don't register during cron jobs to avoid notice.

Previously this was triggering a "headers already sent" message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-plan-redirects.php

    r4815 r8353  
    11<?php
     2
    23// No direct or CLI access.
    34if ( ! defined( 'ABSPATH' ) || ! ABSPATH || ( defined( 'WP_CLI' ) && WP_CLI ) )
     
    56
    67// Redirects for plan.wordcamp.org front-end only.
    7 if ( $_SERVER['HTTP_HOST'] != 'plan.wordcamp.org' || is_admin() ) {
     8if ( $_SERVER['HTTP_HOST'] != 'plan.wordcamp.org' || is_admin() || wp_doing_cron() ) {
    89    return;
    910}
     
    8283    die( wp_redirect( esc_url_raw( 'https://make.wordpress.org/community/handbook/wordcamp-organizer' . $_SERVER['REQUEST_URI'] ), 301 ) );
    8384});
     85
Note: See TracChangeset for help on using the changeset viewer.