From c73b1c190b42d6f21f3d6b0d2aea1718a1867adf Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 3 Mar 2015 13:56:46 +0530 Subject: [PATCH] CRM-15933 Profile HTML Snippets don't respect CIVICRM_UF_WP_BASEPAGE --- CRM/UF/Page/Group.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 04c1ba21cc..84c01faca7 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -242,7 +242,17 @@ class CRM_UF_Page_Group extends CRM_Core_Page { $profile = str_replace('/administrator/', '/index.php', $profile); } elseif ($config->userFramework == 'WordPress') { - $profile = str_replace('/wp-admin/admin.php', '/index.php', $profile); + //@todo remove this part when it is OK to deprecate CIVICRM_UF_WP_BASEPAGE-CRM-15933 + if (defined('CIVICRM_UF_WP_BASEPAGE')) { + $wpbase = CIVICRM_UF_WP_BASEPAGE; + } + elseif (!empty($config->wpBasePage)) { + $wpbase = $config->wpBasePage; + } + else { + $wpbase = 'index.php'; + } + $profile = str_replace('/wp-admin/admin.php', '/'.$wpbase.'/', $profile); } // add header files -- 2.25.1