Skip to content

Commit d18ab99

Browse files
committed
Options, Meta APIs: Correct the documented return type for get_settings_errors().
This function returns an array of settings errors arrays. Props mcaskill, costdev Fixes #57323 git-svn-id: https://develop.svn.wordpress.org/trunk@54963 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d5ef1d8 commit d18ab99

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/wp-admin/includes/template.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,15 +1846,19 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
18461846
*
18471847
* @param string $setting Optional. Slug title of a specific setting whose errors you want.
18481848
* @param bool $sanitize Optional. Whether to re-sanitize the setting value before returning errors.
1849-
* @return array {
1850-
* Array of settings errors.
1851-
*
1852-
* @type string $setting Slug title of the setting to which this error applies.
1853-
* @type string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
1854-
* @type string $message The formatted message text to display to the user (will be shown inside styled
1855-
* `<div>` and `<p>` tags).
1856-
* @type string $type Optional. Message type, controls HTML class. Possible values include 'error',
1857-
* 'success', 'warning', 'info'. Default 'error'.
1849+
* @return array[] {
1850+
* Array of settings error arrays.
1851+
*
1852+
* @type array ...$0 {
1853+
* Associative array of setting error data.
1854+
*
1855+
* @type string $setting Slug title of the setting to which this error applies.
1856+
* @type string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
1857+
* @type string $message The formatted message text to display to the user (will be shown inside styled
1858+
* `<div>` and `<p>` tags).
1859+
* @type string $type Optional. Message type, controls HTML class. Possible values include 'error',
1860+
* 'success', 'warning', 'info'. Default 'error'.
1861+
* }
18581862
* }
18591863
*/
18601864
function get_settings_errors( $setting = '', $sanitize = false ) {

0 commit comments

Comments
 (0)