Making WordPress.org

Changeset 8578


Ignore:
Timestamp:
04/03/2019 07:38:32 PM (7 years ago)
Author:
coffee2code
Message:

Plugin Directory: Return 404 response for paginated frontpage requests.

Props jonoaldersonwp, coffee2code.
Fixes #4321.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r8186 r8578  
    12241224                        wp_safe_redirect( site_url( '/' ), 301 );
    12251225                        die();
     1226                }
     1227
     1228                // Paginated front page.
     1229                if ( is_front_page() && is_paged() ) {
     1230                        $GLOBALS['wp_query']->set_404();
     1231                        status_header( 404 );
     1232                        return;
    12261233                }
    12271234
Note: See TracChangeset for help on using the changeset viewer.