WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (17 months ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r45580 r45590  
    20252025 */
    20262026function maybe_redirect_404() {
    2027     /**
    2028      * Filters the redirect URL for 404s on the main site.
    2029      *
    2030      * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
    2031      *
    2032      * @since 3.0.0
    2033      *
    2034      * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
    2035      */
    2036     if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT ) ) ) {
    2037         if ( $destination == '%siteurl%' ) {
    2038             $destination = network_home_url();
     2027    if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) ) {
     2028        /**
     2029         * Filters the redirect URL for 404s on the main site.
     2030         *
     2031         * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
     2032         *
     2033         * @since 3.0.0
     2034         *
     2035         * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
     2036         */
     2037        $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT );
     2038        if ( $destination ) {
     2039            if ( $destination == '%siteurl%' ) {
     2040                $destination = network_home_url();
     2041            }
     2042            wp_redirect( $destination );
     2043            exit();
    20392044        }
    2040         wp_redirect( $destination );
    2041         exit();
    20422045    }
    20432046}
Note: See TracChangeset for help on using the changeset viewer.