Make WordPress Core

Changeset 58381


Ignore:
Timestamp:
06/11/2024 02:38:42 AM (6 months ago)
Author:
peterwilsoncc
Message:

Options, Meta APIs: Lower priority of default autoload threshold filter.

Lowers the priority at which wp_filter_default_autoload_value_via_option_size() is registered to run on the wp_default_autoload_value() filter. The default filter now runs at priority 5.

This is to allow third party developers to modify whether an option is autoloaded using the default priority, 10, rather than require they register their code to run at a higher priority.

Follow up to [57920].

Props peterwilsoncc, joemcgill.
Fixes #42441.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r58292 r58381  
    287287
    288288// Misc filters.
    289 add_filter( 'wp_default_autoload_value', 'wp_filter_default_autoload_value_via_option_size', 10, 4 );
     289add_filter( 'wp_default_autoload_value', 'wp_filter_default_autoload_value_via_option_size', 5, 4 ); // Allow the value to be overridden at the default priority.
    290290add_filter( 'option_ping_sites', 'privacy_ping_filter' );
    291291add_filter( 'option_blog_charset', '_wp_specialchars' ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop.
Note: See TracChangeset for help on using the changeset viewer.