Completed
Push — update/block-loading-split ( 14d411 )
by Jeremy
07:04
created

blocks.php ➔ jetpack_slideshow_block_load_assets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 10
rs 9.9332
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
 * @package Jetpack
8
 */
9
10
/**
11
 * Load all blocks inside the modules/blocks folder.
12
 */
13
function jetpack_load_blocks() {
14
	$blocks_include = array();
15
16
	foreach ( Jetpack::glob_php( dirname( __FILE__ ) . '/blocks' ) as $file ) {
17
		$blocks_include[] = $file;
18
	}
19
20
	foreach ( $blocks_include as $include ) {
21
		include_once $include;
22
	}
23
}
24
jetpack_load_blocks();
25