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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36416 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
ericlewis
2016-01-28 03:34:02 +00:00
parent 7c1854aeb0
commit 3fde994152
20 changed files with 65 additions and 66 deletions

View File

@@ -84,7 +84,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
/*
* If the network is large and a search is not being performed, show only
* the latest blogs with no paging in order to avoid expensive count queries.
* the latest sites with no paging in order to avoid expensive count queries.
*/
if ( !$s && wp_is_large_network() ) {
if ( !isset($_REQUEST['orderby']) )
@@ -272,14 +272,14 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
}
/**
* Handles the blogname column output.
* Handles the site name column output.
*
* @since 4.3.0
* @access public
*
* @global string $mode
*
* @param array $blog Current blog.
* @param array $blog Current site.
*/
public function column_blogname( $blog ) {
global $mode;
@@ -469,7 +469,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
* @since 4.3.0
* @access protected
*
* @param object $blog Blog being acted upon.
* @param object $blog Site being acted upon.
* @param string $column_name Current column name.
* @param string $primary Primary column name.
* @return string Row actions output.

View File

@@ -304,7 +304,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
}
/**
* Handles the blogs/sites column output.
* Handles the sites column output.
*
* @since 4.3.0
* @access public

View File

@@ -983,7 +983,7 @@ function add_contextual_help( $screen, $help ) {
}
/**
* Get the allowed themes for the current blog.
* Get the allowed themes for the current site.
*
* @since 3.0.0
* @deprecated 3.4.0 Use wp_get_themes()

View File

@@ -48,14 +48,14 @@ function check_upload_size( $file ) {
}
/**
* Delete a blog.
* Delete a site.
*
* @since 3.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $blog_id Blog ID.
* @param bool $drop True if blog's table should be dropped. Default is false.
* @param int $blog_id Site ID.
* @param bool $drop True if site's database tables should be dropped. Default is false.
*/
function wpmu_delete_blog( $blog_id, $drop = false ) {
global $wpdb;
@@ -68,12 +68,12 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
$blog = get_blog_details( $blog_id );
/**
* Fires before a blog is deleted.
* Fires before a site is deleted.
*
* @since MU
*
* @param int $blog_id The blog ID.
* @param bool $drop True if blog's table should be dropped. Default is false.
* @param int $blog_id The site ID.
* @param bool $drop True if site's table should be dropped. Default is false.
*/
do_action( 'delete_blog', $blog_id, $drop );
@@ -112,12 +112,12 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
$tables = $wpdb->tables( 'blog' );
/**
* Filter the tables to drop when the blog is deleted.
* Filter the tables to drop when the site is deleted.
*
* @since MU
*
* @param array $tables The blog tables to be dropped.
* @param int $blog_id The ID of the blog to drop tables for.
* @param array $tables The site tables to be dropped.
* @param int $blog_id The ID of the site to drop tables for.
*/
$drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $blog_id );
@@ -128,12 +128,12 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
$wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) );
/**
* Filter the upload base directory to delete when the blog is deleted.
* Filter the upload base directory to delete when the site is deleted.
*
* @since MU
*
* @param string $uploads['basedir'] Uploads path without subdirectory. @see wp_upload_dir()
* @param int $blog_id The blog ID.
* @param int $blog_id The site ID.
*/
$dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id );
$dir = rtrim( $dir, DIRECTORY_SEPARATOR );
@@ -410,7 +410,7 @@ function new_user_email_admin_notice() {
}
/**
* Check whether a blog has used its allotted upload space.
* Check whether a site has used its allotted upload space.
*
* @since MU
*
@@ -437,7 +437,7 @@ function upload_is_user_over_quota( $echo = true ) {
}
/**
* Displays the amount of disk space used by the current blog. Not used in core.
* Displays the amount of disk space used by the current site. Not used in core.
*
* @since MU
*/
@@ -462,7 +462,7 @@ function display_space_usage() {
}
/**
* Get the remaining upload space for this blog.
* Get the remaining upload space for this site.
*
* @since MU
*
@@ -478,11 +478,11 @@ function fix_import_form_size( $size ) {
}
/**
* Displays the edit blog upload space setting form on the Edit Blog screen.
* Displays the site upload space quota setting form on the Edit Site Settings screen.
*
* @since 3.0.0
*
* @param int $id The ID of the blog to display the setting for.
* @param int $id The ID of the site to display the setting for.
*/
function upload_space_setting( $id ) {
switch_to_blog( $id );

View File

@@ -131,11 +131,11 @@ function options_reading_add_js() {
}
/**
* Render the blog charset setting.
* Render the site charset setting.
*
* @since 3.5.0
*/
function options_reading_blog_charset() {
echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
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>';
}
}

View File

@@ -30,7 +30,7 @@ $charset_collate = $wpdb->get_charset_collate();
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all.
* @param int $blog_id Optional. The blog ID for which to retrieve SQL. Default is the current blog ID.
* @param int $blog_id Optional. The site ID for which to retrieve SQL. Default is the current site ID.
* @return string The SQL needed to create the requested tables.
*/
function wp_get_db_schema( $scope = 'all', $blog_id = null ) {
@@ -397,7 +397,7 @@ function populate_options() {
'siteurl' => $guessurl,
'home' => $guessurl,
'blogname' => __('My Site'),
/* translators: blog tagline */
/* translators: site tagline */
'blogdescription' => __('Just another WordPress site'),
'users_can_register' => 0,
'admin_email' => 'you@example.com',
@@ -529,7 +529,7 @@ function populate_options() {
// 3.0 multisite
if ( is_multisite() ) {
/* translators: blog tagline */
/* translators: site tagline */
$options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_current_site()->site_name );
$options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
}

View File

@@ -27,10 +27,10 @@ if ( !function_exists('wp_install') ) :
*
* @since 2.1.0
*
* @param string $blog_title Blog title.
* @param string $blog_title Site title.
* @param string $user_name User's username.
* @param string $user_email User's email.
* @param bool $public Whether blog is public.
* @param bool $public Whether site is public.
* @param string $deprecated Optional. Not used.
* @param string $user_password Optional. User's chosen password. Default empty (random password).
* @param string $language Optional. Language chosen. Default empty.
@@ -64,7 +64,7 @@ function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated
/*
* Create default user. If the user already exists, the user tables are
* being shared among blogs. Just set the role in that case.
* being shared among sites. Just set the role in that case.
*/
$user_id = username_exists($user_name);
$user_password = trim($user_password);
@@ -359,8 +359,8 @@ if ( !function_exists('wp_new_blog_notification') ) :
*
* @since 2.1.0
*
* @param string $blog_title Blog title.
* @param string $blog_url Blog url.
* @param string $blog_title Site title.
* @param string $blog_url Site url.
* @param int $user_id User ID.
* @param string $password User's Password.
*/

View File

@@ -92,7 +92,7 @@ switch ( $action ) {
*
* @since MU
*
* @param int $blog_id The id of the blog.
* @param int $blog_id The Site ID.
*/
do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
}