-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathindex.php
45 lines (38 loc) · 1.08 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Server-side registration of the `core/audio` block.
*
* @package gutenberg
*/
/**
* Registers the `core/audio` block on the server-side.
*
* @since 2.7.0
*/
function register_core_audio_block() {
wp_register_script(
'core-audio-block',
gutenberg_url( '/build/__block_audio.js' ),
array( 'wp-blocks', 'wp-i18n', 'wp-components', 'wp-element', 'wp-utils' )
);
wp_register_style(
'core-audio-block',
gutenberg_url( '/build/__block_audio.css' ),
array(),
filemtime( gutenberg_dir_path() . 'build/__block_audio.css' )
);
wp_style_add_data( 'core-audio-block', 'rtl', 'replace' );
wp_register_style(
'core-audio-block-editor',
gutenberg_url( '/build/__block_audio_editor.css' ),
array(),
filemtime( gutenberg_dir_path() . 'build/__block_audio_editor.css' )
);
wp_style_add_data( 'core-audio-block-editor', 'rtl', 'replace' );
register_block_type( 'core/audio', array(
'style' => 'core-audio-block',
'editor_style' => 'core-audio-block-editor',
'editor_script' => 'core-audio-block',
) );
}
add_action( 'init', 'register_core_audio_block' );