mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-31 12:41:23 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@36416 git-svn-id: http://core.svn.wordpress.org/trunk@36383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af34d4f296
commit
22467e840f
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Confirms that the activation key that is sent in an email after a user signs
|
||||
* up for a new blog matches the key for that user and then displays confirmation.
|
||||
* up for a new site matches the key for that user and then displays confirmation.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
@ -117,9 +117,9 @@ get_header( 'wp-activate' );
|
||||
</div>
|
||||
|
||||
<?php if ( $url && $url != network_home_url( '', 'http' ) ) :
|
||||
switch_to_blog( (int) $result['blog_id'] );
|
||||
$login_url = wp_login_url();
|
||||
restore_current_blog();
|
||||
switch_to_blog( (int) $result['blog_id'] );
|
||||
$login_url = wp_login_url();
|
||||
restore_current_blog();
|
||||
?>
|
||||
<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>
|
||||
<?php else: ?>
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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 );
|
||||
|
@ -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>';
|
||||
}
|
||||
}
|
||||
|
@ -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%/';
|
||||
}
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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' ] );
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
|
||||
* @see WP_Object_Cache::switch_to_blog()
|
||||
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
||||
*
|
||||
* @param int $blog_id Blog ID.
|
||||
* @param int $blog_id Site ID.
|
||||
*/
|
||||
function wp_cache_switch_to_blog( $blog_id ) {
|
||||
global $wp_object_cache;
|
||||
|
@ -435,11 +435,11 @@ function current_user_can( $capability ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether current user has a capability or role for a given blog.
|
||||
* Whether current user has a capability or role for a given site.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param int $blog_id Blog ID
|
||||
* @param int $blog_id Site ID.
|
||||
* @param string $capability Capability or role name.
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -685,7 +685,7 @@ class WP_Http {
|
||||
* prevent plugins from working and core functionality, if you don't include api.wordpress.org.
|
||||
*
|
||||
* You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true in your wp-config.php
|
||||
* file and this will only allow localhost and your blog to make requests. The constant
|
||||
* file and this will only allow localhost and your site to make requests. The constant
|
||||
* WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
|
||||
* WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow, wildcard domains
|
||||
* are supported, eg *.wordpress.org will allow for all subdomains of wordpress.org to be contacted.
|
||||
|
@ -207,7 +207,7 @@ class WP_Customize_Setting {
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID for the current blog when the preview() method was called.
|
||||
* The ID for the current site when the preview() method was called.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access protected
|
||||
@ -216,7 +216,7 @@ class WP_Customize_Setting {
|
||||
protected $_previewed_blog_id;
|
||||
|
||||
/**
|
||||
* Return true if the current blog is not the same as the previewed blog.
|
||||
* Return true if the current site is not the same as the previewed site.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
@ -374,7 +374,7 @@ class WP_Customize_Setting {
|
||||
* Callback function to filter non-multidimensional theme mods and options.
|
||||
*
|
||||
* If switch_to_blog() was called after the preview() method, and the current
|
||||
* blog is now not the same blog, then this method does a no-op and returns
|
||||
* site is now not the same site, then this method does a no-op and returns
|
||||
* the original value.
|
||||
*
|
||||
* @since 3.4.0
|
||||
|
@ -24,7 +24,7 @@
|
||||
* <li>WP_PROXY_USERNAME - Proxy username, if it requires authentication.</li>
|
||||
* <li>WP_PROXY_PASSWORD - Proxy password, if it requires authentication.</li>
|
||||
* <li>WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy.
|
||||
* You do not need to have localhost and the blog host in this list, because they will not be passed
|
||||
* You do not need to have localhost and the site host in this list, because they will not be passed
|
||||
* through the proxy. The list should be presented in a comma separated list, wildcards using * are supported, eg. *.wordpress.org</li>
|
||||
* </ol>
|
||||
*
|
||||
@ -150,7 +150,7 @@ class WP_HTTP_Proxy {
|
||||
/**
|
||||
* Whether URL should be sent through the proxy server.
|
||||
*
|
||||
* We want to keep localhost and the blog URL from being sent through the proxy server, because
|
||||
* We want to keep localhost and the site URL from being sent through the proxy server, because
|
||||
* some proxies can not handle this. We also have the constant available for defining other
|
||||
* hosts that won't be sent through the proxy.
|
||||
*
|
||||
@ -165,7 +165,7 @@ class WP_HTTP_Proxy {
|
||||
public function send_through_proxy( $uri ) {
|
||||
/*
|
||||
* parse_url() only handles http, https type URLs, and will emit E_WARNING on failure.
|
||||
* This will be displayed on blogs, which is not reasonable.
|
||||
* This will be displayed on sites, which is not reasonable.
|
||||
*/
|
||||
$check = @parse_url($uri);
|
||||
|
||||
|
@ -133,7 +133,7 @@ class WP_Roles {
|
||||
* Reinitialize the object
|
||||
*
|
||||
* Recreates the role objects. This is typically called only by switch_to_blog()
|
||||
* after switching wpdb to a new blog ID.
|
||||
* after switching wpdb to a new site ID.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
|
@ -1130,7 +1130,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
*
|
||||
* @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site'
|
||||
* settings, or 'both'. Defaults to 'both'.
|
||||
* @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current blog.
|
||||
* @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site.
|
||||
* @return bool Whether the theme is allowed for the network. Returns true in single-site.
|
||||
*/
|
||||
public function is_allowed( $check = 'both', $blog_id = null ) {
|
||||
|
@ -157,8 +157,8 @@ class WP_User {
|
||||
/**
|
||||
* Sets up object properties, including capabilities.
|
||||
*
|
||||
* @param object $data User DB row object
|
||||
* @param int $blog_id Optional. The blog id to initialize for
|
||||
* @param object $data User DB row object.
|
||||
* @param int $blog_id Optional. The site ID to initialize for.
|
||||
*/
|
||||
public function init( $data, $blog_id = '' ) {
|
||||
$this->data = $data;
|
||||
|
@ -102,7 +102,7 @@ function get_comment_author_email( $comment_ID = 0 ) {
|
||||
*
|
||||
* Care should be taken to protect the email address and assure that email
|
||||
* harvesters do not capture your commentors' email address. Most assume that
|
||||
* their email address will not appear in raw form on the blog. Doing so will
|
||||
* their email address will not appear in raw form on the site. Doing so will
|
||||
* enable anyone, including those that people don't want to get the email
|
||||
* address and use it for their own means good and bad.
|
||||
*
|
||||
@ -133,7 +133,7 @@ function comment_author_email( $comment_ID = 0 ) {
|
||||
*
|
||||
* Care should be taken to protect the email address and assure that email
|
||||
* harvesters do not capture your commentors' email address. Most assume that
|
||||
* their email address will not appear in raw form on the blog. Doing so will
|
||||
* their email address will not appear in raw form on the site. Doing so will
|
||||
* enable anyone, including those that people don't want to get the email
|
||||
* address and use it for their own means good and bad.
|
||||
*
|
||||
@ -154,7 +154,7 @@ function comment_author_email_link( $linktext = '', $before = '', $after = '' )
|
||||
*
|
||||
* Care should be taken to protect the email address and assure that email
|
||||
* harvesters do not capture your commentors' email address. Most assume that
|
||||
* their email address will not appear in raw form on the blog. Doing so will
|
||||
* their email address will not appear in raw form on the site. Doing so will
|
||||
* enable anyone, including those that people don't want to get the email
|
||||
* address and use it for their own means good and bad.
|
||||
*
|
||||
@ -1241,7 +1241,7 @@ function wp_comment_form_unfiltered_html_nonce() {
|
||||
* @global int $user_ID
|
||||
* @global string $user_identity
|
||||
* @global bool $overridden_cpage
|
||||
* @global bool $withcomments
|
||||
* @global bool $withcomments
|
||||
*
|
||||
* @param string $file Optional. The file to load. Default '/comments.php'.
|
||||
* @param bool $separate_comments Optional. Whether to separate the comments by comment type.
|
||||
|
@ -2347,20 +2347,20 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users for the blog.
|
||||
* Get users for the site.
|
||||
*
|
||||
* For setups that use the multi-blog feature. Can be used outside of the
|
||||
* multi-blog feature.
|
||||
* For setups that use the multisite feature. Can be used outside of the
|
||||
* multisite feature.
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @deprecated 3.1.0 Use get_users()
|
||||
* @see get_users()
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
* @global int $blog_id The Blog id of the blog for those that use more than one blog
|
||||
* @global int $blog_id The site ID of the site for those that use more than one site.
|
||||
*
|
||||
* @param int $id Blog ID.
|
||||
* @return array List of users that are part of that Blog ID
|
||||
* @param int $id Site ID.
|
||||
* @return array List of users that are part of that site ID
|
||||
*/
|
||||
function get_users_of_blog( $id = '' ) {
|
||||
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
|
||||
@ -2793,13 +2793,13 @@ function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user belong to a given blog.
|
||||
* Checks if the current user belong to a given site.
|
||||
*
|
||||
* @since MU
|
||||
* @deprecated 3.3.0 Use is_user_member_of_blog()
|
||||
* @see is_user_member_of_blog()
|
||||
*
|
||||
* @param int $blog_id Blog ID
|
||||
* @param int $blog_id Site ID
|
||||
* @return bool True if the current users belong to $blog_id, false if not.
|
||||
*/
|
||||
function is_blog_user( $blog_id = 0 ) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Update the last_updated field for the current blog.
|
||||
* Update the last_updated field for the current site.
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
@ -24,7 +24,7 @@ function wpmu_update_blogs_date() {
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
* @param int $blog_id Blog ID.
|
||||
* @param int $blog_id Site ID.
|
||||
*/
|
||||
do_action( 'wpmu_blog_updated', $wpdb->blogid );
|
||||
}
|
||||
@ -991,4 +991,3 @@ function _update_posts_count_on_transition_post_status( $new_status, $old_status
|
||||
|
||||
update_posts_count();
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36415';
|
||||
$wp_version = '4.5-alpha-36416';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user