Make WordPress Core

Changeset 34375


Ignore:
Timestamp:
09/22/2015 04:20:41 AM (9 years ago)
Author:
wonderboymusic
Message:

Multisite: as a precaution, make wp-json a reserved subdirectory name.

Props austinginder.
Fixes #33789.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-new.php

    r34265 r34375  
    4848    if ( ! is_subdomain_install() ) {
    4949        /** This filter is documented in wp-includes/ms-functions.php */
    50         $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) );
     50        $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes', 'wp-json' ) );
    5151        if ( in_array( $domain, $subdirectory_reserved_names ) )
    5252            wp_die( sprintf( __('The following words are reserved for use by WordPress functions and cannot be used as blog names: <code>%s</code>' ), implode( '</code>, <code>', $subdirectory_reserved_names ) ) );
  • trunk/src/wp-includes/ms-functions.php

    r34235 r34375  
    624624             * @param array $subdirectory_reserved_names Array of reserved names.
    625625             */
    626             apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) )
     626            apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes', 'wp-json' ) )
    627627        );
    628628    }
Note: See TracChangeset for help on using the changeset viewer.