Completed
Push — add/testimonial-block ( d1499d...7b1fd1 )
by
unknown
07:06
created

testimonial.php ➔ jetpack_testimonial_block_load_assets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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