summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-admin/includes
diff options
context:
space:
mode:
Diffstat (limited to 'src/wp-admin/includes')
-rw-r--r--src/wp-admin/includes/class-language-pack-upgrader.php2
-rw-r--r--src/wp-admin/includes/class-wp-automatic-updater.php2
-rw-r--r--src/wp-admin/includes/class-wp-community-events.php8
-rw-r--r--src/wp-admin/includes/class-wp-debug-data.php4
-rw-r--r--src/wp-admin/includes/class-wp-filesystem-ftpext.php9
-rw-r--r--src/wp-admin/includes/class-wp-filesystem-ftpsockets.php4
-rw-r--r--src/wp-admin/includes/media.php2
-rw-r--r--src/wp-admin/includes/post.php2
-rw-r--r--src/wp-admin/includes/revision.php72
-rw-r--r--src/wp-admin/includes/taxonomy.php2
-rw-r--r--src/wp-admin/includes/template.php3
-rw-r--r--src/wp-admin/includes/update-core.php1
12 files changed, 56 insertions, 55 deletions
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..a6b6414cf8 100644
--- a/src/wp-admin/includes/class-wp-debug-data.php
+++ b/src/wp-admin/includes/class-wp-debug-data.php
@@ -1860,10 +1860,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 0294720ccd..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.
@@ -658,7 +660,6 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
$lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY );
if ( $lucifer ) {
- // echo $line."\n";
$lcount = count( $lucifer );
if ( $lcount < 8 ) {
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/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/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/revision.php b/src/wp-admin/includes/revision.php
index df7201e958..ec2460c0ca 100644
--- a/src/wp-admin/includes/revision.php
+++ b/src/wp-admin/includes/revision.php
@@ -407,41 +407,43 @@ function wp_print_revision_templates() {
<strong id="diff-title-to"><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>
<# } #>
<div class="author-card<# if ( data.attributes.autosave ) { #> autosave<# } #>">
- {{{ data.attributes.author.avatar }}}
- <div class="author-info" id="diff-title-author">
- <# if ( data.attributes.autosave ) { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Autosave by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } else if ( data.attributes.current ) { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Current Revision by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } else { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Revision by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } #>
- <span class="time-ago">{{ data.attributes.timeAgo }}</span>
- <span class="date">({{ data.attributes.dateShort }})</span>
+ <div>
+ {{{ data.attributes.author.avatar }}}
+ <div class="author-info" id="diff-title-author">
+ <# if ( data.attributes.autosave ) { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Autosave by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } else if ( data.attributes.current ) { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Current Revision by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } else { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Revision by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } #>
+ <span class="time-ago">{{ data.attributes.timeAgo }}</span>
+ <span class="date">({{ data.attributes.dateShort }})</span>
+ </div>
</div>
<# if ( 'to' === data.type && data.attributes.restoreUrl ) { #>
<input <?php if ( wp_check_post_lock( $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/template.php b/src/wp-admin/includes/template.php
index 127027d8f5..16da3388ae 100644
--- a/src/wp-admin/includes/template.php
+++ b/src/wp-admin/includes/template.php
@@ -817,9 +817,6 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
$tab_index_attribute = " tabindex=\"$tab_index\"";
}
- // @todo Remove this?
- // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
-
$post_date = ( $for_post ) ? $post->post_date : get_comment()->comment_date;
$jj = ( $edit ) ? mysql2date( 'd', $post_date, false ) : current_time( 'd' );
$mm = ( $edit ) ? mysql2date( 'm', $post_date, false ) : current_time( 'm' );
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.