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

blocks.php ➔ jetpack_load_blocks()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 4
nop 0
dl 0
loc 11
rs 9.9
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