From: Chuck Scott Date: Thu, 16 Jun 2016 18:25:57 +0000 (-0400) Subject: Commented out flush_rules() as it was clearing rewrite rules - need to investigate X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d8a083ace01215bd50a36f060a795db39d69d0e0;p=WP-Plugins%2Fglm-member-db.git Commented out flush_rules() as it was clearing rewrite rules - need to investigate --- 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;