// do we have functionality provided by plugin version 4.6+ present?
if (method_exists($civi, 'civicrm_context_get')) {
+ // FIXME: Why is this global?
global $civicrm_wp_title;
- $civicrm_wp_title = $pageTitle;
+ $civicrm_wp_title = $title;
// yes, set page title, depending on context
$context = civi_wp()->civicrm_context_get();
// legacy pre-4.6 behaviour
global $civicrm_wp_title;
- $civicrm_wp_title = $pageTitle;
+ $civicrm_wp_title = $title;
$template = CRM_Core_Smarty::singleton();
$template->assign('pageTitle', $pageTitle);