Completed
Push — update/add-single-purpose-jetp... ( 28d890...705f7e )
by
unknown
09:19
created

pinterest.php ➔ jetpack_pinterest_block_load_assets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Pinterest Block.
4
 *
5
 * @since 8.0.0
6
 *
7
 * @package Jetpack
8
 */
9
10
jetpack_register_block(
11
	'jetpack/pinterest',
12
	array( 'render_callback' => 'jetpack_pinterest_block_load_assets' )
13
);
14
15
/**
16
 * Pinterest block registration/dependency declaration.
17
 *
18
 * @param array  $attr    Array containing the Pinterest block attributes.
19
 * @param string $content String containing the Pinterest block content.
20
 *
21
 * @return string
22
 */
23
function jetpack_pinterest_block_load_assets( $attr, $content ) {
24
	wp_enqueue_script( 'pinterest-pinit', 'https://assets.pinterest.com/js/pinit.js', array(), JETPACK__VERSION, true );
25
	return $content;
26
}
27