Changeset 13396
- Timestamp:
- 03/28/2024 01:17:20 AM (10 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r13354 r13396 547 547 548 548 // Add the browse/* views. 549 add_rewrite_tag( '%browse%', '(featured|popular|beta|blocks|block|new|favorites|adopt-me|updated )' );549 add_rewrite_tag( '%browse%', '(featured|popular|beta|blocks|block|new|favorites|adopt-me|updated|preview)' ); 550 550 add_permastruct( 'browse', 'browse/%browse%' ); 551 551 … … 796 796 if ( 797 797 ! empty ( $wp_query->query['browse'] ) && 798 ! in_array( $wp_query->query['browse'], array( 'featured', 'popular', 'beta', 'blocks', 'block', 'new', 'favorites', 'adopt-me', 'updated' ) )798 ! in_array( $wp_query->query['browse'], array( 'featured', 'popular', 'beta', 'blocks', 'block', 'new', 'favorites', 'adopt-me', 'updated', 'preview' ) ) 799 799 ) { 800 800 $wp_query->query['browse'] = 'featured'; … … 813 813 'value' => gmdate( 'Y-m-d H:i:s', time() - YEAR_IN_SECONDS ), 814 814 'compare' => '>', 815 ]; 816 $wp_query->set( 'meta_query', $meta_query ); 817 818 break; 819 820 case 'preview': 821 $wp_query->query_vars['orderby'] ??= 'last_updated'; 822 823 // Limit the Beta tab to plugins updated within 12 months. 824 $meta_query = $wp_query->get( 'meta_query' ) ?: []; 825 $meta_query['live-preview'] = [ 826 'key' => '_public_preview', 827 'value' => '1', 828 'compare' => '=', 815 829 ]; 816 830 $wp_query->set( 'meta_query', $meta_query ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r13335 r13396 183 183 $noindex = true; 184 184 } elseif ( get_query_var( 'plugin_business_model' ) && get_query_var( 'browse' ) ) { 185 $noindex = true; 186 } elseif ( 'preview' == get_query_var( 'browse' ) ) { 185 187 $noindex = true; 186 188 } elseif ( is_singular( 'plugin' ) && self::is_plugin_outdated() ) {
Note: See TracChangeset
for help on using the changeset viewer.