[wp-trac] [WordPress Trac] #38924: Getting 'embed_autourls' option still generates a DB query
WordPress Trac
noreply at wordpress.org
Thu Nov 24 06:20:03 UTC 2016
#38924: Getting 'embed_autourls' option still generates a DB query
--------------------------+-----------------------------
Reporter: dlh | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
I noticed this behavior while debugging a plugin that checks `get_option(
'embed_autourls' )`.
`default-filters.php` contains `add_filter(
'default_option_embed_autourls', '__return_true' )`, but `get_option()`
will have already queried for the option before that filter is applied.
The attached patch would switch to `pre_option_embed_autourls` to
shortcircuit `get_option()` before it queries for anything.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38924>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list