Completed
Push — add/eventbrite-block ( af596c )
by
unknown
54:56 queued 48:21
created

eventbrite.php ➔ jetpack_eventbrite_block_load_assets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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