Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/16/2018 08:37:16 PM (7 years ago)
Author:
johnjamesjacoby
Message:

AJAX: always use defined() before setting an environmental constant.

This avoids a notice/warning if something has already set the the DOING_AJAX constant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/ajax.php

    r6760 r6871  
    7373    }
    7474
    75     // Set WordPress core AJAX constant
    76     define( 'DOING_AJAX', true );
     75    // Set WordPress core AJAX constant for back-compat
     76    if ( ! defined( 'DOING_AJAX' ) ) {
     77        define( 'DOING_AJAX', true );
     78    }
    7779
    7880    // Setup AJAX headers
Note: See TracChangeset for help on using the changeset viewer.