Opened 2 years ago
Last modified 2 years ago
#61522 accepted enhancement
Add autoload control to register_setting()
| Reported by: | pbearne | Owned by: | pbearne |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Options, Meta APIs | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | performance |
Description (last modified by )
There doesn't seem to be a way to declare a setting does not need to be autoloaded (or loaded just in admin)
lets add this option to register_setting()
Change History (4)
#2
@
2 years ago
- Description modified (diff)
- Summary allow control for if a setting should be autoloaded → Add autoload control to register_setting()
This ticket was mentioned in Slack in #core-performance by pbearne. View the logs.
2 years ago
This ticket was mentioned in PR #6994 on WordPress/wordpress-develop by @pbearne.
2 years ago
#4
- Keywords has-patch has-unit-tests added
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This commit introduces an
autoloadparameter in theregister_settingfunction, allowing users to specify if a setting should be autoloaded. Autoloaded settings are loaded on every page, improving the performance for settings that are frequently used. The change includes both the addition of theautoloadparameter in the registration function as well as the corresponding changes in the database layout to store this information. This also includes a modification towp_default_autoload_valuefilter to reflect the new autoload state. Changes are carried out across multiple files liketheme-options.php,option.php,featured-content.phpetc., for proper implementation.