| 1 |
<?php |
| 2 |
/** |
| 3 |
* Block directory functions. |
| 4 |
* |
| 5 |
* @package gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( |
| 9 |
gutenberg_is_experiment_enabled( 'gutenberg-block-directory' ) && |
| 10 |
! has_action( 'admin_enqueue_scripts', 'enqueue_block_editor_assets_block_directory' ) |
| 11 |
) { |
| 12 |
/** |
| 13 |
* Function responsible for enqueuing the assets required |
| 14 |
* for the block directory functionality in the editor. |
| 15 |
*/ |
| 16 |
function gutenberg_enqueue_block_editor_assets_block_directory() { |
| 17 |
wp_enqueue_script( 'wp-block-directory' ); |
| 18 |
wp_enqueue_style( 'wp-block-directory' ); |
| 19 |
} |
| 20 |
add_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' ); |
| 21 |
} |
| 22 |
|