WordPress.org

Make WordPress Core

Ticket #33615: 33615-directory-fix.patch

File 33615-directory-fix.patch, 1.0 KB (added by austinginder, 4 years ago)
  • src/wp-admin/network/site-new.php

    diff --git src/wp-admin/network/site-new.php src/wp-admin/network/site-new.php
    index 4d8d444..5876037 100644
    if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) { 
    4747        // If not a subdomain install, make sure the domain isn't a reserved word
    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' ) );
     50                $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) );
    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 ) ) );
    5353        }