From 15e7e6a63992c5124dad0d410dc85153d39e2bf5 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 8 Jul 2016 14:47:32 -0400 Subject: [PATCH] Beat Yoast SEO once again. This time with page titles. --- index.php | 4 ++-- setup/frontHooks.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 53699757..321840b9 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.26 + * Version: 2.1.27 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -38,7 +38,7 @@ * */ -define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.26'); +define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.27'); 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 1656e57a..07ded233 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -148,10 +148,10 @@ if (strpos(GLM_MEMBERS_PLUGIN_CURRENT_URL, $this->config['settings']['canonical_ global $wpdb; $GLOBALS['glmMembName'] = $wpdb->get_var( "SELECT name FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE member_slug = '".$GLOBALS['glmDetailSlug']."'" ); - // Set the page title to the member name - add_filter('wp_title', function() { + // Set the page title to the member name - Using low priority so it's the last to set the title! + add_filter('wp_title', function($title) { return $GLOBALS['glmMembName']; - }); + }, 99, 1); } // Add memberslug query var -- 2.17.1