mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01:00
Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/upgrade.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names. This commit renames the `$public` parameter to `$is_public` in `wp_install()`. Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220]. Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #55327. Built from https://develop.svn.wordpress.org/trunk@53230 git-svn-id: http://core.svn.wordpress.org/trunk@52819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3d7603869b
commit
91ad9dbb07
@ -31,7 +31,7 @@ if ( ! function_exists( 'wp_install' ) ) :
|
||||
* @param string $blog_title Site title.
|
||||
* @param string $user_name User's username.
|
||||
* @param string $user_email User's email.
|
||||
* @param bool $public Whether site is public.
|
||||
* @param bool $is_public Whether the 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.
|
||||
@ -44,7 +44,7 @@ if ( ! function_exists( 'wp_install' ) ) :
|
||||
* @type string $password_message The explanatory message regarding the password.
|
||||
* }
|
||||
*/
|
||||
function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '', $language = '' ) {
|
||||
function wp_install( $blog_title, $user_name, $user_email, $is_public, $deprecated = '', $user_password = '', $language = '' ) {
|
||||
if ( ! empty( $deprecated ) ) {
|
||||
_deprecated_argument( __FUNCTION__, '2.6.0' );
|
||||
}
|
||||
@ -57,7 +57,7 @@ if ( ! function_exists( 'wp_install' ) ) :
|
||||
|
||||
update_option( 'blogname', $blog_title );
|
||||
update_option( 'admin_email', $user_email );
|
||||
update_option( 'blog_public', $public );
|
||||
update_option( 'blog_public', $is_public );
|
||||
|
||||
// Freshness of site - in the future, this could get more specific about actions taken, perhaps.
|
||||
update_option( 'fresh_site', 1 );
|
||||
@ -71,7 +71,7 @@ if ( ! function_exists( 'wp_install' ) ) :
|
||||
update_option( 'siteurl', $guessurl );
|
||||
|
||||
// If not a public site, don't ping.
|
||||
if ( ! $public ) {
|
||||
if ( ! $is_public ) {
|
||||
update_option( 'default_pingback_flag', 0 );
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-beta2-53229';
|
||||
$wp_version = '6.0-beta2-53230';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user