Making WordPress.org

Changeset 13396

Timestamp:
03/28/2024 01:17:20 AM (4 months ago)
Author:
tellyworth
Message:

Plugin Directory: add browse view for preview-enabled plugins

Note that the page is unlinked and noindexed, since it is mainly for use by the team and might be removed in future.

Fixes #7534

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  
    547547
    548548        // 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)' );
    550550        add_permastruct( 'browse', 'browse/%browse%' );
    551551
     
    796796        if (
    797797            ! 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' ) )
    799799        ) {
    800800             $wp_query->query['browse']      = 'featured';
     
    813813                    'value'   => gmdate( 'Y-m-d H:i:s', time() - YEAR_IN_SECONDS ),
    814814                    'compare' => '>',
     815
     816
     817
     818
     819
     820
     821
     822
     823
     824
     825
     826
     827
     828
    815829                ];
    816830                $wp_query->set( 'meta_query', $meta_query );
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r13335 r13396  
    183183            $noindex = true;
    184184        } elseif ( get_query_var( 'plugin_business_model' ) && get_query_var( 'browse' ) ) {
     185
     186
    185187            $noindex = true;
    186188        } elseif ( is_singular( 'plugin' ) && self::is_plugin_outdated() ) {
Note: See TracChangeset for help on using the changeset viewer.