From: Laury GvR Date: Tue, 27 Sep 2016 19:28:51 +0000 (-0400) Subject: Minor edit fixing MembOnly css applying X-Git-Tag: v2.7.0^2~17^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a1aaad36f3d9f7aec5c2fa39e9eda9e10e4f2cc5;p=WP-Plugins%2Fglm-member-db.git 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. --- 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