Skip to content
Snippets Groups Projects
Unverified Commit 193f6e0c authored by colemanw's avatar colemanw Committed by GitHub
Browse files

Merge pull request #17352 from christianwach/lab-wp-49-civi5-26

Remove "page=CiviCRM" query string from WordPress front-end (5.26)
parents 950e438f 25bd5735
Branches
Tags
No related merge requests found
......@@ -253,7 +253,13 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
// pre-existing logic
if (isset($path)) {
$queryParts[] = 'page=CiviCRM';
// Admin URLs still need "page=CiviCRM", front-end URLs do not.
if ((is_admin() && !$frontend) || $forceBackend) {
$queryParts[] = 'page=CiviCRM';
}
else {
$queryParts[] = 'civiwp=CiviCRM';
}
$queryParts[] = 'q=' . rawurlencode($path);
}
if ($wpPageParam) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment