diff --git wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php
index dd6980cf5..3b8ac3faf 100644
|
|
abstract class Event_Loader { |
81 | 81 | * @param WP_Query $query |
82 | 82 | */ |
83 | 83 | public function query_public_statuses_on_archives( $query ) { |
84 | | if ( ! $query->is_post_type_archive( WCPT_POST_TYPE_ID ) ) { |
| 84 | // Bail if dashboard. |
| 85 | if ( is_admin() ) { |
85 | 86 | return; |
86 | 87 | } |
87 | 88 | |
88 | | if ( is_admin() ) { |
| 89 | // Bail if post type is something other than WordCamp |
| 90 | if ( |
| 91 | ! $query->is_post_type_archive( WCPT_POST_TYPE_ID ) && |
| 92 | // for some reason $query->is_singular throws a notice, so lets do it this way |
| 93 | ! ( isset( $query->query_vars['post_type'] ) && WCPT_POST_TYPE_ID === $query->query_vars['post_type'] ) |
| 94 | ) { |
89 | 95 | return; |
90 | 96 | } |
91 | 97 | |
… |
… |
abstract class Event_Loader { |
94 | 100 | $query->set( 'orderby', 'menu_order date' ); |
95 | 101 | } |
96 | 102 | |
| 103 | // Bail if performing a query which already has a post_status |
97 | 104 | if ( ! empty( $query->query_vars['post_status'] ) ) { |
98 | 105 | return; |
99 | 106 | } |