Completed
Push — update/simple-payments-block ( 3e7154...dd9bd2 )
by
unknown
09:20 queued 02:30
created

slideshow.php ➔ jetpack_slideshow_block_slides()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 26

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 1
nop 3
dl 0
loc 26
rs 9.504
c 0
b 0
f 0
1
<?php
2
/**
3
 * Slideshow Block.
4
 *
5
 * @since 7.1.0
6
 *
7
 * @package Jetpack
8
 */
9
10
jetpack_register_block(
11
	'jetpack/slideshow',
12
	array(
13
		'render_callback' => 'jetpack_slideshow_block_load_assets',
14
	)
15
);
16
17
/**
18
 * Slideshow block registration/dependency declaration.
19
 *
20
 * @param array  $attr    Array containing the slideshow block attributes.
21
 * @param string $content String containing the slideshow block content.
22
 *
23
 * @return string
24
 */
25
function jetpack_slideshow_block_load_assets( $attr, $content ) {
26
	Jetpack_Gutenberg::load_assets_as_required( 'slideshow' );
27
	return $content;
28
}
29