Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mu-plugins/rest-api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function initialize_rest_endpoints() {
$users_controller->register_routes();

// The Site Quality controller is only needed on the main site. Note: domain check is due to this plugin running on multiple networks.
if ( 1 === get_current_blog_id() && 'wordpress.org' === get_blog_details()->domain ) {
if ( 1 === get_current_blog_id() && function_exists( 'get_blog_details' ) && 'wordpress.org' === get_blog_details()->domain ) {
require_once __DIR__ . '/endpoints/class-wporg-site-quality-controller.php';
}

if ( defined( 'WPORG_THEME_DIRECTORY_BLOGID' ) && WPORG_THEME_DIRECTORY_BLOGID === get_current_blog_id() ) {
require_once __DIR__ . '/endpoints/class-wporg-base-locale-banner-controller.php';
require_once __DIR__ . '/endpoints/class-wporg-themes-locale-banner-controller.php';
Expand Down
Loading