-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change 'autoload' option values in various files #6417
Change 'autoload' option values in various files #6417
Conversation
Updated values of 'autoload' option from 'yes' or 'no' to 'on' or 'off' respectively, across several PHP files. This change was implemented in the functions handling options and lock settings, enhancing clarity and consistency of the code.
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 Unlinked AccountsThe 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:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pbearne. These all look right to me. I see a few places in wp_ajax_wp_compression_test()
that could be changed as well.
There are also a few places in upgrade.php
where the previous values are used, but it may be best to leave those alone for now, since they were written for previous WP versions prior to this change being made.
The commit modifies the 'can_compress_scripts' options in the ajax-actions.php file. The update_site_option and update_option functions now have a third argument which controls whether the setting is on or off. This enhances flexibility and control over the script compression feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. One important change that needs to be addressed.
The commit adjusts the parameters for 'update_option' functions in 'featured-content.php' and 'ajax-actions.php'. It changes the 'autoload' parameter where necessary, updating the values for "featured-content" and "can_compress_scripts" options. It's done to ensure the correct use of the autoloading feature in WordPress functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to me now.
This commit adds a third argument to the update_option() function calls across a large number of scripts. This argument toggles whether the option should be loaded from cache (on) or not (off). The changes made help to better manage data caching in WordPress and potentially improve performance by avoiding unnecessary database queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed the change to twentyfourteen in my last review. Can we remove that change and also not change any instances of update_option()
that were previously using the default value?
The scope of this ticket should just be to update places in core where a third parameter was defined, but was using the old "true|false" values.
This commit adds a third argument to the update_option() function calls across a large number of scripts. This argument toggles whether the option should be loaded from cache (on) or not (off). The changes made help to better manage data caching in WordPress and potentially improve performance by avoiding unnecessary database queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this, @pbearne. This looks like a good update.
Updated values of 'autoload' option from 'yes' or 'no' to 'on' or 'off' respectively, across several PHP files. This change was implemented in the functions handling options and lock settings, enhancing clarity and consistency of the code.
Trac ticket: https://core.trac.wordpress.org/ticket/61045