File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ public static function setup_plugin( $plugin ) {
133133 return true ;
134134 }
135135
136+ if ( 'wordpress-seo-premium ' === $ slug ) {
137+ return self ::enable_yoast_seo_premium ();
138+ }
139+
136140 return false ;
137141 }
138142
@@ -200,6 +204,20 @@ public static function enable_jetpack_forms_module() {
200204 }
201205
202206 // Return true if module is already active
203- return class_exists ( 'Jetpack ' ) && \Jetpack::is_module_active ( 'contact-form ' );
207+ return class_exists ( 'Jetpack ' ) && \Jetpack::is_module_active ( 'contact-form ' ) && \Jetpack::is_module_active ( 'blocks ' );
208+ }
209+
210+ /**
211+ * Enable the Yoast SEO Premium module.
212+ *
213+ * @return boolean True if module was activated or was already active
214+ */
215+ public static function enable_yoast_seo_premium () {
216+ if ( class_exists ( 'WPSEO_Options ' ) ) {
217+ // Disable redirect to Yoast onboarding.
218+ \WPSEO_Options::set ( 'should_redirect_after_install ' , false );
219+ }
220+
221+ return true ;
204222 }
205223}
You can’t perform that action at this time.
0 commit comments