Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assignment of base page template #227

Merged
merged 1 commit into from
Nov 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions includes/civicrm.basepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,13 @@ public function basepage_template($template) {
*
* @since 4.6
*
* @param string $basepage_template The provided template name.
* @param string $template_name The provided template name.
* @return string The overridden template name.
*/
$basepage_template = apply_filters('civicrm_basepage_template', $basepage_template);
$basepage_template = apply_filters('civicrm_basepage_template', $template_name);

// Use the provided page template, but allow overrides.
$page_template = locate_template([$template_name]);
// Find the base page template.
$page_template = locate_template([$basepage_template]);

// If not homepage and template is found.
if ('' != $page_template && !is_front_page()) {
Expand All @@ -655,7 +655,7 @@ public function basepage_template($template) {
*/
$home_template_name = apply_filters('civicrm_basepage_home_template', 'page.php');

// Find homepage the template.
// Find the homepage template.
$home_template = locate_template([$home_template_name]);

// Use it if found.
Expand Down