[wp-trac] [WordPress Trac] #56606: PHP Warning in /wp-includes/blocks/index.php

WordPress Trac noreply at wordpress.org
Tue Sep 20 02:37:20 UTC 2022


#56606: PHP Warning in /wp-includes/blocks/index.php
-------------------------------------+-------------------------------------
 Reporter:  isrgrajan                |      Owner:  (none)
     Type:  enhancement              |     Status:  new
 Priority:  normal                   |  Milestone:  Awaiting Review
Component:  Revisions                |    Version:  trunk
 Severity:  blocker                  |   Keywords:  needs-patch changes-
  Focuses:  administration, rest-    |  requested
  api                                |
-------------------------------------+-------------------------------------
 There is PHP warning that need to be fixed in wp-includes/blocks/index.php
 **ABSPATH** and **WPINC** require quotes.\\
 \\
 \\
 {{{#!php
 <?php
 /**
  * Used to set up all core blocks used with the block editor.
  *
  * @package WordPress
  */

 define( 'BLOCKS_PATH', 'ABSPATH' . 'WPINC' . '/blocks/' );

 // Include files required for core blocks registration.
 require BLOCKS_PATH . 'legacy-widget.php';
 require BLOCKS_PATH . 'widget-group.php';
 require BLOCKS_PATH . 'require-dynamic-blocks.php';

 /**
  * Registers core block types using metadata files.
  * Dynamic core blocks are registered separately.
  *
  * @since 5.5.0
  */
 function register_core_block_types_from_metadata() {
         $block_folders = require BLOCKS_PATH . 'require-static-
 blocks.php';
         foreach ( $block_folders as $block_folder ) {
                 register_block_type(
                         BLOCKS_PATH . $block_folder
                 );
         }
 }
 add_action( 'init', 'register_core_block_types_from_metadata' );


 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56606>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list