Make WordPress Core

Ticket #35417: 35417.2.diff

File 35417.2.diff, 20.7 KB (added by ericlewis, 8 years ago)
  • src/wp-activate.php

     
    11<?php
    22/**
    33 * Confirms that the activation key that is sent in an email after a user signs
    4  * up for a new blog matches the key for that user and then displays confirmation.
     4 * up for a new site matches the key for that user and then displays confirmation.
    55 *
    66 * @package WordPress
    77 */
     
    117117                        </div>
    118118
    119119                        <?php if ( $url && $url != network_home_url( '', 'http' ) ) :
    120                                 switch_to_blog( (int) $result['blog_id'] ); 
    121                                 $login_url = wp_login_url(); 
    122                                 restore_current_blog(); 
     120                                switch_to_blog( (int) $result['blog_id'] );
     121                                $login_url = wp_login_url();
     122                                restore_current_blog();
    123123                                ?>
    124124                                <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) ); ?></p>
    125125                        <?php else: ?>
  • src/wp-admin/includes/class-wp-ms-sites-list-table.php

     
    8484
    8585                /*
    8686                 * If the network is large and a search is not being performed, show only
    87                  * the latest blogs with no paging in order to avoid expensive count queries.
     87                 * the latest sites with no paging in order to avoid expensive count queries.
    8888                 */
    8989                if ( !$s && wp_is_large_network() ) {
    9090                        if ( !isset($_REQUEST['orderby']) )
     
    272272        }
    273273
    274274        /**
    275          * Handles the blogname column output.
     275         * Handles the site name column output.
    276276         *
    277277         * @since 4.3.0
    278278         * @access public
     
    279279         *
    280280         * @global string $mode
    281281         *
    282          * @param array $blog Current blog.
     282         * @param array $blog Current site.
    283283         */
    284284        public function column_blogname( $blog ) {
    285285                global $mode;
     
    469469         * @since 4.3.0
    470470         * @access protected
    471471         *
    472          * @param object $blog        Blog being acted upon.
     472         * @param object $blog        Site being acted upon.
    473473         * @param string $column_name Current column name.
    474474         * @param string $primary     Primary column name.
    475475         * @return string Row actions output.
  • src/wp-admin/includes/class-wp-ms-users-list-table.php

     
    304304        }
    305305
    306306        /**
    307          * Handles the blogs/sites column output.
     307         * Handles the sites column output.
    308308         *
    309309         * @since 4.3.0
    310310         * @access public
  • src/wp-admin/includes/deprecated.php

     
    983983}
    984984
    985985/**
    986  * Get the allowed themes for the current blog.
     986 * Get the allowed themes for the current site.
    987987 *
    988988 * @since 3.0.0
    989989 * @deprecated 3.4.0 Use wp_get_themes()
  • src/wp-admin/includes/ms.php

     
    4848}
    4949
    5050/**
    51  * Delete a blog.
     51 * Delete a site.
    5252 *
    5353 * @since 3.0.0
    5454 *
    5555 * @global wpdb $wpdb WordPress database abstraction object.
    5656 *
    57  * @param int  $blog_id Blog ID.
    58  * @param bool $drop    True if blog's table should be dropped. Default is false.
     57 * @param int  $blog_id Site ID.
     58 * @param bool $drop    True if site's table should be dropped. Default is false.
    5959 */
    6060function wpmu_delete_blog( $blog_id, $drop = false ) {
    6161        global $wpdb;
     
    6868
    6969        $blog = get_blog_details( $blog_id );
    7070        /**
    71          * Fires before a blog is deleted.
     71         * Fires before a site is deleted.
    7272         *
    7373         * @since MU
    7474         *
    75          * @param int  $blog_id The blog ID.
    76          * @param bool $drop    True if blog's table should be dropped. Default is false.
     75         * @param int  $blog_id The site ID.
     76         * @param bool $drop    True if site's table should be dropped. Default is false.
    7777         */
    7878        do_action( 'delete_blog', $blog_id, $drop );
    7979
     
    112112
    113113                $tables = $wpdb->tables( 'blog' );
    114114                /**
    115                  * Filter the tables to drop when the blog is deleted.
     115                 * Filter the tables to drop when the site is deleted.
    116116                 *
    117117                 * @since MU
    118118                 *
    119                  * @param array $tables  The blog tables to be dropped.
    120                  * @param int   $blog_id The ID of the blog to drop tables for.
     119                 * @param array $tables  The site tables to be dropped.
     120                 * @param int   $blog_id The ID of the site to drop tables for.
    121121                 */
    122122                $drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $blog_id );
    123123
     
    128128                $wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) );
    129129
    130130                /**
    131                  * Filter the upload base directory to delete when the blog is deleted.
     131                 * Filter the upload base directory to delete when the site is deleted.
    132132                 *
    133133                 * @since MU
    134134                 *
    135135                 * @param string $uploads['basedir'] Uploads path without subdirectory. @see wp_upload_dir()
    136                  * @param int    $blog_id            The blog ID.
     136                 * @param int    $blog_id            The site ID.
    137137                 */
    138138                $dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id );
    139139                $dir = rtrim( $dir, DIRECTORY_SEPARATOR );
     
    410410}
    411411
    412412/**
    413  * Check whether a blog has used its allotted upload space.
     413 * Check whether a site has used its allotted upload space.
    414414 *
    415415 * @since MU
    416416 *
     
    437437}
    438438
    439439/**
    440  * Displays the amount of disk space used by the current blog. Not used in core.
     440 * Displays the amount of disk space used by the current site. Not used in core.
    441441 *
    442442 * @since MU
    443443 */
     
    462462}
    463463
    464464/**
    465  * Get the remaining upload space for this blog.
     465 * Get the remaining upload space for this site.
    466466 *
    467467 * @since MU
    468468 *
     
    478478}
    479479
    480480/**
    481  * Displays the edit blog upload space setting form on the Edit Blog screen.
     481 * Displays the site upload space quota setting form on the Edit Site Settings screen.
    482482 *
    483483 * @since 3.0.0
    484484 *
    485  * @param int $id The ID of the blog to display the setting for.
     485 * @param int $id The ID of the site to display the setting for.
    486486 */
    487487function upload_space_setting( $id ) {
    488488        switch_to_blog( $id );
  • src/wp-admin/includes/options.php

     
    131131}
    132132
    133133/**
    134  * Render the blog charset setting.
     134 * Render the site charset setting.
    135135 *
    136136 * @since 3.5.0
    137137 */
     
    138138function options_reading_blog_charset() {
    139139        echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
    140140        echo '<p class="description">' . __( 'The <a href="https://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your site (UTF-8 is recommended)' ) . '</p>';
    141 }
    142  No newline at end of file
     141}
  • src/wp-admin/includes/schema.php

     
    3030 * @global wpdb $wpdb WordPress database abstraction object.
    3131 *
    3232 * @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all.
    33  * @param int $blog_id Optional. The blog ID for which to retrieve SQL. Default is the current blog ID.
     33 * @param int $blog_id Optional. The site ID for which to retrieve SQL. Default is the current site ID.
    3434 * @return string The SQL needed to create the requested tables.
    3535 */
    3636function wp_get_db_schema( $scope = 'all', $blog_id = null ) {
     
    397397        'siteurl' => $guessurl,
    398398        'home' => $guessurl,
    399399        'blogname' => __('My Site'),
    400         /* translators: blog tagline */
     400        /* translators: site tagline */
    401401        'blogdescription' => __('Just another WordPress site'),
    402402        'users_can_register' => 0,
    403403        'admin_email' => 'you@example.com',
     
    529529
    530530        // 3.0 multisite
    531531        if ( is_multisite() ) {
    532                 /* translators: blog tagline */
     532                /* translators: site tagline */
    533533                $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_current_site()->site_name );
    534534                $options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
    535535        }
  • src/wp-admin/includes/upgrade.php

     
    2727 *
    2828 * @since 2.1.0
    2929 *
    30  * @param string $blog_title    Blog title.
     30 * @param string $blog_title    Site title.
    3131 * @param string $user_name     User's username.
    3232 * @param string $user_email    User's email.
    33  * @param bool   $public        Whether blog is public.
     33 * @param bool   $public        Whether site is public.
    3434 * @param string $deprecated    Optional. Not used.
    3535 * @param string $user_password Optional. User's chosen password. Default empty (random password).
    3636 * @param string $language      Optional. Language chosen. Default empty.
     
    6464
    6565        /*
    6666         * Create default user. If the user already exists, the user tables are
    67          * being shared among blogs. Just set the role in that case.
     67         * being shared among sites. Just set the role in that case.
    6868         */
    6969        $user_id = username_exists($user_name);
    7070        $user_password = trim($user_password);
     
    359359 *
    360360 * @since 2.1.0
    361361 *
    362  * @param string $blog_title Blog title.
    363  * @param string $blog_url   Blog url.
     362 * @param string $blog_title Site title.
     363 * @param string $blog_url   Site url.
    364364 * @param int    $user_id    User ID.
    365365 * @param string $password   User's Password.
    366366 */
  • src/wp-admin/network/upgrade.php

     
    9292                         *
    9393                         * @since MU
    9494                         *
    95                          * @param int $blog_id The id of the blog.
     95                         * @param int $blog_id The Site ID.
    9696                         */
    9797                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
    9898                }
  • src/wp-includes/cache.php

     
    209209 * @see WP_Object_Cache::switch_to_blog()
    210210 * @global WP_Object_Cache $wp_object_cache Object cache global instance.
    211211 *
    212  * @param int $blog_id Blog ID.
     212 * @param int $blog_id Site ID.
    213213 */
    214214function wp_cache_switch_to_blog( $blog_id ) {
    215215        global $wp_object_cache;
  • src/wp-includes/capabilities.php

     
    435435}
    436436
    437437/**
    438  * Whether current user has a capability or role for a given blog.
     438 * Whether current user has a capability or role for a given site.
    439439 *
    440440 * @since 3.0.0
    441441 *
    442  * @param int $blog_id Blog ID
     442 * @param int    $blog_id    Site ID.
    443443 * @param string $capability Capability or role name.
    444444 * @return bool
    445445 */
  • src/wp-includes/class-http.php

     
    685685         * prevent plugins from working and core functionality, if you don't include api.wordpress.org.
    686686         *
    687687         * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true in your wp-config.php
    688          * file and this will only allow localhost and your blog to make requests. The constant
     688         * file and this will only allow localhost and your site to make requests. The constant
    689689         * WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
    690690         * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow, wildcard domains
    691691         * are supported, eg *.wordpress.org will allow for all subdomains of wordpress.org to be contacted.
  • src/wp-includes/class-wp-customize-setting.php

     
    207207        }
    208208
    209209        /**
    210          * The ID for the current blog when the preview() method was called.
     210         * The ID for the current site when the preview() method was called.
    211211         *
    212212         * @since 4.2.0
    213213         * @access protected
     
    216216        protected $_previewed_blog_id;
    217217
    218218        /**
    219          * Return true if the current blog is not the same as the previewed blog.
     219         * Return true if the current site is not the same as the previewed site.
    220220         *
    221221         * @since 4.2.0
    222222         * @access public
     
    374374         * Callback function to filter non-multidimensional theme mods and options.
    375375         *
    376376         * If switch_to_blog() was called after the preview() method, and the current
    377          * blog is now not the same blog, then this method does a no-op and returns
     377         * site is now not the same site, then this method does a no-op and returns
    378378         * the original value.
    379379         *
    380380         * @since 3.4.0
  • src/wp-includes/class-wp-http-proxy.php

     
    2424 * <li>WP_PROXY_USERNAME - Proxy username, if it requires authentication.</li>
    2525 * <li>WP_PROXY_PASSWORD - Proxy password, if it requires authentication.</li>
    2626 * <li>WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy.
    27  * You do not need to have localhost and the blog host in this list, because they will not be passed
     27 * You do not need to have localhost and the site host in this list, because they will not be passed
    2828 * through the proxy. The list should be presented in a comma separated list, wildcards using * are supported, eg. *.wordpress.org</li>
    2929 * </ol>
    3030 *
     
    150150        /**
    151151         * Whether URL should be sent through the proxy server.
    152152         *
    153          * We want to keep localhost and the blog URL from being sent through the proxy server, because
     153         * We want to keep localhost and the site URL from being sent through the proxy server, because
    154154         * some proxies can not handle this. We also have the constant available for defining other
    155155         * hosts that won't be sent through the proxy.
    156156         *
     
    165165        public function send_through_proxy( $uri ) {
    166166                /*
    167167                 * parse_url() only handles http, https type URLs, and will emit E_WARNING on failure.
    168                  * This will be displayed on blogs, which is not reasonable.
     168                 * This will be displayed on sites, which is not reasonable.
    169169                 */
    170170                $check = @parse_url($uri);
    171171
  • src/wp-includes/class-wp-roles.php

     
    133133         * Reinitialize the object
    134134         *
    135135         * Recreates the role objects. This is typically called only by switch_to_blog()
    136          * after switching wpdb to a new blog ID.
     136         * after switching wpdb to a new site ID.
    137137         *
    138138         * @since 3.5.0
    139139         * @access public
  • src/wp-includes/class-wp-theme.php

     
    11301130         *
    11311131         * @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site'
    11321132         *      settings, or 'both'. Defaults to 'both'.
    1133          * @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current blog.
     1133         * @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site.
    11341134         * @return bool Whether the theme is allowed for the network. Returns true in single-site.
    11351135         */
    11361136        public function is_allowed( $check = 'both', $blog_id = null ) {
  • src/wp-includes/class-wp-user.php

     
    157157        /**
    158158         * Sets up object properties, including capabilities.
    159159         *
    160          * @param object $data User DB row object
    161          * @param int $blog_id Optional. The blog id to initialize for
     160         * @param object $data    User DB row object.
     161         * @param int    $blog_id Optional. The site ID to initialize for.
    162162         */
    163163        public function init( $data, $blog_id = '' ) {
    164164                $this->data = $data;
  • src/wp-includes/comment-template.php

     
    102102 *
    103103 * Care should be taken to protect the email address and assure that email
    104104 * harvesters do not capture your commentors' email address. Most assume that
    105  * their email address will not appear in raw form on the blog. Doing so will
     105 * their email address will not appear in raw form on the site. Doing so will
    106106 * enable anyone, including those that people don't want to get the email
    107107 * address and use it for their own means good and bad.
    108108 *
     
    133133 *
    134134 * Care should be taken to protect the email address and assure that email
    135135 * harvesters do not capture your commentors' email address. Most assume that
    136  * their email address will not appear in raw form on the blog. Doing so will
     136 * their email address will not appear in raw form on the site. Doing so will
    137137 * enable anyone, including those that people don't want to get the email
    138138 * address and use it for their own means good and bad.
    139139 *
     
    154154 *
    155155 * Care should be taken to protect the email address and assure that email
    156156 * harvesters do not capture your commentors' email address. Most assume that
    157  * their email address will not appear in raw form on the blog. Doing so will
     157 * their email address will not appear in raw form on the site. Doing so will
    158158 * enable anyone, including those that people don't want to get the email
    159159 * address and use it for their own means good and bad.
    160160 *
     
    12411241 * @global int        $user_ID
    12421242 * @global string     $user_identity
    12431243 * @global bool       $overridden_cpage
    1244  * @global bool       $withcomments 
     1244 * @global bool       $withcomments
    12451245 *
    12461246 * @param string $file              Optional. The file to load. Default '/comments.php'.
    12471247 * @param bool   $separate_comments Optional. Whether to separate the comments by comment type.
  • src/wp-includes/deprecated.php

     
    23472347}
    23482348
    23492349/**
    2350  * Get users for the blog.
     2350 * Get users for the site.
    23512351 *
    2352  * For setups that use the multi-blog feature. Can be used outside of the
    2353  * multi-blog feature.
     2352 * For setups that use the multi-site feature. Can be used outside of the
     2353 * multi-site feature.
    23542354 *
    23552355 * @since 2.2.0
    23562356 * @deprecated 3.1.0 Use get_users()
     
    23572357 * @see get_users()
    23582358 *
    23592359 * @global wpdb $wpdb    WordPress database abstraction object.
    2360  * @global int  $blog_id The Blog id of the blog for those that use more than one blog
     2360 * @global int  $blog_id The site id of the site for those that use more than one site.
    23612361 *
    2362  * @param int $id Blog ID.
    2363  * @return array List of users that are part of that Blog ID
     2362 * @param int $id Site ID.
     2363 * @return array List of users that are part of that site ID
    23642364 */
    23652365function get_users_of_blog( $id = '' ) {
    23662366        _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
     
    27932793}
    27942794
    27952795/**
    2796  * Checks if the current user belong to a given blog.
     2796 * Checks if the current user belong to a given site.
    27972797 *
    27982798 * @since MU
    27992799 * @deprecated 3.3.0 Use is_user_member_of_blog()
    28002800 * @see is_user_member_of_blog()
    28012801 *
    2802  * @param int $blog_id Blog ID
     2802 * @param int $blog_id Site ID
    28032803 * @return bool True if the current users belong to $blog_id, false if not.
    28042804 */
    28052805function is_blog_user( $blog_id = 0 ) {
  • src/wp-includes/ms-blogs.php

     
    99 */
    1010
    1111/**
    12  * Update the last_updated field for the current blog.
     12 * Update the last_updated field for the current site.
    1313 *
    1414 * @since MU
    1515 *
     
    2424         *
    2525         * @since MU
    2626         *
    27          * @param int $blog_id Blog ID.
     27         * @param int $blog_id Site ID.
    2828         */
    2929        do_action( 'wpmu_blog_updated', $wpdb->blogid );
    3030}
     
    991991
    992992        update_posts_count();
    993993}
    994