-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
64 lines (51 loc) · 1.81 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
// File Security Check
if ( ! function_exists( 'wp' ) && ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
die ( 'You do not have sufficient permissions to access this page!' );
}
?><?php
/**
* Index Template
*
* Here we setup all logic and XHTML that is required for the index template, used as both the homepage
* and as a fallback template, if a more appropriate template file doesn't exist for a specific context.
*
* @package WooFramework
* @subpackage Template
*/
get_header();
global $woo_options;
$settings = array(
'homepage_enable_intro_message' => true,
'homepage_enable_popular_posts' => true,
'homepage_enable_testimonials' => true,
'homepage_enable_sensei' => true,
'homepage_enable_recent_posts' => true,
'homepage_enable_our_team' => true,
'homepage_enable_event_categories' => true
);
$settings = woo_get_dynamic_values( $settings );
?>
<div id="content">
<section id="homepage-content">
<?php
$homepage_sections = apply_filters('woo_homepage_order', array(
'intro-message',
'event-categories',
'popular-posts',
'testimonials',
'sensei',
'recent-posts'
) );
// Include homepage sections
foreach ( $homepage_sections as $section ) {
if ( 'true' == $settings[ 'homepage_enable_' . str_replace( '-', '_', $section ) ] ) {
if ( $section == 'sensei' && !class_exists( 'Woothemes_Sensei' ) ) continue;
if ( $section == 'testimonials' && !class_exists( 'Woothemes_Testimonials' ) ) continue;
get_template_part( 'includes/homepage/' . $section );
}
}
?>
</section><!-- /#homepage-content -->
</div><!-- /#content -->
<?php get_footer(); ?>