From a1aaad36f3d9f7aec5c2fa39e9eda9e10e4f2cc5 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 27 Sep 2016 15:28:51 -0400 Subject: [PATCH] Minor edit fixing MembOnly css applying When the given page is a child of Members Only, even if the glm-members-only-template.php is not the selected template, then apply the Member DB front styles. --- setup/frontHooks.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 5c1d32b8..779eba9a 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -244,9 +244,11 @@ function glm_members_only_template( $template ) { $templateName = "glm-members-only-template.php"; $membersOnlyPage = get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID); $newTemplate = locate_template( $templateName ); - if ( (is_in_tree($membersOnlyPage)) && ($newTemplate != "") ) { // if in same tree as the members page for this site + if ( is_in_tree( $membersOnlyPage ) ) { // if in same tree as the members page for this site do_action('glmMembersFrontCSSFilter'); - return $newTemplate; + if ( $newTemplate != "" ) { + return $newTemplate; + } /* //Uncomment this if you want every child page of the members only page to be given the members only template * // (i.e. changed in the database) and not just using them on the front-end -- 2.17.1