[wp-trac] [WordPress Trac] #17112: Remove default-embeds.php
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 12 03:27:49 UTC 2011
#17112: Remove default-embeds.php
-------------------------+-------------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.2
Component: Performance | Version:
Severity: normal | Keywords: 2nd-opinion
-------------------------+-------------------------
default-embeds.php is a file loaded conditionally, which triggers an extra
sysopen call. This also goes for default-widgets.php, but that's a much
larger file.
On the other hand, if we move the single function,
wp_embed_handler_googlevideo(), to wp-includes/media.php, we can improve
some performance. I don't think we plan to add too many more default
embeds, so this seems pretty safe.
We can still only call wp_embed_register_handler() if the
load_default_embeds filter returns true (found in wp_maybe_load_embeds(),
attached to plugins_loaded).
Only issue could be someone returning false through the filter then
treating it as a pluggable function, stealing its name, but I doubt we'd
see that anywhere. At worst, we could add a function_exists() check (still
better than what we have) or simply rename the function, as embed handlers
are identified by a unique ID, not the function name.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17112>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list