From 227d65b7c27e63c7b6b6a8e10a893dbf33261fda Mon Sep 17 00:00:00 2001 From: Christian Wach Date: Fri, 27 Nov 2020 15:03:06 +0000 Subject: [PATCH] Prevent "add_action" from being called multiple times --- CRM/Utils/System/WordPress.php | 1 + 1 file changed, 1 insertion(+) 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, -- 2.25.1