ALNP_Sydney::add_theme_support()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 10
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
/**
3
 * Auto Load Next Post Theme Support: Sydney
4
 *
5
 * Applies support for aThemes Sydney Theme.
6
 *
7
 * @since    1.5.5
8
 * @author   Sébastien Dumont
9
 * @category Theme Support
10
 * @package  Auto Load Next Post/Theme Support
11
 * @license  GPL-2.0+
12
 */
13
14
// Exit if accessed directly.
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit;
17
}
18
19
/**
20
 * ALNP_Sydney class.
21
 */
22 View Code Duplication
class ALNP_Sydney {
23
24
	/**
25
	 * Initlize Theme.
26
	 *
27
	 * @access public
28
	 * @static
29
	 */
30
	public static function init() {
31
		// Add theme support and preset the theme selectors.
32
		add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) );
33
	} // END init()
34
35
	/**
36
	 * Add theme support by providing the theme selectors
37
	 * to be applied once the theme is activated.
38
	 *
39
	 * @access public
40
	 * @static
41
	 */
42
	public static function add_theme_support() {
43
		add_theme_support( 'auto-load-next-post', array(
44
			'content_container'    => 'main.post-wrap',
45
			'title_selector'       => 'h1.entry-title',
46
			'navigation_container' => 'nav.post-navigation',
47
			'comments_container'   => 'div#comments',
48
			'load_js_in_footer'    => 'no',
49
			'lock_js_in_footer'    => 'no',
50
		) );
51
	} // END add_theme_support()
52
53
} // END class
54
55
ALNP_Sydney::init();
56