Skip to content

Add autoload parameter to register_setting function#6994

Open
pbearne wants to merge 2 commits into
WordPress:trunkfrom
pbearne:61522-Add-autoload-control-to-register_setting
Open

Add autoload parameter to register_setting function#6994
pbearne wants to merge 2 commits into
WordPress:trunkfrom
pbearne:61522-Add-autoload-control-to-register_setting

Conversation

@pbearne

@pbearne pbearne commented Jul 8, 2024

Copy link
Copy Markdown

This commit introduces an autoload parameter in the register_setting function, 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 the autoload parameter in the registration function as well as the corresponding changes in the database layout to store this information. This also includes a modification to wp_default_autoload_value filter to reflect the new autoload state. Changes are carried out across multiple files like theme-options.php, option.php, featured-content.php etc., for proper implementation.

Trac ticket: https://core.trac.wordpress.org/ticket/61522

This commit introduces an `autoload` parameter in the `register_setting` function, 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 the `autoload` parameter in the registration function as well as the corresponding changes in the database layout to store this information. This also includes a modification to `wp_default_autoload_value` filter to reflect the new autoload state. Changes are carried out across multiple files like `theme-options.php`, `option.php`, `featured-content.php` etc. for proper implementation.
@github-actions

github-actions Bot commented Jul 8, 2024

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @paul.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props pbearne.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant