Make WordPress Core

Opened 6 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#61045 closed defect (bug) (fixed)

Options: Update default autoload values used in core

Reported by: joemcgill's profile joemcgill Owned by: joemcgill's profile joemcgill
Milestone: 6.6 Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: has-patch changes-requested
Focuses: Cc:

Description

Following r57920, WordPress will now use one of 'on', 'off', 'auto-on', 'auto-off', or 'auto' for the autoload value stored in the DB, while still supporting the previous 'yes' and 'no' values for backwards compatibility.

However, there are still many places in core that will create new options using the previous values. These should be updated to use the new schema for consistency.

Most notably, populate_options() sets options on a new site using the previous 'yes' or 'no' values.

Other functions to update:

  • set_transient()
  • add_network_option()
  • wp_ajax_wp_compression_test()

There may be others that I missed in a quick scan of the codebase, but those should cover most cases.

Change History (9)

This ticket was mentioned in Slack in #core-performance by joemcgill. View the logs.


6 weeks ago

This ticket was mentioned in PR #6417 on WordPress/wordpress-develop by @pbearne.


6 weeks ago
#2

  • Keywords has-patch added

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.

This ticket was mentioned in Slack in #core-performance by joemcgill. View the logs.


5 weeks ago

#4 @joemcgill
5 weeks ago

  • Keywords commit added
  • Owner changed from pbearne to joemcgill

I have reviewed PR #6417 and am marking for commit. I'll handle unless someone beats me to it or additional feedback is raised.

#5 @joemcgill
4 weeks ago

  • Keywords changes-requested added; commit removed

A couple of small revisions are needed. Removing the commit keyword.

This ticket was mentioned in Slack in #core-performance by joemcgill. View the logs.


4 weeks ago

#7 @joemcgill
3 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 58105:

Options: Update default autoload values used in core.

This updates the values used for the $autoload parameter in various functions to replace 'yes' and 'no' with 'on' and 'off', respectively.

Follow-up to [57920].

Props pbearne, mukesh27, joemcgill.
Fixes #61045. See #42441.

This ticket was mentioned in Slack in #core-performance by joemcgill. View the logs.


3 weeks ago

Note: See TracTickets for help on using tickets.