From a8ed12e57383b86545fab16e027d8b1dcdcb32d0 Mon Sep 17 00:00:00 2001 From: Capevace Date: Wed, 9 Aug 2017 17:40:26 +0200 Subject: [PATCH] Added notice when Yoast SEO is missing. --- admin/menu.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/admin/menu.php b/admin/menu.php index 024ba8b..0daebf9 100644 --- a/admin/menu.php +++ b/admin/menu.php @@ -16,13 +16,23 @@ function ymme_admin_menu() { } function ymme_editor_page() { - include_once dirname(WP_YMME).'/admin/views/editor.php'; + if (is_plugin_active('wordpress-seo/wp-seo.php')) + include_once dirname(WP_YMME).'/admin/views/editor.php'; + else + ymme_yoast_missing_notice(); } function ymme_admin_dependencies($hook) { if($hook !== 'tools_page_ymme/editor') { return; } - - } + +function ymme_yoast_missing_notice() { + ?> +
+

The Yoast SEO plugin is not installed/active.

+

To use Mass Meta Editor, you need to install the Yoast SEO plugin.

+
+