Completed
Push — gm-17/payment-widget ( cb2702...55e70e )
by
unknown
13:32 queued 03:19
created

twentyfifteen.php ➔ twentyfifteen_infinite_scroll_init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Infinite Scroll Theme Assets
4
 *
5
 * Register support for Twenty Fifteen.
6
 */
7
8
/**
9
 * Add theme support for infinite scroll
10
 */
11
function jetpack_twentyfifteen_infinite_scroll_init() {
12
	add_theme_support( 'infinite-scroll', array(
13
		'container' => 'main',
14
		'footer'    => 'page',
15
	) );
16
}
17
add_action( 'after_setup_theme', 'jetpack_twentyfifteen_infinite_scroll_init' );
18
19
/**
20
 * Enqueue CSS stylesheet with theme styles for Infinite Scroll.
21
 */
22
function jetpack_twentyfifteen_infinite_scroll_enqueue_styles() {
23
	if ( wp_script_is( 'the-neverending-homepage' ) ) {
24
		wp_enqueue_style( 'infinity-twentyfifteen', plugins_url( 'twentyfifteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20141022' );
25
		wp_style_add_data( 'infinity-twentyfifteen', 'rtl', 'replace' );
26
	}
27
}
28
add_action( 'wp_enqueue_scripts', 'jetpack_twentyfifteen_infinite_scroll_enqueue_styles', 25 );
29