From: Christian Wach Date: Fri, 27 Nov 2020 15:03:06 +0000 (+0000) Subject: Prevent "add_action" from being called multiple times X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=227d65b7c27e63c7b6b6a8e10a893dbf33261fda;p=civicrm-core.git Prevent "add_action" from being called multiple times --- diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 2877ffed2a..98cb5a88fd 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -271,6 +271,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { add_action('wp_head', [__CLASS__, '_showHTMLHead']); // back-end views add_action('admin_head', [__CLASS__, '_showHTMLHead']); + $registered = TRUE; } CRM_Core_Region::instance('wp_head')->add([ 'markup' => $head,