[wp-trac] [WordPress Trac] #57836: Make `can_compress_scripts` option autoload.

WordPress Trac noreply at wordpress.org
Wed Mar 1 12:07:09 UTC 2023


#57836: Make `can_compress_scripts` option autoload.
--------------------------------+----------------------------
 Reporter:  spacedmonkey        |      Owner:  (none)
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Future Release
Component:  Options, Meta APIs  |    Version:  2.8
 Severity:  normal              |   Keywords:
  Focuses:  performance         |
--------------------------------+----------------------------
 The `can_compress_scripts` option is loaded in `script_concat_settings`
 function. This function is called on every page request. This option
 should be autoloaded, as it currently requests another database request to
 the option.

 The reason why this option is not autoloaded, when the option is saved it
 calls `update_site_option`, which fallbacks to calling `add_site_option`
 and

 {{{#!php
 $result = add_option( $option, $value, '', 'no' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57836>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list