$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();
}
});
}
/*
- * 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')) {
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;
}
/*
- *
+ *
*/
add_filter('glm_associate_config', function() {
return $this->config;