Making WordPress.org


Ignore:
Timestamp:
01/10/2019 05:45:59 AM (7 years ago)
Author:
dd32
Message:

API: Serve Happy: Move the Serve-Happy config constants out from the API and into a global mu-plugin to allow it to be used in other WordPress.org pages.

Props flixos90, dd32.
See #4009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/serve-happy/1.0/tests/bootstrap.php

    r6728 r8065  
    2222}
    2323
    24 require dirname( __DIR__ ) . '/config.php';
    2524require dirname( __DIR__ ) . '/include.php';
     25if ( defined( 'WPORGPATH' ) ) {
     26    // Running on WordPress.org, include the main mu-plugins config
     27    require WPORGPATH . 'wp-content/mu-plugins/pub/servehappy-config.php';
     28} else {
     29    // Assume meta-environment.
     30    require dirname( dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ) . '/wordpress.org/public_html/wp-content/mu-plugins/pub/servehappy-config.php';
     31}
Note: See TracChangeset for help on using the changeset viewer.