Make WordPress Core


Ignore:
Timestamp:
11/01/2025 04:44:21 AM (5 months ago)
Author:
westonruter
Message:

General: Rename wp_send_late_headers action to wp_finalized_template_enhancement_output_buffer.

Also update docs for wp_finalized_template_enhancement_output_buffer action and wp_template_enhancement_output_buffer filter to warn against attempting to open an output buffer in callbacks or else a PHP fatal error will occur.

Developed in https://github.com/WordPress/wordpress-develop/pull/10443

Follow-up to [61088], [60936].

Props westonruter, dmsnell.
See #43258.
Fixes #64126.

File:
1 edited

Legend:

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

    r61089 r61111  
    424424add_action( 'do_robots', 'do_robots' );
    425425add_action( 'do_favicon', 'do_favicon' );
    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_send_late_headers` actions be registered.
     426add_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.
    427427add_action( 'set_comment_cookies', 'wp_set_comment_cookies', 10, 3 );
    428428add_action( 'sanitize_comment_cookies', 'sanitize_comment_cookies' );
Note: See TracChangeset for help on using the changeset viewer.