Completed
Push — update/5.4-changelog ( eddd9e...9ff665 )
by Jeremy
11:34 queued 03:51
created

twentythirteen.php ➔ twentythirteen_infinite_scroll_init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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