diff options
Diffstat (limited to 'src/wp-admin/includes')
-rw-r--r-- | src/wp-admin/includes/ajax-actions.php | 8 | ||||
-rw-r--r-- | src/wp-admin/includes/class-language-pack-upgrader.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-automatic-updater.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-community-events.php | 8 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-debug-data.php | 23 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-filesystem-ftpext.php | 8 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-filesystem-ftpsockets.php | 4 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-list-table.php | 4 | ||||
-rw-r--r-- | src/wp-admin/includes/class-wp-site-health.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/file.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/media.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/misc.php | 4 | ||||
-rw-r--r-- | src/wp-admin/includes/post.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/taxonomy.php | 2 | ||||
-rw-r--r-- | src/wp-admin/includes/update-core.php | 1 |
15 files changed, 48 insertions, 26 deletions
diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 83b682634b..53635479e0 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -5354,7 +5354,7 @@ function wp_ajax_health_check_dotorg_communication() { _doing_it_wrong( 'wp_ajax_health_check_dotorg_communication', sprintf( - // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */ __( 'The Site Health check for %1$s has been replaced with %2$s.' ), 'wp_ajax_health_check_dotorg_communication', 'WP_REST_Site_Health_Controller::test_dotorg_communication' @@ -5387,7 +5387,7 @@ function wp_ajax_health_check_background_updates() { _doing_it_wrong( 'wp_ajax_health_check_background_updates', sprintf( - // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */ __( 'The Site Health check for %1$s has been replaced with %2$s.' ), 'wp_ajax_health_check_background_updates', 'WP_REST_Site_Health_Controller::test_background_updates' @@ -5420,7 +5420,7 @@ function wp_ajax_health_check_loopback_requests() { _doing_it_wrong( 'wp_ajax_health_check_loopback_requests', sprintf( - // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */ __( 'The Site Health check for %1$s has been replaced with %2$s.' ), 'wp_ajax_health_check_loopback_requests', 'WP_REST_Site_Health_Controller::test_loopback_requests' @@ -5470,7 +5470,7 @@ function wp_ajax_health_check_get_sizes() { _doing_it_wrong( 'wp_ajax_health_check_get_sizes', sprintf( - // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */ __( 'The Site Health check for %1$s has been replaced with %2$s.' ), 'wp_ajax_health_check_get_sizes', 'WP_REST_Site_Health_Controller::get_directory_sizes' diff --git a/src/wp-admin/includes/class-language-pack-upgrader.php b/src/wp-admin/includes/class-language-pack-upgrader.php index 6f7cf742bd..89b9f9ac87 100644 --- a/src/wp-admin/includes/class-language-pack-upgrader.php +++ b/src/wp-admin/includes/class-language-pack-upgrader.php @@ -383,7 +383,7 @@ class Language_Pack_Upgrader extends WP_Upgrader { case 'theme': $theme = wp_get_theme( $update->slug ); if ( $theme->exists() ) { - return $theme->Get( 'Name' ); + return $theme->get( 'Name' ); } break; case 'plugin': diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index 4dccd94ccd..2facbeb1d5 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -411,7 +411,7 @@ class WP_Automatic_Updater { case 'theme': $upgrader_item = $item->theme; $theme = wp_get_theme( $upgrader_item ); - $item_name = $theme->Get( 'Name' ); + $item_name = $theme->get( 'Name' ); // Add the current version so that it can be reported in the notification email. $item->current_version = $theme->get( 'Version' ); if ( empty( $item->current_version ) ) { diff --git a/src/wp-admin/includes/class-wp-community-events.php b/src/wp-admin/includes/class-wp-community-events.php index 008611af21..b5a65e298d 100644 --- a/src/wp-admin/includes/class-wp-community-events.php +++ b/src/wp-admin/includes/class-wp-community-events.php @@ -375,17 +375,13 @@ class WP_Community_Events { * of the user who triggered the cache refresh, rather than their own. * * @since 4.8.0 - * @deprecated 5.6.0 No longer used in core. + * @deprecated 5.5.2 No longer used in core. * * @param array $response_body The response which contains the events. * @return array The response with dates and times formatted. */ protected function format_event_data_time( $response_body ) { - _deprecated_function( - __METHOD__, - '5.5.2', - 'This is no longer used by core, and only kept for backward compatibility.' - ); + _deprecated_function( __METHOD__, '5.5.2' ); if ( isset( $response_body['events'] ) ) { foreach ( $response_body['events'] as $key => $event ) { diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index cbb57a4b8c..cd04297684 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -682,6 +682,25 @@ class WP_Debug_Data { ); } + // Get the image format transforms. + $mappings = wp_get_image_editor_output_format( '', '' ); + $formatted_mappings = array(); + + if ( ! empty( $mappings ) ) { + foreach ( $mappings as $format => $mime_type ) { + $formatted_mappings[] = sprintf( '%s → %s', $format, $mime_type ); + } + $mappings_display = implode( ', ', $formatted_mappings ); + } else { + $mappings_display = __( 'No format transforms defined' ); + } + + $fields['image_format_transforms'] = array( + 'label' => __( 'Image format transforms' ), + 'value' => $mappings_display, + 'debug' => ( empty( $mappings ) ) ? 'No format transforms defined' : $mappings_display, + ); + // Get GD information, if available. if ( function_exists( 'gd_info' ) ) { $gd = gd_info(); @@ -1860,10 +1879,14 @@ class WP_Debug_Data { * Intended to supplement the array returned by `WP_Debug_Data::debug_data()`. * * @since 5.2.0 + * @deprecated 5.6.0 Use WP_REST_Site_Health_Controller::get_directory_sizes() + * @see WP_REST_Site_Health_Controller::get_directory_sizes() * * @return array The sizes of the directories, also the database size and total installation size. */ public static function get_sizes() { + _deprecated_function( __METHOD__, '5.6.0', 'WP_REST_Site_Health_Controller::get_directory_sizes()' ); + $size_db = self::get_database_size(); $upload_dir = wp_get_upload_dir(); diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php index 454998822e..7c721734c3 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -601,9 +601,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { } /** - * @param string $line - * @return array { - * Array of file information. + * Parses an individual entry from the FTP LIST command output. + * + * @param string $line A line from the directory listing. + * @return array|string { + * Array of file information. Empty string if the line could not be parsed. * * @type string $name Name of the file or directory. * @type string $perms *nix representation of permissions. diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 9a37d88c11..986fccf2cf 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -77,7 +77,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return false; } - $this->ftp->setTimeout( FS_CONNECT_TIMEOUT ); + $this->ftp->SetTimeout( FS_CONNECT_TIMEOUT ); if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) { $this->errors->add( @@ -120,7 +120,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $this->ftp->SetType( FTP_BINARY ); $this->ftp->Passive( true ); - $this->ftp->setTimeout( FS_TIMEOUT ); + $this->ftp->SetTimeout( FS_TIMEOUT ); return true; } diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index 5a7fa0db8e..cdf31db597 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -72,10 +72,10 @@ class WP_List_Table { protected $modes = array(); /** - * Stores the value returned by ->get_column_info(). + * Stores the value returned by ::get_column_info(). * * @since 4.1.0 - * @var array + * @var array|null */ protected $_column_headers; diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index afcbfcb6f9..b7847d5e31 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -18,7 +18,7 @@ class WP_Site_Health { private $mysql_server_version = ''; private $mysql_required_version = '5.5'; private $mysql_recommended_version = '8.0'; - private $mariadb_recommended_version = '10.5'; + private $mariadb_recommended_version = '10.6'; public $php_memory_limit; diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 40059273ba..0658662126 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -2622,7 +2622,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false, <?php if ( isset( $types['ssh'] ) ) { $hidden_class = ''; - if ( 'ssh' !== $connection_type || empty( $connection_type ) ) { + if ( 'ssh' !== $connection_type ) { $hidden_class = ' class="hidden"'; } ?> diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 5c0b5d0b38..7d9fd638fb 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -3337,7 +3337,7 @@ function attachment_submitbox_metadata() { $uploaded_by_link = get_edit_user_link( $author->ID ); } ?> - <div class="misc-pub-section misc-pub-uploadedby"> + <div class="misc-pub-section misc-pub-uploadedby word-wrap-break-word"> <?php if ( $uploaded_by_link ) { ?> <?php _e( 'Uploaded by:' ); ?> <a href="<?php echo $uploaded_by_link; ?>"><strong><?php echo $uploaded_by_name; ?></strong></a> <?php } else { ?> diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index 979d237448..ff073b0fd3 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -988,7 +988,7 @@ function saveDomDocument( $doc, $filename ) { // phpcs:ignore WordPress.NamingCo } /** - * Displays the default admin color scheme picker (Used in user-edit.php). + * Displays the default administration color scheme picker (Used in user-edit.php). * * @since 3.0.0 * @@ -1025,7 +1025,7 @@ function admin_color_scheme_picker( $user_id ) { <legend class="screen-reader-text"><span> <?php /* translators: Hidden accessibility text. */ - _e( 'Admin Color Scheme' ); + _e( 'Administration Color Scheme' ); ?> </span></legend> <?php diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 40fac43d6e..ebdd61df34 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -2186,7 +2186,7 @@ function wp_autosave( $post_data ) { * * @param int $post_id Optional. Post ID. */ -function redirect_post( $post_id = '' ) { +function redirect_post( $post_id = 0 ) { if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ) { $status = get_post_status( $post_id ); diff --git a/src/wp-admin/includes/taxonomy.php b/src/wp-admin/includes/taxonomy.php index 7765084fa7..359cfafe2f 100644 --- a/src/wp-admin/includes/taxonomy.php +++ b/src/wp-admin/includes/taxonomy.php @@ -75,7 +75,7 @@ function wp_create_category( $cat_name, $category_parent = 0 ) { * @param int $post_id Optional. The post ID. Default empty. * @return int[] Array of IDs of categories assigned to the given post. */ -function wp_create_categories( $categories, $post_id = '' ) { +function wp_create_categories( $categories, $post_id = 0 ) { $cat_ids = array(); foreach ( $categories as $category ) { $id = category_exists( $category ); diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php index f1731f9c8f..2d925afa63 100644 --- a/src/wp-admin/includes/update-core.php +++ b/src/wp-admin/includes/update-core.php @@ -1023,6 +1023,7 @@ $_new_bundled_files = array( * @global string[] $_old_requests_files * @global string[] $_new_bundled_files * @global wpdb $wpdb WordPress database abstraction object. + * @global string $wp_version The WordPress version string. * * @param string $from New release unzipped path. * @param string $to Path to old WordPress installation. |