Opened 7 years ago
Closed 5 years ago
#42786 closed defect (bug) (fixed)
get_settings_errors() inline docs return should reflect the array in detail
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
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:
https://core.trac.wordpress.org/browser/tags/4.9/src/wp-admin/includes/template.php#L1440
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)
Change History (9)
This ticket was mentioned in Slack in #core-docs by webdevmattcrom. View the logs.
7 years ago
#5
@
5 years ago
@SergeyBiryukov Can I ask you to check this issue? I think this issue and patch make sense.
Note: See
TracTickets for help on using
tickets.
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:
https://core.trac.wordpress.org/browser/tags/4.9/src/wp-admin/includes/template.php#L1384