wp/wp-includes/blocks/shortcode.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 21 48c4eec2b7e6
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    19 
    19 
    20 /**
    20 /**
    21  * Registers the `core/shortcode` block on server.
    21  * Registers the `core/shortcode` block on server.
    22  */
    22  */
    23 function register_block_core_shortcode() {
    23 function register_block_core_shortcode() {
    24 	register_block_type(
    24 	register_block_type_from_metadata(
    25 		'core/shortcode',
    25 		__DIR__ . '/shortcode',
    26 		array(
    26 		array(
    27 			'render_callback' => 'render_block_core_shortcode',
    27 			'render_callback' => 'render_block_core_shortcode',
    28 		)
    28 		)
    29 	);
    29 	);
    30 }
    30 }
    31 
       
    32 add_action( 'init', 'register_block_core_shortcode' );
    31 add_action( 'init', 'register_block_core_shortcode' );