Changeset 11239
- Timestamp:
- 09/15/2021 07:54:06 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/query-modifications.php
r11227 r11239 13 13 return; 14 14 } 15 15 16 // Themes are never via pagename 16 17 if ( !empty( $query->query_vars['pagename'] ) ) { … … 23 24 } 24 25 25 // From now on, always query themes. 26 $query->query_vars['post_type'] = 'repopackage'; 26 // From now on, always query published themes. 27 $query->query_vars['post_type'] = 'repopackage'; 28 if ( ! isset( $query->query_vars['post_status'] ) ) { 29 $query->query_vars['post_status'] = 'publish'; 30 } 27 31 if ( ! isset( $query->query_vars['browse'] ) ) { 28 32 $query->query_vars['browse'] = ''; … … 34 38 } 35 39 36 // eliminate draft posts from showing up in the directory40 // Delisted items should be available on singular / author archives. 37 41 if ( 38 ( 39 ! isset( $query->query_vars['post_status'] ) || 40 'publish' === $query->query_vars['post_status'] 41 ) && 42 ! $query->is_search() 42 ! empty( $query->query_vars['name'] ) || 43 ! empty( $query->query_vars['author_name'] ) 43 44 ) { 44 $query->query_vars['post_status'] = array( 45 'publish', 46 'delist', 47 ); 48 } 45 if ( ! is_array( $query->query_vars['post_status'] ) ) { 46 $query->query_vars['post_status'] = array( 47 $query->query_vars['post_status'] 48 ); 49 } 50 51 $query->query_vars['post_status'][] = 'delist'; 52 } 49 53 50 54 switch ( $query->query_vars['browse'] ) {
Note: See TracChangeset
for help on using the changeset viewer.