@@ -12,26 +12,26 @@ discard block |
||
12 | 12 | * Hooks |
13 | 13 | */ |
14 | 14 | |
15 | -remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); |
|
16 | -remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); |
|
15 | +remove_action('sensei_before_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper'), 10); |
|
16 | +remove_action('sensei_after_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper_end'), 10); |
|
17 | 17 | |
18 | 18 | add_action('sensei_before_main_content', 'lsx_sensei_before_content', 10); |
19 | 19 | add_action('sensei_after_main_content', 'lsx_sensei_after_content', 10); |
20 | 20 | |
21 | 21 | //Switching the course filters and the headers around |
22 | -remove_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 ); |
|
23 | -remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ) ); |
|
24 | -remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ) ); |
|
25 | -add_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 11, 0 ); |
|
26 | -add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ),12 ); |
|
27 | -add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ),12 ); |
|
22 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0); |
|
23 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting')); |
|
24 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters')); |
|
25 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 11, 0); |
|
26 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'), 12); |
|
27 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'), 12); |
|
28 | 28 | |
29 | 29 | // Moving course image up in DOM |
30 | -remove_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,10, 1 ); |
|
31 | -add_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,1, 1 ); |
|
30 | +remove_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 10, 1); |
|
31 | +add_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 1, 1); |
|
32 | 32 | |
33 | -remove_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 20 ); |
|
34 | -add_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 12 ); |
|
33 | +remove_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 20); |
|
34 | +add_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 12); |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Adds the top and primary divs for the layout. |
@@ -39,22 +39,22 @@ discard block |
||
39 | 39 | * @subpackage sensei |
40 | 40 | * @category layout |
41 | 41 | */ |
42 | -function lsx_sensei_wp_head(){ |
|
42 | +function lsx_sensei_wp_head() { |
|
43 | 43 | |
44 | - $layout = get_theme_mod('lsx_layout','2cr'); |
|
45 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
44 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
45 | + $layout = apply_filters('lsx_layout', $layout); |
|
46 | 46 | |
47 | - if('1c' === $layout && is_post_type_archive(array('course','lesson'))) { |
|
48 | - add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11 ); |
|
47 | + if ('1c' === $layout && is_post_type_archive(array('course', 'lesson'))) { |
|
48 | + add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11); |
|
49 | 49 | } |
50 | 50 | |
51 | - if('1c' === $layout && is_tax(array('module','course-category'))) { |
|
51 | + if ('1c' === $layout && is_tax(array('module', 'course-category'))) { |
|
52 | 52 | remove_action('lsx_content_top', 'lsx_breadcrumbs'); |
53 | - add_action( 'sensei_loop_course_before', 'lsx_breadcrumbs', 80 , 1 ); |
|
53 | + add_action('sensei_loop_course_before', 'lsx_breadcrumbs', 80, 1); |
|
54 | 54 | |
55 | - if(is_tax('module')){ |
|
56 | - remove_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 20 ); |
|
57 | - add_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 40 ); |
|
55 | + if (is_tax('module')) { |
|
56 | + remove_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 20); |
|
57 | + add_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 40); |
|
58 | 58 | |
59 | 59 | remove_action('sensei_content_lesson_inside_before', array('Sensei_Core_Modules', 'module_archive_description'), 11); |
60 | 60 | } |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | * @subpackage sensei |
74 | 74 | * @category layout |
75 | 75 | */ |
76 | -function lsx_sensei_before_content(){ ?> |
|
76 | +function lsx_sensei_before_content() { ?> |
|
77 | 77 | <?php lsx_content_wrap_before(); ?> |
78 | 78 | |
79 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
79 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
80 | 80 | |
81 | 81 | <?php lsx_content_before(); ?> |
82 | 82 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @subpackage sensei |
93 | 93 | * @category layout |
94 | 94 | */ |
95 | -function lsx_sensei_after_content(){ ?> |
|
95 | +function lsx_sensei_after_content() { ?> |
|
96 | 96 | <?php lsx_content_bottom(); ?> |
97 | 97 | |
98 | 98 | </main><!-- #main --> |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * @subpackage sensei |
117 | 117 | * @category redirect |
118 | 118 | */ |
119 | -add_filter( 'sensei_disable_styles', '__return_true' ); |
|
119 | +add_filter('sensei_disable_styles', '__return_true'); |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Includes the sensei specific styles. |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | * @category styles |
126 | 126 | */ |
127 | 127 | function lsx_sensei_styles() { |
128 | - wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css', array(), LSX_VERSION ); |
|
128 | + wp_enqueue_style('sensei', get_template_directory_uri() . '/css/sensei.css', array(), LSX_VERSION); |
|
129 | 129 | } |
130 | -add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' ); |
|
130 | +add_action('wp_enqueue_scripts', 'lsx_sensei_styles'); |
|
131 | 131 | |
132 | 132 | /** |
133 | 133 | * Redirects Lessons Archive to Courses Overview |
@@ -135,13 +135,13 @@ discard block |
||
135 | 135 | * @subpackage woocommerce |
136 | 136 | * @category styles |
137 | 137 | */ |
138 | -function lsx_sensei_redirect_to_home( $query ){ |
|
139 | - if ( ! is_admin() && is_post_type_archive( 'lesson' ) && $query->is_main_query() ) { |
|
140 | - wp_redirect( home_url() . '/courses-overview' ); |
|
138 | +function lsx_sensei_redirect_to_home($query) { |
|
139 | + if ( ! is_admin() && is_post_type_archive('lesson') && $query->is_main_query()) { |
|
140 | + wp_redirect(home_url() . '/courses-overview'); |
|
141 | 141 | exit; |
142 | 142 | } |
143 | 143 | } |
144 | -add_action( 'parse_query', 'lsx_sensei_redirect_to_home' ); |
|
144 | +add_action('parse_query', 'lsx_sensei_redirect_to_home'); |
|
145 | 145 | |
146 | 146 | /** |
147 | 147 | * Filters the archive title |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | * @subpackage woocommerce |
150 | 150 | * @category styles |
151 | 151 | */ |
152 | -function lsx_sensei_category_title( $html,$term_id ){ |
|
153 | - $html = str_replace('h2','h1',$html); |
|
154 | - $html = str_replace('sensei-category-title','archive-title',$html); |
|
152 | +function lsx_sensei_category_title($html, $term_id) { |
|
153 | + $html = str_replace('h2', 'h1', $html); |
|
154 | + $html = str_replace('sensei-category-title', 'archive-title', $html); |
|
155 | 155 | |
156 | - return '<header class="archive-header">'.$html.'</header>'; |
|
156 | + return '<header class="archive-header">' . $html . '</header>'; |
|
157 | 157 | } |
158 | -add_filter( 'course_category_title', 'lsx_sensei_category_title',1,10 ); |
|
159 | 158 | \ No newline at end of file |
159 | +add_filter('course_category_title', 'lsx_sensei_category_title', 1, 10); |
|
160 | 160 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Theme Configuration File |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @package lsx |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! function_exists( 'lsx_setup' ) ) : |
|
11 | +if ( ! function_exists('lsx_setup')) : |
|
12 | 12 | /** |
13 | 13 | * Sets up theme defaults and registers support for various WordPress features. |
14 | 14 | * |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | function lsx_setup() { |
20 | 20 | global $content_width; |
21 | 21 | |
22 | - load_theme_textdomain( 'lsx', get_template_directory() . '/languages' ); |
|
22 | + load_theme_textdomain('lsx', get_template_directory() . '/languages'); |
|
23 | 23 | |
24 | 24 | $args = array( |
25 | 25 | 'header-text' => array( |
@@ -28,68 +28,68 @@ discard block |
||
28 | 28 | ), |
29 | 29 | 'size' => 'medium', |
30 | 30 | ); |
31 | - add_theme_support( 'site-logo', $args ); |
|
31 | + add_theme_support('site-logo', $args); |
|
32 | 32 | |
33 | - add_theme_support( 'custom-logo', array( |
|
33 | + add_theme_support('custom-logo', array( |
|
34 | 34 | 'height' => 50, |
35 | 35 | 'width' => 150, |
36 | 36 | 'flex-width' => true, |
37 | 37 | 'flex-height' => true, |
38 | - ) ); |
|
38 | + )); |
|
39 | 39 | |
40 | - add_theme_support( 'custom-background' ); |
|
41 | - add_theme_support( 'automatic-feed-links' ); |
|
42 | - add_theme_support( 'title-tag' ); |
|
43 | - add_theme_support( 'post-thumbnails' ); |
|
44 | - add_theme_support( 'post-formats', array('image', 'video', 'gallery', 'audio', 'link', 'quote', 'aside') ); |
|
40 | + add_theme_support('custom-background'); |
|
41 | + add_theme_support('automatic-feed-links'); |
|
42 | + add_theme_support('title-tag'); |
|
43 | + add_theme_support('post-thumbnails'); |
|
44 | + add_theme_support('post-formats', array('image', 'video', 'gallery', 'audio', 'link', 'quote', 'aside')); |
|
45 | 45 | |
46 | 46 | // This theme uses wp_nav_menu() in one location. |
47 | - register_nav_menus( array( |
|
48 | - 'primary' => esc_html__( 'Primary Menu', 'lsx' ), |
|
49 | - 'top-menu'=> esc_html__( 'Top Menu (right)' , 'lsx' ), |
|
50 | - 'top-menu-left'=> esc_html__( 'Top Menu (left)' , 'lsx' ), |
|
51 | - 'social'=> esc_html__( 'Social Menu' , 'lsx' ), |
|
52 | - 'footer'=> esc_html__( 'Footer Menu' , 'lsx' ) |
|
53 | - ) ); |
|
47 | + register_nav_menus(array( |
|
48 | + 'primary' => esc_html__('Primary Menu', 'lsx'), |
|
49 | + 'top-menu'=> esc_html__('Top Menu (right)', 'lsx'), |
|
50 | + 'top-menu-left'=> esc_html__('Top Menu (left)', 'lsx'), |
|
51 | + 'social'=> esc_html__('Social Menu', 'lsx'), |
|
52 | + 'footer'=> esc_html__('Footer Menu', 'lsx') |
|
53 | + )); |
|
54 | 54 | |
55 | 55 | //Set the content width |
56 | 56 | $content_width = 1140; |
57 | 57 | |
58 | - add_editor_style( get_template_directory_uri() . '/css/editor-style.css' ); |
|
59 | - add_theme_support( 'html5', array( 'caption' ) ); |
|
58 | + add_editor_style(get_template_directory_uri() . '/css/editor-style.css'); |
|
59 | + add_theme_support('html5', array('caption')); |
|
60 | 60 | |
61 | - add_theme_support( 'woocommerce' ); |
|
62 | - add_theme_support( 'sensei' ); |
|
61 | + add_theme_support('woocommerce'); |
|
62 | + add_theme_support('sensei'); |
|
63 | 63 | |
64 | - add_theme_support( 'starter-content', array( |
|
64 | + add_theme_support('starter-content', array( |
|
65 | 65 | 'widgets' => array( |
66 | 66 | 'sidebar-home' => array( |
67 | 67 | 'custom_widget_1' => array( |
68 | 68 | 'text', |
69 | 69 | array( |
70 | 70 | 'title' => '', |
71 | - 'text' => wp_kses_post( '<div class="lsx-full-width"><div class="row"><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p></div></div></div>' ), |
|
71 | + 'text' => wp_kses_post('<div class="lsx-full-width"><div class="row"><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p></div></div></div>'), |
|
72 | 72 | ) |
73 | 73 | ), |
74 | 74 | 'custom_widget_2' => array( |
75 | 75 | 'text', |
76 | 76 | array( |
77 | 77 | 'title' => '', |
78 | - 'text' => wp_kses_post( '<div class="row"><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p></div><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque <a href="#">volutpat mattis eros</a>.</p></div></div>' ), |
|
78 | + 'text' => wp_kses_post('<div class="row"><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p></div><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque <a href="#">volutpat mattis eros</a>.</p></div></div>'), |
|
79 | 79 | ) |
80 | 80 | ), |
81 | 81 | 'custom_widget_3' => array( |
82 | 82 | 'text', |
83 | 83 | array( |
84 | 84 | 'title' => '', |
85 | - 'text' => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn">Lorem ipsum</a></p></div></div></div>' ), |
|
85 | + 'text' => wp_kses_post('<div class="lsx-full-width-alt"><div class="row"><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn">Lorem ipsum</a></p></div></div></div>'), |
|
86 | 86 | ) |
87 | 87 | ), |
88 | 88 | 'custom_widget_4' => array( |
89 | 89 | 'text', |
90 | 90 | array( |
91 | 91 | 'title' => '', |
92 | - 'text' => wp_kses_post( '<div class="row"><div class="col-sm-12"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ), |
|
92 | + 'text' => wp_kses_post('<div class="row"><div class="col-sm-12"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>'), |
|
93 | 93 | ) |
94 | 94 | ), |
95 | 95 | ), |
@@ -98,22 +98,22 @@ discard block |
||
98 | 98 | 'custom_widget_1' => array( |
99 | 99 | 'text', |
100 | 100 | array( |
101 | - 'title' => esc_html__( 'Footer Widget', 'lsx' ), |
|
102 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx' ), |
|
101 | + 'title' => esc_html__('Footer Widget', 'lsx'), |
|
102 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx'), |
|
103 | 103 | ) |
104 | 104 | ), |
105 | 105 | 'custom_widget_2' => array( |
106 | 106 | 'text', |
107 | 107 | array( |
108 | - 'title' => esc_html__( 'Footer Widget', 'lsx' ), |
|
109 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx' ), |
|
108 | + 'title' => esc_html__('Footer Widget', 'lsx'), |
|
109 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx'), |
|
110 | 110 | ) |
111 | 111 | ), |
112 | 112 | 'custom_widget_3' => array( |
113 | 113 | 'text', |
114 | 114 | array( |
115 | - 'title' => esc_html__( 'Footer Widget', 'lsx' ), |
|
116 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx' ), |
|
115 | + 'title' => esc_html__('Footer Widget', 'lsx'), |
|
116 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx'), |
|
117 | 117 | ) |
118 | 118 | ), |
119 | 119 | ), |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | 'custom_widget_1' => array( |
123 | 123 | 'text', |
124 | 124 | array( |
125 | - 'title' => esc_html__( 'Footer Call to Action Widget', 'lsx' ), |
|
126 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ), |
|
125 | + 'title' => esc_html__('Footer Call to Action Widget', 'lsx'), |
|
126 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx'), |
|
127 | 127 | ) |
128 | 128 | ), |
129 | 129 | ), |
@@ -149,15 +149,15 @@ discard block |
||
149 | 149 | |
150 | 150 | 'attachments' => array( |
151 | 151 | 'image-banner-placeholder-01' => array( |
152 | - 'post_title' => esc_html_x( 'Banner Placeholder 01', 'Theme starter content', 'lsx' ), |
|
152 | + 'post_title' => esc_html_x('Banner Placeholder 01', 'Theme starter content', 'lsx'), |
|
153 | 153 | 'file' => 'img/banner-placeholder-01.jpg', |
154 | 154 | ), |
155 | 155 | 'image-banner-placeholder-02' => array( |
156 | - 'post_title' => esc_html_x( 'Banner Placeholder 02', 'Theme starter content', 'lsx' ), |
|
156 | + 'post_title' => esc_html_x('Banner Placeholder 02', 'Theme starter content', 'lsx'), |
|
157 | 157 | 'file' => 'img/banner-placeholder-02.jpg', |
158 | 158 | ), |
159 | 159 | 'image-banner-placeholder-03' => array( |
160 | - 'post_title' => esc_html_x( 'Banner Placeholder 03', 'Theme starter content', 'lsx' ), |
|
160 | + 'post_title' => esc_html_x('Banner Placeholder 03', 'Theme starter content', 'lsx'), |
|
161 | 161 | 'file' => 'img/banner-placeholder-03.jpg', |
162 | 162 | ), |
163 | 163 | ), |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | 'nav_menus' => array( |
172 | 172 | 'primary' => array( |
173 | - 'name' => esc_html__( 'Primary Menu', 'lsx' ), |
|
173 | + 'name' => esc_html__('Primary Menu', 'lsx'), |
|
174 | 174 | 'items' => array( |
175 | 175 | 'page_home', |
176 | 176 | 'page_about', |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | ), |
180 | 180 | ), |
181 | 181 | 'top-menu' => array( |
182 | - 'name' => esc_html__( 'Top Menu', 'lsx' ), |
|
182 | + 'name' => esc_html__('Top Menu', 'lsx'), |
|
183 | 183 | 'items' => array( |
184 | 184 | 'custom_link_1' => array( |
185 | 185 | 'title' => 'View Map', |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | ), |
203 | 203 | ), |
204 | 204 | 'social' => array( |
205 | - 'name' => esc_html__( 'Social Menu', 'lsx' ), |
|
205 | + 'name' => esc_html__('Social Menu', 'lsx'), |
|
206 | 206 | 'items' => array( |
207 | 207 | 'link_facebook', |
208 | 208 | 'link_foursquare', |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ), |
216 | 216 | ), |
217 | 217 | 'footer' => array( |
218 | - 'name' => esc_html__( 'Footer Menu', 'lsx' ), |
|
218 | + 'name' => esc_html__('Footer Menu', 'lsx'), |
|
219 | 219 | 'items' => array( |
220 | 220 | 'page_about', |
221 | 221 | 'page_contact', |
@@ -228,21 +228,21 @@ discard block |
||
228 | 228 | 'lsx_header_search' => '1', |
229 | 229 | 'lsx_layout' => '1c', |
230 | 230 | ), |
231 | - ) ); |
|
231 | + )); |
|
232 | 232 | } |
233 | 233 | endif; // lsx_setup |
234 | -add_action( 'after_setup_theme', 'lsx_setup' ); |
|
234 | +add_action('after_setup_theme', 'lsx_setup'); |
|
235 | 235 | |
236 | 236 | /** |
237 | 237 | * Removes the "Custom Fields" meta box. |
238 | 238 | */ |
239 | 239 | function lsx_remove_meta_boxes() { |
240 | 240 | $post_types = get_post_types(); |
241 | - foreach($post_types as $post_type){ |
|
242 | - remove_meta_box( 'postcustom' , $post_type , 'normal' ); |
|
241 | + foreach ($post_types as $post_type) { |
|
242 | + remove_meta_box('postcustom', $post_type, 'normal'); |
|
243 | 243 | } |
244 | 244 | } |
245 | -add_action( 'admin_menu' , 'lsx_remove_meta_boxes' ); |
|
245 | +add_action('admin_menu', 'lsx_remove_meta_boxes'); |
|
246 | 246 | |
247 | 247 | /** |
248 | 248 | * Overwrite the $content_width var, based on the layout of the page. |
@@ -254,33 +254,33 @@ discard block |
||
254 | 254 | function lsx_process_content_width() { |
255 | 255 | global $content_width; |
256 | 256 | |
257 | - if( |
|
257 | + if ( |
|
258 | 258 | is_page_template('page-templates/template-portfolio.php') || |
259 | 259 | is_page_template('page-templates/template-front-page.php') || |
260 | 260 | is_page_template('page-templates/template-full-width.php') || |
261 | 261 | is_post_type_archive('jetpack-portfolio') || |
262 | - is_tax(array('jetpack-portfolio-type','jetpack-portfolio-tag')) || |
|
262 | + is_tax(array('jetpack-portfolio-type', 'jetpack-portfolio-tag')) || |
|
263 | 263 | is_singular('jetpack-portfolio') |
264 | - ){ |
|
264 | + ) { |
|
265 | 265 | $content_width = 1140; |
266 | 266 | } |
267 | 267 | } |
268 | -add_action('wp_head','lsx_process_content_width'); |
|
268 | +add_action('wp_head', 'lsx_process_content_width'); |
|
269 | 269 | |
270 | 270 | /** |
271 | 271 | * Disable the comments form by default for the page post type. |
272 | 272 | * @package lsx |
273 | 273 | * @subpackage config |
274 | 274 | */ |
275 | -function lsx_page_comments_off( $data ) { |
|
276 | - if ( 'page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__( 'Auto Draft', 'lsx' ) == $data['post_title'] ) { |
|
275 | +function lsx_page_comments_off($data) { |
|
276 | + if ('page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__('Auto Draft', 'lsx') == $data['post_title']) { |
|
277 | 277 | $data['comment_status'] = 0; |
278 | 278 | $data['ping_status'] = 0; |
279 | 279 | } |
280 | 280 | |
281 | 281 | return $data; |
282 | 282 | } |
283 | -add_filter( 'wp_insert_post_data', 'lsx_page_comments_off' ); |
|
283 | +add_filter('wp_insert_post_data', 'lsx_page_comments_off'); |
|
284 | 284 | |
285 | 285 | /** |
286 | 286 | * Disable the comments form by default for the page post type. |
@@ -288,14 +288,14 @@ discard block |
||
288 | 288 | * @subpackage config |
289 | 289 | */ |
290 | 290 | function lsx_is_legacy($data) { |
291 | - if ( 'page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__( 'Auto Draft', 'lsx' ) == $data['post_title'] ) { |
|
291 | + if ('page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__('Auto Draft', 'lsx') == $data['post_title']) { |
|
292 | 292 | $data['comment_status'] = 0; |
293 | 293 | $data['ping_status'] = 0; |
294 | 294 | } |
295 | 295 | |
296 | 296 | return $data; |
297 | 297 | } |
298 | -add_filter( 'wp_insert_post_data', 'lsx_page_comments_off' ); |
|
298 | +add_filter('wp_insert_post_data', 'lsx_page_comments_off'); |
|
299 | 299 | |
300 | 300 | /** |
301 | 301 | * Run the init command |
@@ -303,11 +303,11 @@ discard block |
||
303 | 303 | * @subpackage config |
304 | 304 | */ |
305 | 305 | function lsx_init() { |
306 | - if(class_exists('WooCommerce')){ |
|
307 | - remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); |
|
306 | + if (class_exists('WooCommerce')) { |
|
307 | + remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0); |
|
308 | 308 | } |
309 | 309 | } |
310 | -add_action( 'init', 'lsx_init',100 ); |
|
310 | +add_action('init', 'lsx_init', 100); |
|
311 | 311 | |
312 | 312 | /** |
313 | 313 | * Run on the wp_head |
@@ -316,11 +316,11 @@ discard block |
||
316 | 316 | */ |
317 | 317 | function lsx_wp_head() { |
318 | 318 | |
319 | - $layout = get_theme_mod('lsx_layout','2cr'); |
|
320 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
319 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
320 | + $layout = apply_filters('lsx_layout', $layout); |
|
321 | 321 | |
322 | - if('1c' === $layout && (is_author() || is_search() || (is_post_type_archive(array('post','page','jetpack-portfolio')) && !is_post_type_archive('tribe_events')) || is_tag() || is_category() || is_date() || is_tax('post_format')) ){ |
|
323 | - remove_action('lsx_content_top', 'lsx_breadcrumbs', 100 ); |
|
322 | + if ('1c' === $layout && (is_author() || is_search() || (is_post_type_archive(array('post', 'page', 'jetpack-portfolio')) && ! is_post_type_archive('tribe_events')) || is_tag() || is_category() || is_date() || is_tax('post_format'))) { |
|
323 | + remove_action('lsx_content_top', 'lsx_breadcrumbs', 100); |
|
324 | 324 | } |
325 | 325 | } |
326 | -add_action( 'wp_head', 'lsx_wp_head',100 ); |
|
326 | +add_action('wp_head', 'lsx_wp_head', 100); |