Make WordPress Core

Changeset 36416


Ignore:
Timestamp:
01/28/2016 03:34:02 AM (9 years ago)
Author:
ericlewis
Message:

Networks and sites: Replace "blog" usage with "site" in docs.

Multisite functions use the term "blog" to refer to what we now call a "site," e.g. get_current_blog_id(). These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

Location:
trunk/src
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-activate.php

    r34882 r36416  
    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
     
    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>
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r35241 r36416  
    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() ) {
     
    273273
    274274    /**
    275      * Handles the blogname column output.
     275     * Handles the site name column output.
    276276     *
    277277     * @since 4.3.0
     
    280280     * @global string $mode
    281281     *
    282      * @param array $blog Current blog.
     282     * @param array $blog Current site.
    283283     */
    284284    public function column_blogname( $blog ) {
     
    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.
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r35241 r36416  
    305305
    306306    /**
    307      * Handles the blogs/sites column output.
     307     * Handles the sites column output.
    308308     *
    309309     * @since 4.3.0
  • trunk/src/wp-admin/includes/deprecated.php

    r36071 r36416  
    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
  • trunk/src/wp-admin/includes/ms.php

    r35885 r36416  
    4949
    5050/**
    51  * Delete a blog.
     51 * Delete a site.
    5252 *
    5353 * @since 3.0.0
     
    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 database tables should be dropped. Default is false.
    5959 */
    6060function wpmu_delete_blog( $blog_id, $drop = false ) {
     
    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 );
     
    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 );
     
    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 );
     
    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
     
    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
     
    463463
    464464/**
    465  * Get the remaining upload space for this blog.
     465 * Get the remaining upload space for this site.
    466466 *
    467467 * @since MU
     
    479479
    480480/**
    481  * Displays the edit blog upload space setting form on the Edit Blog screen.
    482  *
    483  * @since 3.0.0
    484  *
    485  * @param int $id The ID of the blog to display the setting for.
     481 * Displays the site upload space quota setting form on the Edit Site Settings screen.
     482 *
     483 * @since 3.0.0
     484 *
     485 * @param int $id The ID of the site to display the setting for.
    486486 */
    487487function upload_space_setting( $id ) {
  • trunk/src/wp-admin/includes/options.php

    r36263 r36416  
    132132
    133133/**
    134  * Render the blog charset setting.
     134 * Render the site charset setting.
    135135 *
    136136 * @since 3.5.0
  • trunk/src/wp-admin/includes/schema.php

    r36255 r36416  
    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 */
     
    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,
     
    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%/';
  • trunk/src/wp-admin/includes/upgrade.php

    r36180 r36416  
    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).
     
    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);
     
    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.
  • trunk/src/wp-admin/network/upgrade.php

    r35182 r36416  
    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' ] );
  • trunk/src/wp-includes/cache.php

    r36069 r36416  
    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 ) {
  • trunk/src/wp-includes/capabilities.php

    r36316 r36416  
    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
  • trunk/src/wp-includes/class-http.php

    r36367 r36416  
    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
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r35724 r36416  
    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
     
    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
     
    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     *
  • trunk/src/wp-includes/class-wp-http-proxy.php

    r33876 r36416  
    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>
     
    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.
     
    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);
  • trunk/src/wp-includes/class-wp-roles.php

    r35170 r36416  
    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
  • trunk/src/wp-includes/class-wp-theme.php

    r36366 r36416  
    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     */
  • trunk/src/wp-includes/class-wp-user.php

    r35954 r36416  
    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 = '' ) {
  • trunk/src/wp-includes/comment-template.php

    r36343 r36416  
    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.
     
    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.
     
    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.
     
    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'.
  • trunk/src/wp-includes/deprecated.php

    r36111 r36416  
    23482348
    23492349/**
    2350  * Get users for the blog.
    2351  *
    2352  * For setups that use the multi-blog feature. Can be used outside of the
    2353  * multi-blog feature.
     2350 * Get users for the site.
     2351 *
     2352 * For setups that use the multisite feature. Can be used outside of the
     2353 * multisite feature.
    23542354 *
    23552355 * @since 2.2.0
     
    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
    2361  *
    2362  * @param int $id Blog ID.
    2363  * @return array List of users that are part of that Blog ID
     2360 * @global int  $blog_id The site ID of the site for those that use more than one site.
     2361 *
     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 = '' ) {
     
    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
     
    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 */
  • trunk/src/wp-includes/ms-blogs.php

    r36413 r36416  
    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
     
    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 );
     
    992992    update_posts_count();
    993993}
    994 
Note: See TracChangeset for help on using the changeset viewer.