Completed
Push — try/block-dependencies ( 7ddb53...ea4724 )
by
unknown
10:27 queued 02:45
created

blocks.php ➔ jetpack_map_block_load_assets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
/**
3
 * Load code specific to Gutenberg blocks which are not tied to a module.
4
 * This file is unusual, and is not an actual `module` as such.
5
 * It is included in ./module-extras.php
6
 *
7
 */
8
9
jetpack_register_block(
10
	'map',
11
	array(
12
		'render_callback' => 'jetpack_map_block_load_assets',
13
	)
14
);
15
16
function jetpack_map_block_load_assets( $attr, $content ) {
17
	$dependencies = array(
18
		'wp-element',
19
		'wp-i18n',
20
		'wp-api-fetch',
21
	);
22
	Jetpack_Gutenberg::load_assets_as_required( 'map', $dependencies );
23
	return $content;
24
}
25