Ticket #46004: parsed_blocks.diff
| File parsed_blocks.diff, 985 bytes (added by , 8 years ago) |
|---|
-
wp-includes/class-wp.php
388 388 } 389 389 390 390 /** 391 * Allow performing actions based on the blocks in the content. 392 * 393 * This allows plugins and themes to send headers or enqueue styles and scripts based on the blocks in the 394 * current page. 395 * 396 * @since 5.2 397 */ 398 public function parse_blocks() { 399 if ( is_singular() ) { 400 do_action( 'parsed_blocks', parse_blocks( get_the_content() ) ); 401 } 402 } 403 404 /** 391 405 * Sends additional HTTP headers for caching, content type, etc. 392 406 * 393 407 * Sets the Content-Type header. Sets the 'error' status (if passed) and optionally exits. … … 735 749 public function main( $query_args = '' ) { 736 750 $this->init(); 737 751 $this->parse_request( $query_args ); 752 $this->parse_blocks(); 738 753 $this->send_headers(); 739 754 $this->query_posts(); 740 755 $this->handle_404();
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)