Opened 7 years ago
Closed 7 years ago
#48357 closed defect (bug) (fixed)
Improve documentation for wp-includes/option.php
| Reported by: | leogermani | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Options, Meta APIs | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | docs |
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)
#2
@
7 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
@
7 years ago
The current $autoload parameter description seems clear enough:
For existing options,
$autoloadcan only be updated usingupdate_option()if$valueis also changed. Accepts'yes'|trueto enable or'no'|falseto 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for this, @leogermani. Are you interested in creating a patch?