You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add_action( 'wp_before_include_template', 'wp_start_template_enhancement_output_buffer', 1000 ); // Late priority to let `wp_template_enhancement_output_buffer` filters and `wp_send_late_headers` actions be registered.
426
+
add_action( 'wp_before_include_template', 'wp_start_template_enhancement_output_buffer', 1000 ); // Late priority to let `wp_template_enhancement_output_buffer` filters and `wp_finalized_template_enhancement_output_buffer` actions be registered.
Copy file name to clipboardExpand all lines: src/wp-includes/embed.php
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -332,8 +332,19 @@ function wp_oembed_register_route() {
332
332
*
333
333
* @since 4.4.0
334
334
* @since 6.8.0 Output was adjusted to only embed if the post supports it.
335
+
* @since 6.9.0 Now runs first at `wp_head` priority 4, with a fallback to priority 10. This helps ensure the discovery links appear within the first 150KB.
335
336
*/
336
337
functionwp_oembed_add_discovery_links() {
338
+
if ( doing_action( 'wp_head' ) ) {
339
+
// For back-compat, short-circuit if a plugin has removed the action at the original priority.
340
+
if ( ! has_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ) ) {
341
+
return;
342
+
}
343
+
344
+
// Prevent running again at the original priority.
0 commit comments