| 1 |
<?php |
| 2 |
/** |
| 3 |
* Bootstraping the Gutenberg widgets page. |
| 4 |
* |
| 5 |
* @package gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* The main entry point for the Gutenberg widgets page. |
| 10 |
* |
| 11 |
* @since 5.2.0 |
| 12 |
*/ |
| 13 |
function the_gutenberg_widgets() { |
| 14 |
?> |
| 15 |
<div class="blocks-widgets-container"> |
| 16 |
</div> |
| 17 |
<?php |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* Initialize the Gutenberg widgets page. |
| 22 |
* |
| 23 |
* @since 5.2.0 |
| 24 |
* |
| 25 |
* @param string $hook Page. |
| 26 |
*/ |
| 27 |
function gutenberg_widgets_init( $hook ) { |
| 28 |
if ( 'gutenberg_page_gutenberg-widgets' !== $hook ) { |
| 29 |
return; |
| 30 |
} |
| 31 |
|
| 32 |
wp_enqueue_script( 'wp-edit-widgets' ); |
| 33 |
wp_enqueue_style( 'wp-edit-widgets' ); |
| 34 |
} |
| 35 |
add_action( 'admin_enqueue_scripts', 'gutenberg_widgets_init' ); |
| 36 |
|