Docs: Various improvements and corrections to inline docs.

See #55646

Built from https://develop.svn.wordpress.org/trunk@54267


git-svn-id: http://core.svn.wordpress.org/trunk@53826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2022-09-20 20:32:09 +00:00
parent 0974640a7c
commit c117e5ae74
8 changed files with 17 additions and 21 deletions

View File

@ -1649,7 +1649,7 @@ function add_settings_section( $id, $title, $callback, $page, $args = array() )
* @param string $section Optional. The slug-name of the section of the settings page * @param string $section Optional. The slug-name of the section of the settings page
* in which to show the box. Default 'default'. * in which to show the box. Default 'default'.
* @param array $args { * @param array $args {
* Optional. Extra arguments used when outputting the field. * Optional. Extra arguments that get passed to the callback function.
* *
* @type string $label_for When supplied, the setting title will be wrapped * @type string $label_for When supplied, the setting title will be wrapped
* in a `<label>` element, its `for` attribute populated * in a `<label>` element, its `for` attribute populated

View File

@ -377,7 +377,7 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array(), $
); );
/** /**
* Filter to preflight or hijack rescheduling of events. * Filter to preflight or hijack rescheduling of a recurring event.
* *
* Returning a non-null value will short-circuit the normal rescheduling * Returning a non-null value will short-circuit the normal rescheduling
* process, causing the function to return the filtered value instead. * process, causing the function to return the filtered value instead.
@ -392,11 +392,11 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array(), $
* @param stdClass $event { * @param stdClass $event {
* An object containing an event's data. * An object containing an event's data.
* *
* @type string $hook Action hook to execute when the event is run. * @type string $hook Action hook to execute when the event is run.
* @type int $timestamp Unix timestamp (UTC) for when to next run the event. * @type int $timestamp Unix timestamp (UTC) for when to next run the event.
* @type string|false $schedule How often the event should subsequently recur. * @type string $schedule How often the event should subsequently recur.
* @type array $args Array containing each separate argument to pass to the hook's callback function. * @type array $args Array containing each separate argument to pass to the hook's callback function.
* @type int $interval The interval time in seconds for the schedule. Only present for recurring events. * @type int $interval The interval time in seconds for the schedule.
* } * }
* @param bool $wp_error Whether to return a WP_Error on failure. * @param bool $wp_error Whether to return a WP_Error on failure.
*/ */

View File

@ -1496,12 +1496,7 @@ function wp_get_nocache_headers() {
* *
* @see wp_get_nocache_headers() * @see wp_get_nocache_headers()
* *
* @param array $headers { * @param array $headers Header names and field values.
* Header names and field values.
*
* @type string $Expires Expires header.
* @type string $Cache-Control Cache-Control header.
* }
*/ */
$headers = (array) apply_filters( 'nocache_headers', $headers ); $headers = (array) apply_filters( 'nocache_headers', $headers );
} }

View File

@ -4338,6 +4338,7 @@ function the_search_query() {
* @since 4.3.0 * @since 4.3.0
* *
* @param string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'. * @param string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'.
* @return string A space-separated list of language attributes.
*/ */
function get_language_attributes( $doctype = 'html' ) { function get_language_attributes( $doctype = 'html' ) {
$attributes = array(); $attributes = array();

View File

@ -342,7 +342,7 @@ function wp_load_alloptions( $force_cache = false ) {
* Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used. * Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used.
* *
* @since 3.0.0 * @since 3.0.0
* @since 6.1.0 Uses update_meta_cache * @since 6.1.0 Now uses update_meta_cache().
* *
* @param int $network_id Optional site ID for which to query the options. Defaults to the current site. * @param int $network_id Optional site ID for which to query the options. Defaults to the current site.
*/ */
@ -1806,8 +1806,8 @@ function get_site_transient( $transient ) {
* *
* The dynamic portion of the hook name, `$transient`, refers to the transient name. * The dynamic portion of the hook name, `$transient`, refers to the transient name.
* *
* Returning a truthy value from the filter will effectively short-circuit retrieval * Returning a value other than boolean false will short-circuit retrieval and
* and return the passed value instead. * return that value instead.
* *
* @since 2.9.0 * @since 2.9.0
* @since 4.4.0 The `$transient` parameter was added. * @since 4.4.0 The `$transient` parameter was added.

View File

@ -7978,7 +7978,7 @@ function wp_cache_set_posts_last_changed() {
* @global wpdb $wpdb WordPress database abstraction object. * @global wpdb $wpdb WordPress database abstraction object.
* *
* @param string $type * @param string $type
* @return mixed * @return string[] An array of MIME types.
*/ */
function get_available_post_mime_types( $type = 'attachment' ) { function get_available_post_mime_types( $type = 'attachment' ) {
global $wpdb; global $wpdb;

View File

@ -169,7 +169,7 @@ function wp_default_packages_vendor( $scripts ) {
* @since 5.0.0 * @since 5.0.0
* *
* @param WP_Scripts $scripts WP_Scripts object. * @param WP_Scripts $scripts WP_Scripts object.
* @param array $tests Features to detect. * @param string[] $tests Features to detect.
* @return string Conditional polyfill inline script. * @return string Conditional polyfill inline script.
*/ */
function wp_get_script_polyfill( $scripts, $tests ) { function wp_get_script_polyfill( $scripts, $tests ) {
@ -1745,8 +1745,8 @@ function wp_default_styles( $styles ) {
* *
* @since 2.3.1 * @since 2.3.1
* *
* @param array $js_array JavaScript scripts array * @param string[] $js_array JavaScript scripts array
* @return array Reordered array, if needed. * @return string[] Reordered array, if needed.
*/ */
function wp_prototype_before_jquery( $js_array ) { function wp_prototype_before_jquery( $js_array ) {
$prototype = array_search( 'prototype', $js_array, true ); $prototype = array_search( 'prototype', $js_array, true );

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.1-alpha-54266'; $wp_version = '6.1-alpha-54267';
/** /**
* 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.