From: Chuck Scott Date: Thu, 7 Jul 2016 19:03:19 +0000 (-0400) Subject: Adding link to a Yoast SEO filter to stop it from creating incorrect canonical page... X-Git-Tag: v2.1.25^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=7512b6f2c470e15bff09ece9542c36cfe560e7c9;p=WP-Plugins%2Fglm-member-db.git Adding link to a Yoast SEO filter to stop it from creating incorrect canonical page links. --- diff --git a/index.php b/index.php index 06c533a9..375e669e 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 2.1.24 + * Version: 2.1.25 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -38,7 +38,7 @@ * */ -define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.24'); +define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.25'); define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.11'); // Check if plugin version is not current in WordPress option and if needed updated it diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 30ad731a..45e9b093 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -104,6 +104,14 @@ add_action('init', function() { return; }); // do_action 'init' +/* + * Kill Yoast SEO canonical page links in headers. They override the correct canonical links farther down in the header. + * Yoast does not have an option for this like some other SEO plugins do. + */ +add_filter( 'wpseo_canonical', function($canonical) { + return false; +}); + /* End of rel_canonical code */