$eventDays = array();
$eventDay = null;
+
+ // Test to see if there's an event cat slug
+ $eventCatSlug = get_query_var( 'eventcatslug' );
+ if ( $eventCatSlug ) {
+ $sql = "
+ SELECT id
+ FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "categories
+ WHERE name_slug = '$eventCatSlug'";
+ //$categoryId = $this->wpdb->get_var( $sql );
+ }
+ var_dump( $eventCatSlug );
+
// If a memberID has been specified, limit to that member
if ( isset( $actionData['request']['member'] ) ) {
$memberId = $actionData['request']['member'] - 0;
* *** Also note that parameters will be in the context of the main front controller constructor. ***
*/
-// Setup rewrite for package detail page
+// Setup rewrite for event detail page
add_filter( 'rewrite_rules_array', function($rules) {
$newrules = array();
$newrules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$']='index.php?pagename=$matches[1]&eventslug=$matches[2]';
return $newrules + $rules;
});
+add_filter( 'rewrite_rules_array', function($rules) {
+ $newrules = array();
+ $newrules['(event-cat)/([^/]*)$']='index.php?pagename=$matches[1]&eventcatslug=$matches[2]';
+ return $newrules + $rules;
+});
add_filter( 'query_vars', function($vars) {
array_push($vars, 'eventslug');
return $vars;
});
+add_filter( 'query_vars', function($vars) {
+ array_push($vars, 'eventcatslug');
+ return $vars;
+});
add_action('wp_loaded', function() {
$rules = get_option('rewrite_rules');
if ( ! isset( $rules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$'] ) ) {
}
// Add eventslug query var
-add_filter('query_vars', function($vars) {
- array_push($vars, 'eventslug');
- return $vars;
-});
+//add_filter('query_vars', function($vars) {
+// array_push($vars, 'eventslug');
+// return $vars;
+//});
if (isset($this->config['addOns']['glm-member-db'])) {
'id' => false,
'template' => false,
)
-
+ ),
+ 'glm-members-event-category' => array(
+ 'plugin' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'menu' => 'events',
+ 'action' => 'list',
+ 'table' => false,
+ 'attributes' => array(
+ 'catname' => null,
+ 'type' => 'all',
+ 'order' => 'title',
+ 'member' => false,
+ 'template' => false,
+ 'limit' => null,
+ 'featured' => null,
+ 'current' => null,
+ ),
),
'glm-members-event-front-add' => array(
'plugin' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,