| 15 | | // the logic being that if we are querying a page, then categories and taxonomies are not relevant and can be ignored. |
| 16 | | // the category and taxonomy are still there to be used by the event shortcode logic. |
| 17 | | // possibly one should also look at unsetting the more sophisticated tag_in etc vars, but for now this will do me |
| | 15 | // the logic being that if we are querying a page and we already know the page id, then additional queries and categories and taxonomies are not relevant and can be ignored. |
| | 16 | // the queries vars, category and taxonomy are still there to be used by the event shortcode logic within the page. THis way we at least get a page not a 404. |
| 19 | | if (isset($q->query_vars) and $q->query_vars['page_id']) { // unset categoreids and taxos |
| | 18 | $possible_parameters = array ( |
| | 19 | 'author' |
| | 20 | , 'author_name' |
| | 21 | , 'cat' |
| | 22 | , 'category_name' |
| | 23 | , 'tag' |
| | 24 | , 'tag_id' |
| | 25 | , 'category__in' |
| | 26 | , 'category__not_in' |
| | 27 | , 'category__and' |
| | 28 | , 'post__in' |
| | 29 | , 'post__not_in' |
| | 30 | , 'tag__in' |
| | 31 | , 'tag__not_in' |
| | 32 | , 'tag__and' |
| | 33 | , 'tag_slug__in' |
| | 34 | , 'tag_slug__and' |
| | 35 | , 'meta_key' |
| | 36 | , 'meta_value' |
| | 37 | , 'preview' |
| | 38 | , 's' |
| | 39 | , 'sentence' |
| | 40 | , 'fields' |
| | 41 | , 'second' |
| | 42 | , 'minute' |
| | 43 | , 'hour' |
| | 44 | , 'day' |
| | 45 | , 'monthnum' //?monthnum=3 |
| | 46 | , 'year' //?year=2005 posted in, |
| | 47 | , 'w' |
| | 48 | |
| | 49 | ); |
| | 50 | |
| | 51 | if (isset($q->query_vars) and ( |
| | 52 | (!empty( $q->query_vars['page_id'])) or |
| | 53 | (!empty( $q->query_vars['page'])) or |
| | 54 | (!empty( $q->query_vars['pagename']))) |
| | 55 | ) { |
| | 56 | // then we already know our page, lets unset the rest from this query variable. They will still be accessible to the shortcode. |
| | 57 | // first unset all the event taxonomies we use - (should we just do all taxonomies anyway to avoid 404 ? ?) |