Completed
Branch master (86af2e)
by
unknown
01:53
created

auto-load-next-post-themes-supported.php ➔ alnp_themes_supported()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 16
rs 9.7333
c 0
b 0
f 0
1
<?php
2
/**
3
 * Auto Load Next Post Themes Supported
4
 *
5
 * Handles all supported themes out of the box.
6
 *
7
 * @since    1.5.5
8
 * @author   Sébastien Dumont
9
 * @category Core
10
 * @package  Auto Load Next Post/Core/Functions
11
 * @license  GPL-2.0+
12
 */
13
14
// Exit if accessed directly.
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit;
17
}
18
19
function alnp_themes_supported() {
20
	return array( 
21
		'make', 
22
		'sydney', 
23
		'storefront', 
24
		'twentyten',
25
		'twentyeleven', 
26
		'twentytwelve', 
27
		'twentythirteen', 
28
		'twentyfourteen', 
29
		'twentyfifteen', 
30
		'twentysixteen', 
31
		'twentyseventeen', 
32
		'understrap', 
33
	);
34
} // END alnp_themes_supported()
35
36
/**
37
 * Include classes for theme support.
38
 *
39
 * @access  public
40
 * @since   1.5.0
41
 * @version 1.5.5
42
 */
43
function alnp_include_theme_support() {
44
	$themes_supported = alnp_themes_supported();
45
46
	if ( is_alnp_active_theme( $themes_supported ) ) {
47
		foreach( $themes_supported as $theme ) {
48
			if ( get_template() == $theme ) {
49
				include_once( dirname( __FILE__ ) . '/theme-support/class-alnp-' . $theme . '.php' );
50
			}
51
		}
52
	}
53
54
	include_once( dirname( __FILE__ ) . '/theme-support/class-alnp-theme-support.php' );
55
} // END alnp_include_theme_support()
56