From f9db66d504fc72942515f6c0ed2b63aee7cef876 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 11 Oct 2022 09:02:14 +0000 Subject: [PATCH] Docs: Various improvements to inline docblocks. See #55646 Built from https://develop.svn.wordpress.org/trunk@54470 git-svn-id: http://core.svn.wordpress.org/trunk@54029 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-template-utils.php | 8 ++++---- wp-includes/class-wp-dependencies.php | 2 +- wp-includes/cron.php | 14 +++++--------- wp-includes/functions.wp-scripts.php | 2 +- wp-includes/functions.wp-styles.php | 2 +- wp-includes/general-template.php | 4 ++-- wp-includes/version.php | 2 +- 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index 59d76d48d3..02ac0a7546 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -1138,11 +1138,11 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { } /** - * Prints a template-part. + * Prints a block template part. * * @since 5.9.0 * - * @param string $part The template-part to print. Use "header" or "footer". + * @param string $part The block template part to print. Use "header" or "footer". */ function block_template_part( $part ) { $template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' ); @@ -1153,7 +1153,7 @@ function block_template_part( $part ) { } /** - * Prints the header template-part. + * Prints the header block template part. * * @since 5.9.0 */ @@ -1162,7 +1162,7 @@ function block_header_area() { } /** - * Prints the footer template-part. + * Prints the footer block template part. * * @since 5.9.0 */ diff --git a/wp-includes/class-wp-dependencies.php b/wp-includes/class-wp-dependencies.php index 1deb9a41fb..68b33be395 100644 --- a/wp-includes/class-wp-dependencies.php +++ b/wp-includes/class-wp-dependencies.php @@ -239,7 +239,7 @@ class WP_Dependencies { * @since 2.6.0 Moved from `WP_Scripts`. * * @param string $handle Name of the item. Should be unique. - * @param string|bool $src Full URL of the item, or path of the item relative + * @param string|false $src Full URL of the item, or path of the item relative * to the WordPress root directory. If source is set to false, * item is an alias of other items it depends on. * @param string[] $deps Optional. An array of registered item handles this item depends on. diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 4a7899df8c..0c4e1acd3c 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -8,7 +8,7 @@ /** * Schedules an event to run only once. * - * Schedules a hook which will be triggered by WordPress at the specified time. + * Schedules a hook which will be triggered by WordPress at the specified UTC time. * The action will trigger when someone visits your WordPress site if the scheduled * time has passed. * @@ -207,10 +207,6 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array(), $wp_error * Valid values for the recurrence are 'hourly', 'daily', and 'twicedaily'. These can * be extended using the {@see 'cron_schedules'} filter in wp_get_schedules(). * - * Note that scheduling an event to occur within 10 minutes of an existing event - * with the same action hook will be ignored unless you pass unique `$args` values - * for each scheduled event. - * * Use wp_next_scheduled() to prevent duplicate events. * * Use wp_schedule_single_event() to schedule a non-recurring event. @@ -317,7 +313,7 @@ function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array(), $wp /** * Reschedules a recurring event. * - * Mainly for internal use, this takes the time stamp of a previously run + * Mainly for internal use, this takes the UTC timestamp of a previously run * recurring event and reschedules it for its next run. * * To change upcoming scheduled events, use wp_schedule_event() to @@ -383,7 +379,7 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array(), $ * process, causing the function to return the filtered value instead. * * For plugins replacing wp-cron, return true if the event was successfully - * rescheduled, false if not. + * rescheduled, false or a WP_Error if not. * * @since 5.1.0 * @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned. @@ -480,7 +476,7 @@ function wp_unschedule_event( $timestamp, $hook, $args = array(), $wp_error = fa * process, causing the function to return the filtered value instead. * * For plugins replacing wp-cron, return true if the event was successfully - * unscheduled, false if not. + * unscheduled, false or a WP_Error if not. * * @since 5.1.0 * @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned. @@ -561,7 +557,7 @@ function wp_clear_scheduled_hook( $hook, $args = array(), $wp_error = false ) { * * For plugins replacing wp-cron, return the number of events successfully * unscheduled (zero if no events were registered with the hook) or false - * if unscheduling one or more events fails. + * or a WP_Error if unscheduling one or more events fails. * * @since 5.1.0 * @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned. diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php index b298f9c573..4b2dff1c44 100644 --- a/wp-includes/functions.wp-scripts.php +++ b/wp-includes/functions.wp-scripts.php @@ -159,7 +159,7 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) { * @since 4.3.0 A return value was added. * * @param string $handle Name of the script. Should be unique. - * @param string|bool $src Full URL of the script, or path of the script relative to the WordPress root directory. + * @param string|false $src Full URL of the script, or path of the script relative to the WordPress root directory. * If source is set to false, script is an alias of other scripts it depends on. * @param string[] $deps Optional. An array of registered script handles this script depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL diff --git a/wp-includes/functions.wp-styles.php b/wp-includes/functions.wp-styles.php index 823d88ce7a..4e0e538a22 100644 --- a/wp-includes/functions.wp-styles.php +++ b/wp-includes/functions.wp-styles.php @@ -114,7 +114,7 @@ function wp_add_inline_style( $handle, $data ) { * @since 4.3.0 A return value was added. * * @param string $handle Name of the stylesheet. Should be unique. - * @param string|bool $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. + * @param string|false $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. * If source is set to false, stylesheet is an alias of other stylesheets it depends on. * @param string[] $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 8aaf5bd061..9cae9b930d 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -4463,8 +4463,8 @@ function language_attributes( $doctype = 'html' ) { * @type string $before_page_number A string to appear before the page number. Default empty. * @type string $after_page_number A string to append after the page number. Default empty. * } - * @return string|array|void String of page links or array of page links, depending on 'type' argument. - * Void if total number of pages is less than 2. + * @return string|string[]|void String of page links or array of page links, depending on 'type' argument. + * Void if total number of pages is less than 2. */ function paginate_links( $args = '' ) { global $wp_query, $wp_rewrite; diff --git a/wp-includes/version.php b/wp-includes/version.php index c38cfe8fef..882abbcea4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54469'; +$wp_version = '6.1-beta3-54470'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.