* Plugin Name: GLM Members Database Events
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 1.3.1
+ * Version: 1.3.2
* Author: Chuck Scott
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersDatabaseEventsAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.3.1
+ * @version 1.3.2
*/
/*
* so that we're sure the other add-ons see an up to date
* version from this plugin.
*/
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.3.1');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.3.2');
define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.20');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
* *** Also note that parameters will be in the context of the main front controller constructor. ***
*/
+// Setup rewrite for member detail pages
+add_filter('rewrite_rules_array', function($rules) {
+
+ // Check if rule is not set
+ if ( ! isset( $rules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$'] ) ) {
+
+ // Add the new rule
+ $newrules = array();
+ $newrules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$']='index.php?pagename=$matches[1]&eventslug=$matches[2]';
+ return $newrules + $rules;
+ }
+
+ // If already set, just return the rules unchanged.
+ return $rules;
+
+});
+
+/* This code is being replace for testing by the above to avoid intermittent 404's on the detail pages.
// Check if the canonical event page rewrite rule is not currently in place.
$rules = get_option( 'rewrite_rules' );
if ( ! isset( $rules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$'] ) ) {
});
}
+*/
/*
* Event Detail Page Canonical URL Fix