Make WordPress Core

Opened 20 months ago

Last modified 6 months ago

#42786 new defect (bug)

get_settings_errors() inline docs return should reflect the array in detail

Reported by: webdevmattcrom Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: docs Cc:


The return array should be explained in better detail in the inline docs, both for the purpose of clarity for developers, and for DevHub purposes.

Here's the line in the code:

Suggested return array:

@return array {
 *     @type string $setting    The setting that is throwing an error.
 *     @type string $code       Code of the error.
 *     @type string $message    Message of the error.
 *     @type string $type       Type of error.
 * }

I have a patch, but would like clarity on whether this is accurate first.

Attachments (2)

42786.diff (1.1 KB) - added by stevenlinx 19 months ago.
42786.2.diff (1.1 KB) - added by stevenlinx 19 months ago.

Download all attachments as: .zip

Change History (6)

#1 @webdevmattcrom
20 months ago

  • Focuses docs added

This ticket was mentioned in Slack in #core-docs by webdevmattcrom. View the logs.

20 months ago

19 months ago

19 months ago

#3 @stevenlinx
19 months ago

  • Keywords has-patch added

Agreed to clarify the inline doc; however, we should use the same descriptions as the inline doc of add_settings_error().

The function handles the same "@global array $wp_settings_errors"

The inline doc description for $wp_settings_errors in both add_settings_error() and get_settings_errors() is also the same.

line in the code:

#4 @pento
6 months ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.