Skip to content

Commit 17954e7

Browse files
committed
Docs: Various improvements and corrections to inline docs.
See #55646 git-svn-id: https://develop.svn.wordpress.org/trunk@54267 602fd350-edb4-49c9-b593-d223f7449a82
1 parent abd6262 commit 17954e7

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

src/wp-admin/includes/template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ function add_settings_section( $id, $title, $callback, $page, $args = array() )
16491649
* @param string $section Optional. The slug-name of the section of the settings page
16501650
* in which to show the box. Default 'default'.
16511651
* @param array $args {
1652-
* Optional. Extra arguments used when outputting the field.
1652+
* Optional. Extra arguments that get passed to the callback function.
16531653
*
16541654
* @type string $label_for When supplied, the setting title will be wrapped
16551655
* in a `<label>` element, its `for` attribute populated

src/wp-includes/cron.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array(), $
377377
);
378378

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

src/wp-includes/functions.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,12 +1496,7 @@ function wp_get_nocache_headers() {
14961496
*
14971497
* @see wp_get_nocache_headers()
14981498
*
1499-
* @param array $headers {
1500-
* Header names and field values.
1501-
*
1502-
* @type string $Expires Expires header.
1503-
* @type string $Cache-Control Cache-Control header.
1504-
* }
1499+
* @param array $headers Header names and field values.
15051500
*/
15061501
$headers = (array) apply_filters( 'nocache_headers', $headers );
15071502
}

src/wp-includes/general-template.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4338,6 +4338,7 @@ function the_search_query() {
43384338
* @since 4.3.0
43394339
*
43404340
* @param string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'.
4341+
* @return string A space-separated list of language attributes.
43414342
*/
43424343
function get_language_attributes( $doctype = 'html' ) {
43434344
$attributes = array();

src/wp-includes/option.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ function wp_load_alloptions( $force_cache = false ) {
342342
* Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used.
343343
*
344344
* @since 3.0.0
345-
* @since 6.1.0 Uses update_meta_cache
345+
* @since 6.1.0 Now uses update_meta_cache().
346346
*
347347
* @param int $network_id Optional site ID for which to query the options. Defaults to the current site.
348348
*/
@@ -1806,8 +1806,8 @@ function get_site_transient( $transient ) {
18061806
*
18071807
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
18081808
*
1809-
* Returning a truthy value from the filter will effectively short-circuit retrieval
1810-
* and return the passed value instead.
1809+
* Returning a value other than boolean false will short-circuit retrieval and
1810+
* return that value instead.
18111811
*
18121812
* @since 2.9.0
18131813
* @since 4.4.0 The `$transient` parameter was added.

src/wp-includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7978,7 +7978,7 @@ function wp_cache_set_posts_last_changed() {
79787978
* @global wpdb $wpdb WordPress database abstraction object.
79797979
*
79807980
* @param string $type
7981-
* @return mixed
7981+
* @return string[] An array of MIME types.
79827982
*/
79837983
function get_available_post_mime_types( $type = 'attachment' ) {
79847984
global $wpdb;

src/wp-includes/script-loader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function wp_default_packages_vendor( $scripts ) {
169169
* @since 5.0.0
170170
*
171171
* @param WP_Scripts $scripts WP_Scripts object.
172-
* @param array $tests Features to detect.
172+
* @param string[] $tests Features to detect.
173173
* @return string Conditional polyfill inline script.
174174
*/
175175
function wp_get_script_polyfill( $scripts, $tests ) {
@@ -1745,8 +1745,8 @@ function wp_default_styles( $styles ) {
17451745
*
17461746
* @since 2.3.1
17471747
*
1748-
* @param array $js_array JavaScript scripts array
1749-
* @return array Reordered array, if needed.
1748+
* @param string[] $js_array JavaScript scripts array
1749+
* @return string[] Reordered array, if needed.
17501750
*/
17511751
function wp_prototype_before_jquery( $js_array ) {
17521752
$prototype = array_search( 'prototype', $js_array, true );

0 commit comments

Comments
 (0)