1: | <?php |
2: | /** |
3: | * Functions to register client-side assets (scripts and stylesheets) for the Gutenberg block. |
4: | * |
5: | * @package event-post |
6: | * @version 5.10.1 |
7: | * @since 5.2 |
8: | * @see https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type/#enqueuing-block-scripts |
9: | */ |
10: | |
11: | /** |
12: | * Registers eventpost/details block |
13: | */ |
14: | |
15: | function eventdetails_block_init() { |
16: | $dir_path = EventPost()->plugin_path; |
17: | |
18: | \register_block_type( $dir_path . '/build/details', array( |
19: | 'render_callback' => array(EventPost()->Shortcodes, 'shortcode_single'), |
20: | )); |
21: | } |
22: | add_action( 'wp_loaded', 'eventdetails_block_init' ); |
23: |