Docs: Document parameters that accept an array of integers using typed array notation.

While many of these parameters also technically accept an array of numerical strings, they are all ultimately cast to an array of integers. Documenting them as such assists developers in understanding the expected types.

See #51800, #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@49672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2020-11-19 18:22:02 +00:00
parent 4eeb1c3acf
commit a47e8924b0
14 changed files with 83 additions and 83 deletions

View File

@@ -115,27 +115,27 @@ class WP_Date_Query {
* arrays in some time-related parameters. Default '='.
* @type bool $inclusive Optional. Include results from dates specified in 'before' or
* 'after'. Default false.
* @type int|array $year Optional. The four-digit year number. Accepts any four-digit year
* @type int|int[] $year Optional. The four-digit year number. Accepts any four-digit year
* or an array of years if `$compare` supports it. Default empty.
* @type int|array $month Optional. The two-digit month number. Accepts numbers 1-12 or an
* @type int|int[] $month Optional. The two-digit month number. Accepts numbers 1-12 or an
* array of valid numbers if `$compare` supports it. Default empty.
* @type int|array $week Optional. The week number of the year. Accepts numbers 0-53 or an
* @type int|int[] $week Optional. The week number of the year. Accepts numbers 0-53 or an
* array of valid numbers if `$compare` supports it. Default empty.
* @type int|array $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an
* @type int|int[] $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an
* array of valid numbers if `$compare` supports it.
* @type int|array $day Optional. The day of the month. Accepts numbers 1-31 or an array
* @type int|int[] $day Optional. The day of the month. Accepts numbers 1-31 or an array
* of valid numbers if `$compare` supports it. Default empty.
* @type int|array $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is
* @type int|int[] $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is
* Sunday) or an array of valid numbers if `$compare` supports it.
* Default empty.
* @type int|array $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7
* @type int|int[] $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7
* (1 is Monday) or an array of valid numbers if `$compare` supports it.
* Default empty.
* @type int|array $hour Optional. The hour of the day. Accepts numbers 0-23 or an array
* @type int|int[] $hour Optional. The hour of the day. Accepts numbers 0-23 or an array
* of valid numbers if `$compare` supports it. Default empty.
* @type int|array $minute Optional. The minute of the hour. Accepts numbers 0-60 or an array
* @type int|int[] $minute Optional. The minute of the hour. Accepts numbers 0-60 or an array
* of valid numbers if `$compare` supports it. Default empty.
* @type int|array $second Optional. The second of the minute. Accepts numbers 0-60 or an
* @type int|int[] $second Optional. The second of the minute. Accepts numbers 0-60 or an
* array of valid numbers if `$compare` supports it. Default empty.
* }
* }