From cffc445cd017170b0c1593788112d202071fd01f Mon Sep 17 00:00:00 2001 From: Jacob Schweitzer Date: Tue, 13 Sep 2016 22:15:23 -0300 Subject: [PATCH 1/2] Issue 875 - do not try to load Yoast SEO JS / log override if on network admin and Yoast SEO is not network activated. --- connectors/class-connector-wordpress-seo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connectors/class-connector-wordpress-seo.php b/connectors/class-connector-wordpress-seo.php index 7e9f646d9..3fb433772 100644 --- a/connectors/class-connector-wordpress-seo.php +++ b/connectors/class-connector-wordpress-seo.php @@ -179,6 +179,9 @@ public function action_links( $links, $record ) { public function register() { parent::register(); + if ( is_multisite() && is_network_admin() && ! is_plugin_active_for_network( 'wordpress-seo/wordpress-seo-main.php' ) ) { + return; + } foreach ( \WPSEO_Options::$options as $class ) { /* @var $class WPSEO_Options */ $this->option_groups[ $class::get_instance()->group_name ] = array( From dd44d0fc931711cf255df24a70cc045ff898e0ac Mon Sep 17 00:00:00 2001 From: Jacob Schweitzer Date: Thu, 15 Sep 2016 19:12:17 -0300 Subject: [PATCH 2/2] Remove is_multisite() check and move above parent::register(). --- connectors/class-connector-wordpress-seo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connectors/class-connector-wordpress-seo.php b/connectors/class-connector-wordpress-seo.php index 3fb433772..5b2049d16 100644 --- a/connectors/class-connector-wordpress-seo.php +++ b/connectors/class-connector-wordpress-seo.php @@ -177,11 +177,11 @@ public function action_links( $links, $record ) { } public function register() { - parent::register(); - - if ( is_multisite() && is_network_admin() && ! is_plugin_active_for_network( 'wordpress-seo/wordpress-seo-main.php' ) ) { + if ( is_network_admin() && ! is_plugin_active_for_network( 'wordpress-seo/wordpress-seo-main.php' ) ) { return; } + parent::register(); + foreach ( \WPSEO_Options::$options as $class ) { /* @var $class WPSEO_Options */ $this->option_groups[ $class::get_instance()->group_name ] = array(