From 4eb4dae2852c2d2294595ea840d33e8dbff40341 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 16 Jun 2016 14:25:57 -0400 Subject: [PATCH] Commented out flush_rules() as it was clearing rewrite rules - need to investigate --- setup/frontHooks.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup/frontHooks.php b/setup/frontHooks.php index c037f9eb..4a1bf75b 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -44,7 +44,7 @@ add_filter('init', function() { $rules = get_option( 'rewrite_rules' ); if ( ! isset( $rules['('.$this->config['settings']['canonical_member_page'].')/([^/]*)$'] ) ) { global $wp_rewrite; - $wp_rewrite->flush_rules(); +// Seems to cause loss of rewrite rules -Need to investigate $wp_rewrite->flush_rules(); } }); @@ -114,7 +114,7 @@ if (!function_exists('get_id_by_slug')) { } /* - * This function makes it easier to grab page content of any page by using the + * This function makes it easier to grab page content of any page by using the * page ID, which WP does not natively do. */ if (!function_exists('get_post_page_content')) { @@ -143,10 +143,10 @@ function glm_members_only_template( $template ) { 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 - + * global $post; * update_post_meta($post->ID, '_wp_page_template', $templateName); - * + * */ //} else if (is_in_tree($membersOnlyPage)) { // Bad template; @@ -157,7 +157,7 @@ function glm_members_only_template( $template ) { } /* - * + * */ add_filter('glm_associate_config', function() { return $this->config; -- 2.17.1