Docs: Further improve documentation of known return types, plus other docs fixes.

See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46661 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2019-11-05 21:25:53 +00:00
parent db4f746b4a
commit 3cdee7a705
15 changed files with 65 additions and 61 deletions

View File

@@ -25,26 +25,26 @@ class WP_Dependencies {
public $registered = array();
/**
* An array of queued _WP_Dependency handle objects.
* An array of handles of queued objects.
*
* @since 2.6.8
* @var array
* @var string[]
*/
public $queue = array();
/**
* An array of _WP_Dependency handle objects to queue.
* An array of handles of objects to queue.
*
* @since 2.6.0
* @var array
* @var string[]
*/
public $to_do = array();
/**
* An array of _WP_Dependency handle objects already queued.
* An array of handles of objects already queued.
*
* @since 2.6.0
* @var array
* @var string[]
*/
public $done = array();
@@ -83,9 +83,9 @@ class WP_Dependencies {
* @since 2.6.0
* @since 2.8.0 Added the `$group` parameter.
*
* @param mixed $handles Optional. Items to be processed: Process queue (false), process item (string), process items (array of strings).
* @param mixed $group Group level: level (int), no groups (false).
* @return array Handles of items that have been processed.
* @param mixed $handles Optional. Items to be processed: Process queue (false), process item (string), process items (array of strings).
* @param int|false $group Optional. Group level: level (int), no groups (false).
* @return string[] Array of handles of items that have been processed.
*/
public function do_items( $handles = false, $group = false ) {
/*
@@ -136,9 +136,9 @@ class WP_Dependencies {
* @since 2.6.0 Moved from `WP_Scripts`.
* @since 2.8.0 Added the `$group` parameter.
*
* @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @param bool $recursion Internal flag that function is calling itself.
* @param int|false $group Group level: (int) level, (false) no groups.
* @param string|string[] $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @param bool $recursion Internal flag that function is calling itself.
* @param int|false $group Group level: (int) level, (false) no groups.
* @return bool True on success, false on failure.
*/
public function all_deps( $handles, $recursion = false, $group = false ) {
@@ -270,7 +270,7 @@ class WP_Dependencies {
* @since 2.1.0
* @since 2.6.0 Moved from `WP_Scripts`.
*
* @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @param string|string[] $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @return void
*/
public function remove( $handles ) {
@@ -290,7 +290,7 @@ class WP_Dependencies {
* @since 2.1.0
* @since 2.6.0 Moved from `WP_Scripts`.
*
* @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @param string|string[] $handles Item handle and argument (string) or item handles and arguments (array of strings).
*/
public function enqueue( $handles ) {
foreach ( (array) $handles as $handle ) {
@@ -313,7 +313,7 @@ class WP_Dependencies {
* @since 2.1.0
* @since 2.6.0 Moved from `WP_Scripts`.
*
* @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @param string|string[] $handles Item handle and argument (string) or item handles and arguments (array of strings).
*/
public function dequeue( $handles ) {
foreach ( (array) $handles as $handle ) {