summaryrefslogtreecommitdiff
blob: a3b6e61681ff709e3dae2b27b213b5f96c3ede71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
 * Pinterest Block.
 *
 * @since 8.0.0
 *
 * @package Jetpack
 */

jetpack_register_block(
	'jetpack/pinterest',
	array( 'render_callback' => 'jetpack_pinterest_block_load_assets' )
);

/**
 * Pinterest block registration/dependency declaration.
 *
 * @param array  $attr    Array containing the Pinterest block attributes.
 * @param string $content String containing the Pinterest block content.
 *
 * @return string
 */
function jetpack_pinterest_block_load_assets( $attr, $content ) {
	wp_enqueue_script( 'pinterest-pinit', 'https://assets.pinterest.com/js/pinit.js', array(), JETPACK__VERSION, true );
	return $content;
}