Docs: Document the return value of `get_settings_errors()` using hash notation.

Props stevenlinx, webdevmattcrom, atachibana.
Fixes #42786.

git-svn-id: https://develop.svn.wordpress.org/trunk@48760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-08 12:37:03 +00:00
parent 6ebff324b2
commit 5602ba4db7
1 changed files with 10 additions and 1 deletions

View File

@ -1797,7 +1797,16 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
*
* @param string $setting Optional. Slug title of a specific setting whose errors you want.
* @param bool $sanitize Optional. Whether to re-sanitize the setting value before returning errors.
* @return array Array of settings errors.
* @return array {
* Array of settings errors.
*
* @type string $setting Slug title of the setting to which this error applies.
* @type string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
* @type string $message The formatted message text to display to the user (will be shown inside styled
* `<div>` and `<p>` tags).
* @type string $type Optional. Message type, controls HTML class. Possible values include 'error',
* 'success', 'warning', 'info'. Default 'error'.
* }
*/
function get_settings_errors( $setting = '', $sanitize = false ) {
global $wp_settings_errors;