Docs: Miscellaneous DocBlock corrections.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48408


git-svn-id: http://core.svn.wordpress.org/trunk@48177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-07-08 13:15:03 +00:00
parent 755766f286
commit 6bf6bc451f
6 changed files with 29 additions and 17 deletions

View File

@ -944,9 +944,11 @@ class WP_Automatic_Updater {
$unique_failures = false; $unique_failures = false;
$past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() ); $past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() );
// When only failures have occurred, an email should only be sent if there are unique failures. /*
// A failure is considered unique if an email has not been sent for an update attempt failure * When only failures have occurred, an email should only be sent if there are unique failures.
// to a plugin or theme with the same new_version. * A failure is considered unique if an email has not been sent for an update attempt failure
* to a plugin or theme with the same new_version.
*/
if ( 'fail' === $type ) { if ( 'fail' === $type ) {
foreach ( $failed_updates as $update_type => $failures ) { foreach ( $failed_updates as $update_type => $failures ) {
foreach ( $failures as $failed_update ) { foreach ( $failures as $failed_update ) {
@ -1043,9 +1045,11 @@ class WP_Automatic_Updater {
$body[] = __( 'These plugins failed to update:' ); $body[] = __( 'These plugins failed to update:' );
foreach ( $failed_updates['plugin'] as $item ) { foreach ( $failed_updates['plugin'] as $item ) {
$body[] = "- {$item->name}"; $body[] = "- {$item->name}";
$past_failure_emails[ $item->item->plugin ] = $item->item->new_version; $past_failure_emails[ $item->item->plugin ] = $item->item->new_version;
} }
$body[] = "\n"; $body[] = "\n";
} }
@ -1054,9 +1058,11 @@ class WP_Automatic_Updater {
$body[] = __( 'These themes failed to update:' ); $body[] = __( 'These themes failed to update:' );
foreach ( $failed_updates['theme'] as $item ) { foreach ( $failed_updates['theme'] as $item ) {
$body[] = "- {$item->name}"; $body[] = "- {$item->name}";
$past_failure_emails[ $item->item->theme ] = $item->item->new_version; $past_failure_emails[ $item->item->theme ] = $item->item->new_version;
} }
$body[] = "\n"; $body[] = "\n";
} }
} }
@ -1071,19 +1077,23 @@ class WP_Automatic_Updater {
foreach ( $successful_updates['plugin'] as $item ) { foreach ( $successful_updates['plugin'] as $item ) {
$body[] = "- {$item->name}"; $body[] = "- {$item->name}";
unset( $past_failure_emails[ $item->item->plugin ] ); unset( $past_failure_emails[ $item->item->plugin ] );
} }
$body[] = "\n"; $body[] = "\n";
} }
// List successful theme updates. // List successful theme updates.
if ( ! empty( $successful_updates['theme'] ) ) { if ( ! empty( $successful_updates['theme'] ) ) {
$body[] = __( 'These themes are now up to date:' ); $body[] = __( 'These themes are now up to date:' );
// List successful updates.
foreach ( $successful_updates['theme'] as $item ) { foreach ( $successful_updates['theme'] as $item ) {
$body[] = "- {$item->name}"; $body[] = "- {$item->name}";
unset( $past_failure_emails[ $item->item->theme ] ); unset( $past_failure_emails[ $item->item->theme ] );
} }
$body[] = "\n"; $body[] = "\n";
} }
} }

View File

@ -1226,10 +1226,10 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'. * Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'.
* @type string $description A description of the data attached to this meta key. * @type string $description A description of the data attached to this meta key.
* @type bool $single Whether the meta key has one value per object, or an array of values per object. * @type bool $single Whether the meta key has one value per object, or an array of values per object.
* @type mixed $default The default value returned from {@see get_metadata()} if no value has been set yet. * @type mixed $default The default value returned from get_metadata() if no value has been set yet.
* When using a non-single meta key, the default value is for the first entry. In other * When using a non-single meta key, the default value is for the first entry.
* words, when calling {@see get_metadata()} with `$single` set to `false`, the default * In other words, when calling get_metadata() with `$single` set to `false`,
* value given here will be wrapped in an array. * the default value given here will be wrapped in an array.
* @type string $sanitize_callback A function or method to call when sanitizing `$meta_key` data. * @type string $sanitize_callback A function or method to call when sanitizing `$meta_key` data.
* @type string $auth_callback Optional. A function or method to call when performing edit_post_meta, * @type string $auth_callback Optional. A function or method to call when performing edit_post_meta,
* add_post_meta, and delete_post_meta capability checks. * add_post_meta, and delete_post_meta capability checks.

View File

@ -301,7 +301,7 @@ function wp_nav_menu( $args = array() ) {
} }
/** /**
* Add the class property classes for the current context, if applicable. * Adds the class property classes for the current context, if applicable.
* *
* @access private * @access private
* @since 3.0.0 * @since 3.0.0
@ -592,7 +592,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
} }
/** /**
* Retrieve the HTML list content for nav menu items. * Retrieves the HTML list content for nav menu items.
* *
* @uses Walker_Nav_Menu to create HTML list content. * @uses Walker_Nav_Menu to create HTML list content.
* @since 3.0.0 * @since 3.0.0

View File

@ -460,9 +460,11 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
); );
} }
// If the file doesn't exist, attempt a URL fopen on the src link. /*
// This can occur with certain file replication plugins. * If the file doesn't exist, attempt a URL fopen on the src link.
// Keep the original file path to get a modified name later. * This can occur with certain file replication plugins.
* Keep the original file path to get a modified name later.
*/
$image_file_to_edit = $image_file; $image_file_to_edit = $image_file;
if ( ! file_exists( $image_file_to_edit ) ) { if ( ! file_exists( $image_file_to_edit ) ) {
$image_file_to_edit = _load_image_to_edit_path( $attachment_id ); $image_file_to_edit = _load_image_to_edit_path( $attachment_id );

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-beta1-48407'; $wp_version = '5.5-beta1-48408';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -1656,7 +1656,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
<?php endif; ?> <?php endif; ?>
</p> </p>
<?php <?php
endif; // end of display options endif; // End of display options.
foreach ( array_keys( $default_inputs ) as $input ) : foreach ( array_keys( $default_inputs ) as $input ) :
if ( 'hidden' === $inputs[ $input ] ) : if ( 'hidden' === $inputs[ $input ] ) :
$id = str_replace( '_', '-', $input ); $id = str_replace( '_', '-', $input );