#58963 closed task (blessed) (fixed)
Expand `$autoload` parameter documentation of `add_option()` and `update_option()`
Reported by: | flixos90 | Owned by: | flixos90 |
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | has-patch |
Focuses: | docs, performance | Cc: |
Description
As outlined with more context in #42441 and #58962, "excessive autoloading" (i.e. autoloading too many options) can lead to performance problems, in some cases huge ones that even cause bugs.
Part of the problem is that there is very little documentation on option autoloading, which makes it challenging for the WordPress ecosystem to understand and properly use it. This also is reflected in extremely limiting, and possibly even misleading inline documentation of the $autoload
parameter of add_option()
and update_option()
.
This ticket aims to update said inline documentation to provide additional context on what the parameter does and how it should be used.
Change History (9)
This ticket was mentioned in PR #4960 on WordPress/wordpress-develop by @rajinsharwar.
16 months ago
#1
- Keywords has-patch added; needs-patch removed
#3
@
16 months ago
- Owner set to flixos90
- Status changed from new to reviewing
Thank you for the pull request @rajinsharwar! I left some feedback.
@flixos90 commented on PR #4960:
16 months ago
#5
Thank you @Rajinsharwar for the updates! Note that there are a few coding standards violations flagged in GitHub, for example indentation of inline doc parameter descriptions needs to use spaces, not tabs. Would you mind fixing these violations?
#6
@
16 months ago
Sure! Just fixed those coding standards issues, can you please take a look now? @flixos90
@flixos90 commented on PR #4960:
16 months ago
#9
Committed in https://core.trac.wordpress.org/changeset/56370
Improving inline doc for the add_option(), and update_option()
Trac ticket: https://core.trac.wordpress.org/ticket/58963