Opened 5 years ago
Closed 5 years ago
#48357 closed defect (bug) (fixed)
Improve documentation for wp-includes/option.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
In the update_option
documentation, since the $autoload
parameter is added, the sentence below is incorrect:
If the option does not exist, then the option will be added with the option value, with an
$autoload value of 'yes'.
Actually it will be added with whatever was passed to the $autoload
parameter, 'yes'
being only the default value.
This ticket/patch proposes a new text for the function description and for the documentation of the $autoload
argument.
Attachments (1)
Change History (7)
#1
@
5 years ago
- Keywords good-first-bug needs-patch added
- Milestone changed from Awaiting Review to 5.4
#2
@
5 years ago
- Keywords has-patch added; needs-patch removed
Here it is:
https://github.com/leogermani/WordPress/pull/1
This is the first time I submit a patch with a pull request (I've heard it's possible). Do I need to do anything else?
#5
@
5 years ago
The current $autoload
parameter description seems clear enough:
For existing options,
$autoload
can only be updated usingupdate_option()
if$value
is also changed. Accepts'yes'|true
to enable or'no'|false
to disable. For non-existent options, the default value is'yes'
. Default null.
Let's just remove the inaccurate statement about the 'yes'
value for new options.
Thanks for this, @leogermani. Are you interested in creating a patch?