@@ -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 | * lsx Comment Walker |
@@ -29,12 +29,12 @@ discard block |
||
| 29 | 29 | $GLOBALS['comment_depth'] = $depth; |
| 30 | 30 | $GLOBALS['comment'] = $comment; |
| 31 | 31 | |
| 32 | - if (!empty($args['callback'])) { |
|
| 32 | + if ( ! empty($args['callback'])) { |
|
| 33 | 33 | call_user_func($args['callback'], $comment, $args, $depth); |
| 34 | 34 | return; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - extract($args, EXTR_SKIP);?> |
|
| 37 | + extract($args, EXTR_SKIP); ?> |
|
| 38 | 38 | |
| 39 | 39 | <li id="comment-<?php comment_ID(); ?>" <?php comment_class('media comment-' . get_comment_ID()); ?>> |
| 40 | 40 | <?php get_template_part('comment'); ?> |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | function end_el(&$output, $comment, $depth = 0, $args = array()) { |
| 45 | - if (!empty($args['end-callback'])) { |
|
| 45 | + if ( ! empty($args['end-callback'])) { |
|
| 46 | 46 | call_user_func($args['end-callback'], $comment, $args, $depth); |
| 47 | 47 | return; |
| 48 | 48 | } |
@@ -64,13 +64,13 @@ discard block |
||
| 64 | 64 | * @subpackage layout |
| 65 | 65 | */ |
| 66 | 66 | function lsx_comment_form_fields_filter($fields) { |
| 67 | - foreach($fields as &$field){ |
|
| 68 | - if(stristr('class=', $field)){ |
|
| 67 | + foreach ($fields as &$field) { |
|
| 68 | + if (stristr('class=', $field)) { |
|
| 69 | 69 | $field = str_replace('class="', 'class="form-control ', $field); |
| 70 | - }else{ |
|
| 70 | + } else { |
|
| 71 | 71 | $field = str_replace('<input', '<input class="form-control" ', $field); |
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | return $fields; |
| 75 | 75 | } |
| 76 | -add_filter( 'comment_form_default_fields', 'lsx_comment_form_fields_filter'); |
|
| 76 | +add_filter('comment_form_default_fields', 'lsx_comment_form_fields_filter'); |
|
@@ -1,54 +1,54 @@ 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 | * Register widgetized area and update sidebar with default widgets. |
| 6 | 6 | */ |
| 7 | 7 | function lsx_widget_area_init() { |
| 8 | 8 | |
| 9 | - register_sidebar( array( |
|
| 10 | - 'name' => __( 'Home', 'lsx' ), |
|
| 9 | + register_sidebar(array( |
|
| 10 | + 'name' => __('Home', 'lsx'), |
|
| 11 | 11 | 'id' => 'sidebar-home', |
| 12 | 12 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 13 | 13 | 'after_widget' => '</aside>', |
| 14 | 14 | 'before_title' => '<h3 class="widget-title">', |
| 15 | 15 | 'after_title' => '</h3>', |
| 16 | - ) ); |
|
| 16 | + )); |
|
| 17 | 17 | |
| 18 | - register_sidebar( array( |
|
| 19 | - 'name' => __( 'Sidebar', 'lsx' ), |
|
| 18 | + register_sidebar(array( |
|
| 19 | + 'name' => __('Sidebar', 'lsx'), |
|
| 20 | 20 | 'id' => 'sidebar-1', |
| 21 | 21 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 22 | 22 | 'after_widget' => '</aside>', |
| 23 | 23 | 'before_title' => '<h3 class="widget-title">', |
| 24 | 24 | 'after_title' => '</h3>', |
| 25 | - ) ); |
|
| 25 | + )); |
|
| 26 | 26 | |
| 27 | - register_sidebar( array( |
|
| 28 | - 'name' => __( 'Footer', 'lsx' ), |
|
| 27 | + register_sidebar(array( |
|
| 28 | + 'name' => __('Footer', 'lsx'), |
|
| 29 | 29 | 'id' => 'sidebar-footer', |
| 30 | 30 | 'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">', |
| 31 | 31 | 'after_widget' => '</aside></div>', |
| 32 | 32 | 'before_title' => '<h3 class="widget-title">', |
| 33 | 33 | 'after_title' => '</h3>', |
| 34 | - ) ); |
|
| 34 | + )); |
|
| 35 | 35 | |
| 36 | - register_sidebar( array( |
|
| 37 | - 'name' => __( 'Footer Call to Action', 'lsx' ), |
|
| 36 | + register_sidebar(array( |
|
| 37 | + 'name' => __('Footer Call to Action', 'lsx'), |
|
| 38 | 38 | 'id' => 'sidebar-footer-cta', |
| 39 | 39 | 'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">', |
| 40 | 40 | 'after_widget' => '</aside></div>', |
| 41 | 41 | 'before_title' => '<h3 class="widget-title">', |
| 42 | 42 | 'after_title' => '</h3>', |
| 43 | - ) ); |
|
| 43 | + )); |
|
| 44 | 44 | } |
| 45 | -add_action( 'widgets_init', 'lsx_widget_area_init' ); |
|
| 45 | +add_action('widgets_init', 'lsx_widget_area_init'); |
|
| 46 | 46 | |
| 47 | -function lsx_sidebar_footer_params( $params ) { |
|
| 47 | +function lsx_sidebar_footer_params($params) { |
|
| 48 | 48 | |
| 49 | 49 | $sidebar_id = $params[0]['id']; |
| 50 | 50 | |
| 51 | - if ( $sidebar_id == 'sidebar-footer' ) { |
|
| 51 | + if ($sidebar_id == 'sidebar-footer') { |
|
| 52 | 52 | |
| 53 | 53 | $total_widgets = wp_get_sidebars_widgets(); |
| 54 | 54 | $sidebar_widgets = count($total_widgets[$sidebar_id]); |
@@ -58,4 +58,4 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | return $params; |
| 60 | 60 | } |
| 61 | -add_filter( 'dynamic_sidebar_params', 'lsx_sidebar_footer_params' ); |
|
| 62 | 61 | \ No newline at end of file |
| 62 | +add_filter('dynamic_sidebar_params', 'lsx_sidebar_footer_params'); |
|
| 63 | 63 | \ No newline at end of file |
@@ -14,6 +14,6 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | 16 | function lsx_wp_job_manager_styles() { |
| 17 | - wp_enqueue_style( 'wp_job_manager', get_template_directory_uri() . '/css/wp-job-manager.css' ); |
|
| 17 | + wp_enqueue_style('wp_job_manager', get_template_directory_uri() . '/css/wp-job-manager.css'); |
|
| 18 | 18 | } |
| 19 | -add_action( 'wp_enqueue_scripts', 'lsx_wp_job_manager_styles' ); |
|
| 20 | 19 | \ No newline at end of file |
| 20 | +add_action('wp_enqueue_scripts', 'lsx_wp_job_manager_styles'); |
|
| 21 | 21 | \ 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 | * Enqueue scripts and styles. |
@@ -10,12 +10,12 @@ discard block |
||
| 10 | 10 | function lsx_scripts() { |
| 11 | 11 | global $content_width; |
| 12 | 12 | |
| 13 | - wp_enqueue_style('lsx_main_style', get_stylesheet_uri() , false, '23a2bd43791de3fa3cab2d2af5fec6a2'); |
|
| 13 | + wp_enqueue_style('lsx_main_style', get_stylesheet_uri(), false, '23a2bd43791de3fa3cab2d2af5fec6a2'); |
|
| 14 | 14 | |
| 15 | 15 | wp_enqueue_style('lsx_main', get_template_directory_uri() . '/css/app.css', false, '48a2bd26791de3fa7cab2d2af5fec6a2'); |
| 16 | 16 | |
| 17 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
|
| 18 | - wp_enqueue_script( 'comment-reply' ); |
|
| 17 | + if (is_singular() && comments_open() && get_option('thread_comments')) { |
|
| 18 | + wp_enqueue_script('comment-reply'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/vendor/bootstrap.min.js', array('jquery'), 'c9f983e2965b9c7888dac272e56c4f4b', false); |
@@ -26,38 +26,38 @@ discard block |
||
| 26 | 26 | wp_enqueue_script('picturefill', get_template_directory_uri() . '/js/vendor/picturefill.min.js', array(), null, false); |
| 27 | 27 | |
| 28 | 28 | wp_enqueue_script('masonry'); |
| 29 | - wp_enqueue_script('imagesLoaded', get_template_directory_uri().'/js/vendor/imagesloaded.pkgd.min.js', array('jquery','masonry')); |
|
| 30 | - if(defined('WP_DEBUG') && true === WP_DEBUG){ |
|
| 29 | + wp_enqueue_script('imagesLoaded', get_template_directory_uri() . '/js/vendor/imagesloaded.pkgd.min.js', array('jquery', 'masonry')); |
|
| 30 | + if (defined('WP_DEBUG') && true === WP_DEBUG) { |
|
| 31 | 31 | wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.js', array('masonry'), null, false); |
| 32 | - }else{ |
|
| 32 | + } else { |
|
| 33 | 33 | wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.min.js', array('masonry'), null, false); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | //Set some parameters that we can use in the JS |
| 37 | 37 | $is_portfolio = false; |
| 38 | - if(is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag') || is_page_template('page-templates/template-portfolio.php')){ |
|
| 38 | + if (is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag') || is_page_template('page-templates/template-portfolio.php')) { |
|
| 39 | 39 | $is_portfolio = true; |
| 40 | 40 | } |
| 41 | 41 | $param_array = array( |
| 42 | 42 | 'is_portfolio' => $is_portfolio |
| 43 | 43 | ); |
| 44 | 44 | //Set the columns for the archives |
| 45 | - $param_array['columns'] = apply_filters('lsx_archive_column_number',3); |
|
| 46 | - wp_localize_script( 'lsx_script', 'lsx_params', $param_array ); |
|
| 45 | + $param_array['columns'] = apply_filters('lsx_archive_column_number', 3); |
|
| 46 | + wp_localize_script('lsx_script', 'lsx_params', $param_array); |
|
| 47 | 47 | |
| 48 | 48 | |
| 49 | - wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css'); |
|
| 49 | + wp_enqueue_style('fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css'); |
|
| 50 | 50 | |
| 51 | 51 | |
| 52 | - if(is_child_theme() && file_exists(get_stylesheet_directory() . '/custom.css')) { |
|
| 53 | - wp_enqueue_style( 'child-css', get_stylesheet_directory_uri() . '/custom.css' ); |
|
| 52 | + if (is_child_theme() && file_exists(get_stylesheet_directory() . '/custom.css')) { |
|
| 53 | + wp_enqueue_style('child-css', get_stylesheet_directory_uri() . '/custom.css'); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | wp_enqueue_style('medium-break', get_template_directory_uri() . '/css/medium-nav-break.css', false); |
| 57 | 57 | |
| 58 | 58 | |
| 59 | - $font = get_theme_mod('lsx_font','raleway_open_sans'); |
|
| 60 | - switch($font){ |
|
| 59 | + $font = get_theme_mod('lsx_font', 'raleway_open_sans'); |
|
| 60 | + switch ($font) { |
|
| 61 | 61 | case 'raleway_open_sans': |
| 62 | 62 | $header_font_location = 'Raleway'; |
| 63 | 63 | $body_font_location = 'Open+Sans'; |
@@ -86,18 +86,18 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $http_var = 'http'; |
| 89 | - if(is_ssl()){ $http_var .= 's'; } |
|
| 89 | + if (is_ssl()) { $http_var .= 's'; } |
|
| 90 | 90 | |
| 91 | 91 | //Call the Google Fonts and then Enque them. |
| 92 | - wp_register_style('lsx-header-font', $http_var.'://fonts.googleapis.com/css?family='.$header_font_location); |
|
| 93 | - wp_register_style('lsx-body-font', $http_var.'://fonts.googleapis.com/css?family='.$body_font_location); |
|
| 94 | - wp_enqueue_style( 'lsx-header-font'); |
|
| 95 | - wp_enqueue_style( 'lsx-body-font'); |
|
| 92 | + wp_register_style('lsx-header-font', $http_var . '://fonts.googleapis.com/css?family=' . $header_font_location); |
|
| 93 | + wp_register_style('lsx-body-font', $http_var . '://fonts.googleapis.com/css?family=' . $body_font_location); |
|
| 94 | + wp_enqueue_style('lsx-header-font'); |
|
| 95 | + wp_enqueue_style('lsx-body-font'); |
|
| 96 | 96 | |
| 97 | - wp_enqueue_style('lsx_font_scheme', esc_url( get_template_directory_uri() . '/css/'.$font.'.css'), false, '48a2bd26791de3fa7cab2d2af5fec6a4'); |
|
| 97 | + wp_enqueue_style('lsx_font_scheme', esc_url(get_template_directory_uri() . '/css/' . $font . '.css'), false, '48a2bd26791de3fa7cab2d2af5fec6a4'); |
|
| 98 | 98 | |
| 99 | 99 | } |
| 100 | -add_action( 'wp_enqueue_scripts', 'lsx_scripts' ); |
|
| 100 | +add_action('wp_enqueue_scripts', 'lsx_scripts'); |
|
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * Defer JavaScript |
@@ -105,14 +105,14 @@ discard block |
||
| 105 | 105 | * @package lsx |
| 106 | 106 | * @subpackage scripts |
| 107 | 107 | */ |
| 108 | -function lsx_scripts_defer_parsing( $url ) { |
|
| 109 | - if ( ! ( is_admin() ) ) { |
|
| 110 | - if ( FALSE === strpos( $url, '.js' ) ) return $url; |
|
| 111 | - if ( strpos( $url, 'jquery.js' ) ) return $url; |
|
| 112 | - if ( strpos( $url, ' defer ' ) ) return $url; |
|
| 108 | +function lsx_scripts_defer_parsing($url) { |
|
| 109 | + if ( ! (is_admin())) { |
|
| 110 | + if (FALSE === strpos($url, '.js')) return $url; |
|
| 111 | + if (strpos($url, 'jquery.js')) return $url; |
|
| 112 | + if (strpos($url, ' defer ')) return $url; |
|
| 113 | 113 | return "$url' defer onload='"; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | return $url; |
| 117 | 117 | } |
| 118 | -add_filter( 'clean_url', 'lsx_scripts_defer_parsing', 11, 1 ); |
|
| 118 | +add_filter('clean_url', 'lsx_scripts_defer_parsing', 11, 1); |
|
@@ -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 | * Customizer Configuration File |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * @author [email protected] <lsdev.biz> |
| 10 | 10 | * |
| 11 | 11 | */ |
| 12 | -if ( ! class_exists( 'LSX_Theme_Customizer' ) ) { |
|
| 12 | +if ( ! class_exists('LSX_Theme_Customizer')) { |
|
| 13 | 13 | |
| 14 | 14 | class LSX_Theme_Customizer { |
| 15 | 15 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @since 1.0.0 |
| 31 | 31 | */ |
| 32 | - public function __construct( $controls ) { |
|
| 32 | + public function __construct($controls) { |
|
| 33 | 33 | require get_template_directory() . '/inc/google-font.php'; |
| 34 | 34 | require get_template_directory() . '/inc/google-font-collection.php'; |
| 35 | 35 | require get_template_directory() . '/inc/customizer-core.php'; |
@@ -40,19 +40,19 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $this->controls = $controls; |
| 42 | 42 | |
| 43 | - add_action( 'customize_preview_init', array($this,'customize_preview_js' ),20); |
|
| 44 | - add_action( 'customize_register', array($this,'customizer'), 11 ); |
|
| 43 | + add_action('customize_preview_init', array($this, 'customize_preview_js'), 20); |
|
| 44 | + add_action('customize_register', array($this, 'customizer'), 11); |
|
| 45 | 45 | |
| 46 | - add_action( 'wp_ajax_customizer_site_title', array($this,'ajax_site_title') ); |
|
| 47 | - add_action( 'wp_ajax_nopriv_customizer_site_title', array($this,'ajax_site_title') ); |
|
| 46 | + add_action('wp_ajax_customizer_site_title', array($this, 'ajax_site_title')); |
|
| 47 | + add_action('wp_ajax_nopriv_customizer_site_title', array($this, 'ajax_site_title')); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. |
| 52 | 52 | */ |
| 53 | 53 | function customize_preview_js() { |
| 54 | - wp_enqueue_script( 'lsx_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ) , wp_get_theme()->Version, true ); |
|
| 55 | - wp_localize_script( 'lsx_customizer', 'lsx_customizer_params', array( 'template_directory' => get_template_directory_uri() ) ); |
|
| 54 | + wp_enqueue_script('lsx_customizer', get_template_directory_uri() . '/js/customizer.js', array('customize-preview'), wp_get_theme()->Version, true); |
|
| 55 | + wp_localize_script('lsx_customizer', 'lsx_customizer_params', array('template_directory' => get_template_directory_uri())); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -60,40 +60,40 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @since 1.0.0 |
| 62 | 62 | */ |
| 63 | - public function customizer( $wp_customize ) { |
|
| 63 | + public function customizer($wp_customize) { |
|
| 64 | 64 | // start panels |
| 65 | - if( !empty( $this->controls['panels'] ) ){ |
|
| 66 | - foreach( $this->controls['panels'] as $panel_slug => $args ){ |
|
| 67 | - $this->add_panel( $panel_slug, $args, $wp_customize ); |
|
| 65 | + if ( ! empty($this->controls['panels'])) { |
|
| 66 | + foreach ($this->controls['panels'] as $panel_slug => $args) { |
|
| 67 | + $this->add_panel($panel_slug, $args, $wp_customize); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | // start sections |
| 72 | - if( !empty( $this->controls['sections'] ) ){ |
|
| 73 | - foreach( $this->controls['sections'] as $section_slug => $args ){ |
|
| 74 | - $this->add_section( $section_slug, $args, $wp_customize ); |
|
| 72 | + if ( ! empty($this->controls['sections'])) { |
|
| 73 | + foreach ($this->controls['sections'] as $section_slug => $args) { |
|
| 74 | + $this->add_section($section_slug, $args, $wp_customize); |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | // start settings |
| 79 | - if( !empty( $this->controls['settings'] ) ){ |
|
| 80 | - foreach( $this->controls['settings'] as $settings_slug => $args ){ |
|
| 81 | - $this->add_setting( $settings_slug, $args, $wp_customize ); |
|
| 79 | + if ( ! empty($this->controls['settings'])) { |
|
| 80 | + foreach ($this->controls['settings'] as $settings_slug => $args) { |
|
| 81 | + $this->add_setting($settings_slug, $args, $wp_customize); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | // start fields |
| 86 | - if( !empty( $this->controls['fields'] ) ){ |
|
| 87 | - foreach( $this->controls['fields'] as $field_slug => $args ){ |
|
| 88 | - $this->add_control( $field_slug, $args, $wp_customize ); |
|
| 86 | + if ( ! empty($this->controls['fields'])) { |
|
| 87 | + foreach ($this->controls['fields'] as $field_slug => $args) { |
|
| 88 | + $this->add_control($field_slug, $args, $wp_customize); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
|
| 93 | - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
|
| 94 | - $wp_customize->get_setting( 'background_color' )->transport = 'postMessage'; |
|
| 92 | + $wp_customize->get_setting('blogname')->transport = 'postMessage'; |
|
| 93 | + $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; |
|
| 94 | + $wp_customize->get_setting('background_color')->transport = 'postMessage'; |
|
| 95 | 95 | |
| 96 | - $wp_customize->remove_control( 'background_color' ); |
|
| 96 | + $wp_customize->remove_control('background_color'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * |
| 102 | 102 | * @since 1.0.0 |
| 103 | 103 | */ |
| 104 | - private function add_panel( $slug, $args, $wp_customize ) { |
|
| 104 | + private function add_panel($slug, $args, $wp_customize) { |
|
| 105 | 105 | $default_args = array( |
| 106 | 106 | 'title' => null, |
| 107 | 107 | 'description' => null, |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $wp_customize->add_panel( |
| 111 | 111 | $slug, |
| 112 | - array_merge( $default_args, $args ) |
|
| 112 | + array_merge($default_args, $args) |
|
| 113 | 113 | ); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -118,14 +118,14 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @since 1.0.0 |
| 120 | 120 | */ |
| 121 | - private function add_section( $slug, $args, $wp_customize ) { |
|
| 121 | + private function add_section($slug, $args, $wp_customize) { |
|
| 122 | 122 | $default_args = array( |
| 123 | 123 | 'capability' => 'edit_theme_options', //Capability needed to tweak |
| 124 | 124 | 'description' => null, //Descriptive tooltip |
| 125 | 125 | ); |
| 126 | 126 | |
| 127 | - $wp_customize->add_section( $slug, |
|
| 128 | - array_merge( $default_args, $args ) |
|
| 127 | + $wp_customize->add_section($slug, |
|
| 128 | + array_merge($default_args, $args) |
|
| 129 | 129 | ); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -134,15 +134,15 @@ discard block |
||
| 134 | 134 | * |
| 135 | 135 | * @since 1.0.0 |
| 136 | 136 | */ |
| 137 | - private function add_setting( $slug, $args, $wp_customize ) { |
|
| 138 | - $wp_customize->add_setting( $slug, //No need to use a SERIALIZED name, as `theme_mod` settings already live under one db record |
|
| 139 | - array_merge( array( |
|
| 137 | + private function add_setting($slug, $args, $wp_customize) { |
|
| 138 | + $wp_customize->add_setting($slug, //No need to use a SERIALIZED name, as `theme_mod` settings already live under one db record |
|
| 139 | + array_merge(array( |
|
| 140 | 140 | 'default' => null, //Default setting/value to save |
| 141 | 141 | 'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'? |
| 142 | 142 | 'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting. |
| 143 | 143 | 'transport' => 'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? |
| 144 | 144 | 'sanitize_callback' => 'lsx_sanitize_choices' |
| 145 | - ), $args ) |
|
| 145 | + ), $args) |
|
| 146 | 146 | ); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -151,28 +151,28 @@ discard block |
||
| 151 | 151 | * |
| 152 | 152 | * @since 1.0.0 |
| 153 | 153 | */ |
| 154 | - private function add_control( $slug, $args, $wp_customize ) { |
|
| 154 | + private function add_control($slug, $args, $wp_customize) { |
|
| 155 | 155 | $default_args = array( |
| 156 | 156 | |
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | - if( isset( $args['control'] ) && class_exists( $args['control'] )){ |
|
| 159 | + if (isset($args['control']) && class_exists($args['control'])) { |
|
| 160 | 160 | |
| 161 | 161 | $control_class = $args['control']; |
| 162 | - unset( $args['control'] ); |
|
| 162 | + unset($args['control']); |
|
| 163 | 163 | |
| 164 | - $control = new $control_class( $wp_customize, $slug, array_merge( $default_args, $args ) ); |
|
| 165 | - $wp_customize->add_control( $control ); |
|
| 164 | + $control = new $control_class($wp_customize, $slug, array_merge($default_args, $args)); |
|
| 165 | + $wp_customize->add_control($control); |
|
| 166 | 166 | |
| 167 | - }else{ |
|
| 167 | + } else { |
|
| 168 | 168 | |
| 169 | - if( isset( $args['control'] ) ){ |
|
| 170 | - unset( $args['control'] ); |
|
| 169 | + if (isset($args['control'])) { |
|
| 170 | + unset($args['control']); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | $wp_customize->add_control( |
| 174 | 174 | $slug, |
| 175 | - array_merge( $default_args, $args ) |
|
| 175 | + array_merge($default_args, $args) |
|
| 176 | 176 | ); |
| 177 | 177 | } |
| 178 | 178 | } |
@@ -18,9 +18,9 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | 20 | function lsx_events_styles() { |
| 21 | - wp_enqueue_style( 'events', get_template_directory_uri() . '/css/the-events-calendar.css' ); |
|
| 21 | + wp_enqueue_style('events', get_template_directory_uri() . '/css/the-events-calendar.css'); |
|
| 22 | 22 | } |
| 23 | -add_action( 'wp_enqueue_scripts', 'lsx_events_styles' ); |
|
| 23 | +add_action('wp_enqueue_scripts', 'lsx_events_styles'); |
|
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -32,41 +32,41 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | function lsx_tribe_breadcrumbs($output) { |
| 34 | 34 | global $wp_query; |
| 35 | - if( (isset($wp_query->tribe_is_event) && true === $wp_query->tribe_is_event) || (isset($wp_query->query_vars['post_type']) && !is_array($wp_query->query_vars['post_type']) && 'tribe_venue' === $wp_query->query_vars['post_type'])){ |
|
| 36 | - if(function_exists('woocommerce_breadcrumb')){ |
|
| 35 | + if ((isset($wp_query->tribe_is_event) && true === $wp_query->tribe_is_event) || (isset($wp_query->query_vars['post_type']) && ! is_array($wp_query->query_vars['post_type']) && 'tribe_venue' === $wp_query->query_vars['post_type'])) { |
|
| 36 | + if (function_exists('woocommerce_breadcrumb')) { |
|
| 37 | 37 | $closing_div = '</nav>'; |
| 38 | 38 | |
| 39 | - if( is_single()) { |
|
| 40 | - $output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>',$output); |
|
| 41 | - if(isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']){ |
|
| 42 | - $output = str_replace($closing_div,get_the_title($wp_query->query_vars['post_parent']).$closing_div,$output); |
|
| 43 | - }else{ |
|
| 39 | + if (is_single()) { |
|
| 40 | + $output = str_replace('Page', '<a href="' . get_post_type_archive_link('tribe_events') . '">' . __('Events', 'lsx') . '</a>', $output); |
|
| 41 | + if (isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']) { |
|
| 42 | + $output = str_replace($closing_div, get_the_title($wp_query->query_vars['post_parent']) . $closing_div, $output); |
|
| 43 | + } else { |
|
| 44 | 44 | $single_event = get_queried_object(); |
| 45 | - $output = str_replace($closing_div,apply_filters('the_title',$single_event->post_title).$closing_div,$output); |
|
| 45 | + $output = str_replace($closing_div, apply_filters('the_title', $single_event->post_title) . $closing_div, $output); |
|
| 46 | 46 | } |
| 47 | - }elseif( is_tax()) { |
|
| 47 | + }elseif (is_tax()) { |
|
| 48 | 48 | $tax_event = get_queried_object(); |
| 49 | - $output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>',$output); |
|
| 50 | - $output = str_replace($closing_div,' / '.apply_filters('the_title',$tax_event->name).$closing_div,$output); |
|
| 51 | - }else{ |
|
| 52 | - $output = str_replace('Page',__('Events','lsx'),$output); |
|
| 49 | + $output = str_replace('Page', '<a href="' . get_post_type_archive_link('tribe_events') . '">' . __('Events', 'lsx') . '</a>', $output); |
|
| 50 | + $output = str_replace($closing_div, ' / ' . apply_filters('the_title', $tax_event->name) . $closing_div, $output); |
|
| 51 | + } else { |
|
| 52 | + $output = str_replace('Page', __('Events', 'lsx'), $output); |
|
| 53 | 53 | } |
| 54 | - }elseif(function_exists('yoast_breadcrumb')){ |
|
| 54 | + }elseif (function_exists('yoast_breadcrumb')) { |
|
| 55 | 55 | $closing_div = '</div>'; |
| 56 | - $last_breadcrumb = '<span class="breadcrumb_last">'.__('Events','lsx').'</span>'; |
|
| 56 | + $last_breadcrumb = '<span class="breadcrumb_last">' . __('Events', 'lsx') . '</span>'; |
|
| 57 | 57 | |
| 58 | - if( is_single()) { |
|
| 58 | + if (is_single()) { |
|
| 59 | 59 | $single_event = get_queried_object(); |
| 60 | - $output = str_replace($closing_div,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a> / '.apply_filters('the_title',$single_event->post_title),$output); |
|
| 61 | - }elseif( is_tax()) { |
|
| 60 | + $output = str_replace($closing_div, '<a href="' . get_post_type_archive_link('tribe_events') . '">' . __('Events', 'lsx') . '</a> / ' . apply_filters('the_title', $single_event->post_title), $output); |
|
| 61 | + }elseif (is_tax()) { |
|
| 62 | 62 | $tax_event = get_queried_object(); |
| 63 | - $output = str_replace($last_breadcrumb,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a> / '.apply_filters('the_title',$tax_event->name),$output); |
|
| 63 | + $output = str_replace($last_breadcrumb, '<a href="' . get_post_type_archive_link('tribe_events') . '">' . __('Events', 'lsx') . '</a> / ' . apply_filters('the_title', $tax_event->name), $output); |
|
| 64 | 64 | |
| 65 | - }else{ |
|
| 66 | - $output = str_replace('Page',__('Events','lsx'),$output); |
|
| 65 | + } else { |
|
| 66 | + $output = str_replace('Page', __('Events', 'lsx'), $output); |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | return $output; |
| 71 | 71 | } |
| 72 | -add_filter( 'lsx_breadcrumbs', 'lsx_tribe_breadcrumbs',1,10 ); |
|
| 73 | 72 | \ No newline at end of file |
| 73 | +add_filter('lsx_breadcrumbs', 'lsx_tribe_breadcrumbs', 1, 10); |
|
| 74 | 74 | \ No newline at end of file |
@@ -13,9 +13,9 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | <?php lsx_content_top(); ?> |
| 15 | 15 | |
| 16 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 16 | + <?php while (have_posts()) : the_post(); ?> |
|
| 17 | 17 | |
| 18 | - <?php get_template_part( 'content', 'page' ); ?> |
|
| 18 | + <?php get_template_part('content', 'page'); ?> |
|
| 19 | 19 | |
| 20 | 20 | <?php endwhile; // end of the loop. ?> |
| 21 | 21 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | <?php |
| 25 | 25 | // If comments are open or we have at least one comment, load up the comment template |
| 26 | - if ( comments_open() || '0' != get_comments_number() ) : |
|
| 26 | + if (comments_open() || '0' != get_comments_number()) : |
|
| 27 | 27 | comments_template(); |
| 28 | 28 | endif; |
| 29 | 29 | ?> |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if ( isset( $GLOBALS['comment_depth'] ) ) { |
|
| 3 | - $depth = intval( $GLOBALS['comment_depth'] ); |
|
| 2 | + if (isset($GLOBALS['comment_depth'])) { |
|
| 3 | + $depth = intval($GLOBALS['comment_depth']); |
|
| 4 | 4 | } else { |
| 5 | 5 | $depth = 1; |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | - $max_depth = intval( get_option( 'thread_comments_depth' ) ); |
|
| 8 | + $max_depth = intval(get_option('thread_comments_depth')); |
|
| 9 | 9 | ?> |
| 10 | 10 | |
| 11 | 11 | <?php echo get_avatar($comment, '64'); ?> |
| 12 | 12 | <div class="media-body"> |
| 13 | 13 | <h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4> |
| 14 | - <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"><?php printf(esc_html__('%1$s on %2$s', 'lsx'), get_comment_date(), get_comment_time()); ?></a></time> |
|
| 14 | + <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"><?php printf(esc_html__('%1$s on %2$s', 'lsx'), get_comment_date(), get_comment_time()); ?></a></time> |
|
| 15 | 15 | <?php edit_comment_link(esc_html__('(Edit)', 'lsx'), '', ''); ?> |
| 16 | 16 | |
| 17 | 17 | <?php if ($comment->comment_approved == '0') : ?> |
@@ -21,4 +21,4 @@ discard block |
||
| 21 | 21 | <?php endif; ?> |
| 22 | 22 | |
| 23 | 23 | <?php comment_text(); ?> |
| 24 | -<?php comment_reply_link( array( 'depth' => $depth, 'max_depth' => $max_depth ) ); |
|
| 25 | 24 | \ No newline at end of file |
| 25 | +<?php comment_reply_link(array('depth' => $depth, 'max_depth' => $max_depth)); |
|
| 26 | 26 | \ No newline at end of file |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | <?php lsx_content_wrap_before(); ?> |
| 16 | 16 | |
| 17 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 17 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 18 | 18 | |
| 19 | 19 | <?php lsx_content_before(); ?> |
| 20 | 20 | |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | <?php lsx_content_top(); ?> |
| 24 | 24 | |
| 25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 25 | + <?php while (have_posts()) : the_post(); ?> |
|
| 26 | 26 | |
| 27 | - <?php get_template_part( 'content', get_post_type() ); ?> |
|
| 27 | + <?php get_template_part('content', get_post_type()); ?> |
|
| 28 | 28 | |
| 29 | 29 | <?php endwhile; // end of the loop. ?> |
| 30 | 30 | |