@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @subpackage hooks |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if ( ! defined('ABSPATH')) { |
|
| 10 | 10 | exit; |
| 11 | 11 | } |
| 12 | 12 | |
@@ -17,11 +17,11 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | function lsx_body_top() { |
| 20 | - do_action( 'lsx_body_top' ); |
|
| 20 | + do_action('lsx_body_top'); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | function lsx_body_bottom() { |
| 24 | - do_action( 'lsx_body_bottom' ); |
|
| 24 | + do_action('lsx_body_bottom'); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | 33 | function lsx_head_top() { |
| 34 | - do_action( 'lsx_head_top' ); |
|
| 34 | + do_action('lsx_head_top'); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | function lsx_head_bottom() { |
| 38 | - do_action( 'lsx_head_bottom' ); |
|
| 38 | + do_action('lsx_head_bottom'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -45,27 +45,27 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | |
| 47 | 47 | function lsx_header_before() { |
| 48 | - do_action( 'lsx_header_before' ); |
|
| 48 | + do_action('lsx_header_before'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | function lsx_header_after() { |
| 52 | - do_action( 'lsx_header_after' ); |
|
| 52 | + do_action('lsx_header_after'); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | function lsx_header_top() { |
| 56 | - do_action( 'lsx_header_top' ); |
|
| 56 | + do_action('lsx_header_top'); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | function lsx_header_bottom() { |
| 60 | - do_action( 'lsx_header_bottom' ); |
|
| 60 | + do_action('lsx_header_bottom'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | function lsx_nav_before() { |
| 64 | - do_action( 'lsx_nav_before' ); |
|
| 64 | + do_action('lsx_nav_before'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | function lsx_nav_after() { |
| 68 | - do_action( 'lsx_nav_after' ); |
|
| 68 | + do_action('lsx_nav_after'); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -75,15 +75,15 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | |
| 77 | 77 | function lsx_banner_content() { |
| 78 | - do_action( 'lsx_banner_content' ); |
|
| 78 | + do_action('lsx_banner_content'); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | function lsx_banner_inner_top() { |
| 82 | - do_action( 'lsx_banner_inner_top' ); |
|
| 82 | + do_action('lsx_banner_inner_top'); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | function lsx_banner_inner_bottom() { |
| 86 | - do_action( 'lsx_banner_inner_bottom' ); |
|
| 86 | + do_action('lsx_banner_inner_bottom'); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | |
| 95 | 95 | function lsx_global_header_inner_bottom() { |
| 96 | - do_action( 'lsx_global_header_inner_bottom' ); |
|
| 96 | + do_action('lsx_global_header_inner_bottom'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -103,35 +103,35 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | |
| 105 | 105 | function lsx_content_wrap_before() { |
| 106 | - do_action( 'lsx_content_wrap_before' ); |
|
| 106 | + do_action('lsx_content_wrap_before'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | function lsx_content_wrap_after() { |
| 110 | - do_action( 'lsx_content_wrap_after' ); |
|
| 110 | + do_action('lsx_content_wrap_after'); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | function lsx_content_before() { |
| 114 | - do_action( 'lsx_content_before' ); |
|
| 114 | + do_action('lsx_content_before'); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | function lsx_content_after() { |
| 118 | - do_action( 'lsx_content_after' ); |
|
| 118 | + do_action('lsx_content_after'); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | function lsx_content_top() { |
| 122 | - do_action( 'lsx_content_top' ); |
|
| 122 | + do_action('lsx_content_top'); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | function lsx_content_bottom() { |
| 126 | - do_action( 'lsx_content_bottom' ); |
|
| 126 | + do_action('lsx_content_bottom'); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | function lsx_content_post_tags() { |
| 130 | - do_action( 'lsx_content_post_tags' ); |
|
| 130 | + do_action('lsx_content_post_tags'); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | function lsx_content_sharing() { |
| 134 | - do_action( 'lsx_content_sharing' ); |
|
| 134 | + do_action('lsx_content_sharing'); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -141,19 +141,19 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | |
| 143 | 143 | function lsx_entry_before() { |
| 144 | - do_action( 'lsx_entry_before' ); |
|
| 144 | + do_action('lsx_entry_before'); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | function lsx_entry_after() { |
| 148 | - do_action( 'lsx_entry_after' ); |
|
| 148 | + do_action('lsx_entry_after'); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | function lsx_entry_top() { |
| 152 | - do_action( 'lsx_entry_top' ); |
|
| 152 | + do_action('lsx_entry_top'); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | function lsx_entry_bottom() { |
| 156 | - do_action( 'lsx_entry_bottom' ); |
|
| 156 | + do_action('lsx_entry_bottom'); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -163,27 +163,27 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | |
| 165 | 165 | function lsx_widget_entry_before() { |
| 166 | - do_action( 'lsx_widget_entry_before' ); |
|
| 166 | + do_action('lsx_widget_entry_before'); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | function lsx_widget_entry_after() { |
| 170 | - do_action( 'lsx_widget_entry_after' ); |
|
| 170 | + do_action('lsx_widget_entry_after'); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | function lsx_widget_entry_top() { |
| 174 | - do_action( 'lsx_widget_entry_top' ); |
|
| 174 | + do_action('lsx_widget_entry_top'); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | function lsx_widget_entry_bottom() { |
| 178 | - do_action( 'lsx_widget_entry_bottom' ); |
|
| 178 | + do_action('lsx_widget_entry_bottom'); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | function lsx_widget_entry_content_top() { |
| 182 | - do_action( 'lsx_widget_entry_content_top' ); |
|
| 182 | + do_action('lsx_widget_entry_content_top'); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | function lsx_widget_entry_content_bottom() { |
| 186 | - do_action( 'lsx_widget_entry_content_bottom' ); |
|
| 186 | + do_action('lsx_widget_entry_content_bottom'); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | /** |
@@ -193,11 +193,11 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | |
| 195 | 195 | function lsx_comments_before() { |
| 196 | - do_action( 'lsx_comments_before' ); |
|
| 196 | + do_action('lsx_comments_before'); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | function lsx_comments_after() { |
| 200 | - do_action( 'lsx_comments_after' ); |
|
| 200 | + do_action('lsx_comments_after'); |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
@@ -207,19 +207,19 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | |
| 209 | 209 | function lsx_sidebars_before() { |
| 210 | - do_action( 'lsx_sidebars_before' ); |
|
| 210 | + do_action('lsx_sidebars_before'); |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | function lsx_sidebars_after() { |
| 214 | - do_action( 'lsx_sidebars_after' ); |
|
| 214 | + do_action('lsx_sidebars_after'); |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | function lsx_sidebar_top() { |
| 218 | - do_action( 'lsx_sidebar_top' ); |
|
| 218 | + do_action('lsx_sidebar_top'); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | function lsx_sidebar_bottom() { |
| 222 | - do_action( 'lsx_sidebar_bottom' ); |
|
| 222 | + do_action('lsx_sidebar_bottom'); |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | /** |
@@ -229,17 +229,17 @@ discard block |
||
| 229 | 229 | */ |
| 230 | 230 | |
| 231 | 231 | function lsx_footer_before() { |
| 232 | - do_action( 'lsx_footer_before' ); |
|
| 232 | + do_action('lsx_footer_before'); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | function lsx_footer_after() { |
| 236 | - do_action( 'lsx_footer_after' ); |
|
| 236 | + do_action('lsx_footer_after'); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | function lsx_footer_top() { |
| 240 | - do_action( 'lsx_footer_top' ); |
|
| 240 | + do_action('lsx_footer_top'); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | function lsx_footer_bottom() { |
| 244 | - do_action( 'lsx_footer_bottom' ); |
|
| 244 | + do_action('lsx_footer_bottom'); |
|
| 245 | 245 | } |
@@ -3,36 +3,36 @@ |
||
| 3 | 3 | /** |
| 4 | 4 | * Enqueue theme CSS and JavaScript . |
| 5 | 5 | */ |
| 6 | -if ( ! function_exists( 'theme_support' ) ) : |
|
| 6 | +if ( ! function_exists('theme_support')) : |
|
| 7 | 7 | function theme_support() { |
| 8 | 8 | // Add support for full and wide align images. |
| 9 | - add_theme_support( 'align-wide' ); |
|
| 9 | + add_theme_support('align-wide'); |
|
| 10 | 10 | // Add support for styling blocks. |
| 11 | - add_theme_support( 'wp-block-styles' ); |
|
| 11 | + add_theme_support('wp-block-styles'); |
|
| 12 | 12 | // Add support for custom color scheme. |
| 13 | - add_theme_support( 'editor-color-palette', array( |
|
| 13 | + add_theme_support('editor-color-palette', array( |
|
| 14 | 14 | array( |
| 15 | - 'name' => __( 'Strong Blue', 'lsx' ), |
|
| 15 | + 'name' => __('Strong Blue', 'lsx'), |
|
| 16 | 16 | 'slug' => 'strong-blue', |
| 17 | 17 | 'color' => '#27639e', |
| 18 | 18 | ), |
| 19 | 19 | array( |
| 20 | - 'name' => __( 'Lighter Blue', 'lsx' ), |
|
| 20 | + 'name' => __('Lighter Blue', 'lsx'), |
|
| 21 | 21 | 'slug' => 'lighter-blue', |
| 22 | 22 | 'color' => '#428bca', |
| 23 | 23 | ), |
| 24 | 24 | array( |
| 25 | - 'name' => __( 'Yellow', 'lsx' ), |
|
| 25 | + 'name' => __('Yellow', 'lsx'), |
|
| 26 | 26 | 'slug' => 'light-yellow', |
| 27 | 27 | 'color' => '#f7ae00', |
| 28 | 28 | ), |
| 29 | 29 | array( |
| 30 | - 'name' => __( 'Dark Yellow', 'lsx' ), |
|
| 30 | + 'name' => __('Dark Yellow', 'lsx'), |
|
| 31 | 31 | 'slug' => 'dark-yellow', |
| 32 | 32 | 'color' => '#ab7800', |
| 33 | 33 | ), |
| 34 | - ) ); |
|
| 34 | + )); |
|
| 35 | 35 | } |
| 36 | 36 | endif; |
| 37 | -add_action( 'after_setup_theme', 'theme_support' ); |
|
| 37 | +add_action('after_setup_theme', 'theme_support'); |
|
| 38 | 38 | |
@@ -6,36 +6,36 @@ |
||
| 6 | 6 | * @subpackage Gutenberg |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if ( ! defined('ABSPATH')) { |
|
| 10 | 10 | exit; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | // Enqueue Admin styles on admin area |
| 14 | 14 | function load_gutenberg_admin_style() { |
| 15 | - wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0' ); |
|
| 15 | + wp_enqueue_style('admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0'); |
|
| 16 | 16 | } |
| 17 | -add_action( 'admin_enqueue_scripts', 'load_gutenberg_admin_style' ); |
|
| 17 | +add_action('admin_enqueue_scripts', 'load_gutenberg_admin_style'); |
|
| 18 | 18 | |
| 19 | 19 | // Gutenberg Compatibility |
| 20 | -require_once( get_template_directory() . '/lib/theme-support.php' ); |
|
| 20 | +require_once(get_template_directory() . '/lib/theme-support.php'); |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Add custom class for Gutenberg Compatible template |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -function add_gutenberg_compatible_body_class( $classes ) { |
|
| 27 | - if ( ! is_home() && ! is_front_page() ) |
|
| 28 | - if ( is_page() || is_page_template() || is_single() ) |
|
| 26 | +function add_gutenberg_compatible_body_class($classes) { |
|
| 27 | + if ( ! is_home() && ! is_front_page()) |
|
| 28 | + if (is_page() || is_page_template() || is_single()) |
|
| 29 | 29 | $classes[] = 'gutenberg-compatible-template'; |
| 30 | 30 | return $classes; |
| 31 | 31 | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -add_filter( 'body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class' ); |
|
| 34 | +add_filter('body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class'); |
|
| 35 | 35 | |
| 36 | 36 | // Add custom class for templates that are using the Gutenberg editor |
| 37 | -add_action('body_class', function( $classes ) { |
|
| 38 | - if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) ) |
|
| 37 | +add_action('body_class', function($classes) { |
|
| 38 | + if (function_exists('has_blocks') && has_blocks(get_the_ID())) |
|
| 39 | 39 | $classes[] = 'using-gutenberg'; |
| 40 | 40 | return $classes; |
| 41 | 41 | }); |
@@ -24,9 +24,10 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | 26 | function add_gutenberg_compatible_body_class( $classes ) { |
| 27 | - if ( ! is_home() && ! is_front_page() ) |
|
| 28 | - if ( is_page() || is_page_template() || is_single() ) |
|
| 27 | + if ( ! is_home() && ! is_front_page() ) { |
|
| 28 | + if ( is_page() || is_page_template() || is_single() ) |
|
| 29 | 29 | $classes[] = 'gutenberg-compatible-template'; |
| 30 | + } |
|
| 30 | 31 | return $classes; |
| 31 | 32 | |
| 32 | 33 | } |
@@ -35,7 +36,8 @@ discard block |
||
| 35 | 36 | |
| 36 | 37 | // Add custom class for templates that are using the Gutenberg editor |
| 37 | 38 | add_action('body_class', function( $classes ) { |
| 38 | - if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) ) |
|
| 39 | - $classes[] = 'using-gutenberg'; |
|
| 39 | + if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) ) { |
|
| 40 | + $classes[] = 'using-gutenberg'; |
|
| 41 | + } |
|
| 40 | 42 | return $classes; |
| 41 | 43 | }); |
@@ -5,25 +5,25 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 8 | +if ( ! defined('ABSPATH')) { |
|
| 9 | 9 | exit; |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | -define( 'LSX_VERSION', '2.2.1' ); |
|
| 12 | +define('LSX_VERSION', '2.2.1'); |
|
| 13 | 13 | |
| 14 | -if ( class_exists( 'WooCommerce' ) ) { |
|
| 14 | +if (class_exists('WooCommerce')) { |
|
| 15 | 15 | require get_template_directory() . '/includes/plugins/woocommerce.php'; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if ( class_exists( 'Tribe__Events__Main' ) ) { |
|
| 18 | +if (class_exists('Tribe__Events__Main')) { |
|
| 19 | 19 | require get_template_directory() . '/includes/plugins/the-events-calendar.php'; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -if ( class_exists( 'Sensei_WC' ) ) { |
|
| 22 | +if (class_exists('Sensei_WC')) { |
|
| 23 | 23 | require get_template_directory() . '/includes/plugins/sensei.php'; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -if ( class_exists( 'bbPress' ) ) { |
|
| 26 | +if (class_exists('bbPress')) { |
|
| 27 | 27 | require get_template_directory() . '/includes/plugins/bbpress.php'; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -20,9 +20,9 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | <?php lsx_content_top(); ?> |
| 22 | 22 | |
| 23 | - <?php if ( have_posts() && ( ! class_exists( 'LSX_Banners' ) || ( function_exists( 'has_blocks' ) && has_blocks() ) ) ) : ?> |
|
| 23 | + <?php if (have_posts() && ( ! class_exists('LSX_Banners') || (function_exists('has_blocks') && has_blocks()))) : ?> |
|
| 24 | 24 | |
| 25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 25 | + <?php while (have_posts()) : the_post(); ?> |
|
| 26 | 26 | |
| 27 | 27 | <?php lsx_entry_before(); ?> |
| 28 | 28 | |
@@ -32,10 +32,10 @@ discard block |
||
| 32 | 32 | <?php the_content(); ?> |
| 33 | 33 | |
| 34 | 34 | <?php |
| 35 | - wp_link_pages( array( |
|
| 36 | - 'before' => '<nav class="page-nav"><p>' . esc_html__( 'Pages:', 'lsx' ), |
|
| 35 | + wp_link_pages(array( |
|
| 36 | + 'before' => '<nav class="page-nav"><p>' . esc_html__('Pages:', 'lsx'), |
|
| 37 | 37 | 'after' => '</p></nav>', |
| 38 | - ) ); |
|
| 38 | + )); |
|
| 39 | 39 | ?> |
| 40 | 40 | </div><!-- .entry-content --> |
| 41 | 41 | |
@@ -47,11 +47,11 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | <?php endif; ?> |
| 49 | 49 | |
| 50 | - <?php if ( is_active_sidebar( 'sidebar-home' ) && ( function_exists( 'has_blocks' ) && ! has_blocks() ) ) : ?> |
|
| 50 | + <?php if (is_active_sidebar('sidebar-home') && (function_exists('has_blocks') && ! has_blocks())) : ?> |
|
| 51 | 51 | |
| 52 | 52 | <div id="home-widgets"> |
| 53 | 53 | |
| 54 | - <?php dynamic_sidebar( 'sidebar-home' ); ?> |
|
| 54 | + <?php dynamic_sidebar('sidebar-home'); ?> |
|
| 55 | 55 | |
| 56 | 56 | </div> |
| 57 | 57 | |