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
20 changes: 19 additions & 1 deletion includes/Services/PluginService.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public static function setup_plugin( $plugin ) {
return true;
}

if ( 'wordpress-seo-premium' === $slug ) {
return self::enable_yoast_seo_premium();
}

return false;
}

Expand Down Expand Up @@ -200,6 +204,20 @@ public static function enable_jetpack_forms_module() {
}

// Return true if module is already active
return class_exists( 'Jetpack' ) && \Jetpack::is_module_active( 'contact-form' );
return class_exists( 'Jetpack' ) && \Jetpack::is_module_active( 'contact-form' ) && \Jetpack::is_module_active( 'blocks' );
}

/**
* Enable the Yoast SEO Premium module.
*
* @return boolean True if module was activated or was already active
*/
public static function enable_yoast_seo_premium() {
if ( class_exists( 'WPSEO_Options' ) ) {
// Disable redirect to Yoast onboarding.
\WPSEO_Options::set( 'should_redirect_after_install', false );
}

return true;
}
}
Loading