@@ -7,15 +7,15 @@ discard block |
||
| 7 | 7 | * @category bootstrap-navigation-walker |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | +if ( ! defined('ABSPATH')) { |
|
| 11 | 11 | exit; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if ( ! class_exists( 'Walker_Nav_Menu' ) ) { |
|
| 14 | +if ( ! class_exists('Walker_Nav_Menu')) { |
|
| 15 | 15 | return; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if ( ! class_exists( 'LSX_Bootstrap_Navwalker' ) ) : |
|
| 18 | +if ( ! class_exists('LSX_Bootstrap_Navwalker')) : |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Cleaner Bootstrap walker |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | * @param string $output Passed by reference. Used to append additional content. |
| 36 | 36 | * @param int $depth Depth of page. Used for padding. |
| 37 | 37 | */ |
| 38 | - public function start_lvl( &$output, $depth = 0, $args = array() ) { |
|
| 39 | - $indent = str_repeat( "\t", $depth ); |
|
| 38 | + public function start_lvl(&$output, $depth = 0, $args = array()) { |
|
| 39 | + $indent = str_repeat("\t", $depth); |
|
| 40 | 40 | $output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n"; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * Used to append additional content. |
| 45 | 45 | * @param string $item Passed by reference. |
| 46 | 46 | */ |
| 47 | - public function filter_default_pages( &$item ) { |
|
| 47 | + public function filter_default_pages(&$item) { |
|
| 48 | 48 | return $item; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | * @param int $current_page Menu item ID. |
| 59 | 59 | * @param object $args |
| 60 | 60 | */ |
| 61 | - public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { |
|
| 62 | - $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; |
|
| 61 | + public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) { |
|
| 62 | + $indent = ($depth) ? str_repeat("\t", $depth) : ''; |
|
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * If this is a default menu being called we need to fix |
| 66 | 66 | * the item object thats coming through. |
| 67 | 67 | */ |
| 68 | - if ( ! isset( $item->title ) ) { |
|
| 68 | + if ( ! isset($item->title)) { |
|
| 69 | 69 | return; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -77,63 +77,63 @@ discard block |
||
| 77 | 77 | * comparison that is not case sensitive. The strcasecmp() function returns |
| 78 | 78 | * a 0 if the strings are equal. |
| 79 | 79 | */ |
| 80 | - if ( 0 == strcasecmp( $item->attr_title, 'divider' ) && 1 === $depth ) { |
|
| 80 | + if (0 == strcasecmp($item->attr_title, 'divider') && 1 === $depth) { |
|
| 81 | 81 | $output .= $indent . '<li role="presentation" class="divider">'; |
| 82 | - } elseif ( 0 == strcasecmp( $item->title, 'divider' ) && 1 === $depth ) { |
|
| 82 | + } elseif (0 == strcasecmp($item->title, 'divider') && 1 === $depth) { |
|
| 83 | 83 | $output .= $indent . '<li role="presentation" class="divider">'; |
| 84 | - } elseif ( 0 == strcasecmp( $item->attr_title, 'dropdown-header' ) && 1 === $depth ) { |
|
| 85 | - $output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title ); |
|
| 86 | - } elseif ( 0 == strcasecmp( $item->attr_title, 'disabled' ) ) { |
|
| 87 | - $output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>'; |
|
| 84 | + } elseif (0 == strcasecmp($item->attr_title, 'dropdown-header') && 1 === $depth) { |
|
| 85 | + $output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr($item->title); |
|
| 86 | + } elseif (0 == strcasecmp($item->attr_title, 'disabled')) { |
|
| 87 | + $output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr($item->title) . '</a>'; |
|
| 88 | 88 | } else { |
| 89 | 89 | $class_names = ''; |
| 90 | 90 | $value = ''; |
| 91 | 91 | |
| 92 | - $classes = empty( $item->classes ) ? array() : (array) $item->classes; |
|
| 92 | + $classes = empty($item->classes) ? array() : (array) $item->classes; |
|
| 93 | 93 | $classes[] = 'menu-item-' . $item->ID; |
| 94 | 94 | |
| 95 | - $classes = apply_filters( 'lsx_nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ); |
|
| 95 | + $classes = apply_filters('lsx_nav_menu_css_class', array_filter($classes), $item, $args, $depth); |
|
| 96 | 96 | |
| 97 | - $class_names = join( ' ', $classes ); |
|
| 97 | + $class_names = join(' ', $classes); |
|
| 98 | 98 | |
| 99 | - if ( $args->has_children ) |
|
| 99 | + if ($args->has_children) |
|
| 100 | 100 | $class_names .= ' dropdown'; |
| 101 | 101 | |
| 102 | - if ( in_array( 'current-menu-item', $classes ) ) |
|
| 102 | + if (in_array('current-menu-item', $classes)) |
|
| 103 | 103 | $class_names .= ' active'; |
| 104 | 104 | |
| 105 | - if ( in_array( 'current-menu-parent', $classes ) ) |
|
| 105 | + if (in_array('current-menu-parent', $classes)) |
|
| 106 | 106 | $class_names .= ' active'; |
| 107 | 107 | |
| 108 | 108 | //Check if this is ment to be a "social" type menu |
| 109 | - $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; |
|
| 109 | + $class_names = $class_names ? ' class="' . esc_attr($class_names) . '"' : ''; |
|
| 110 | 110 | |
| 111 | - $id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args ); |
|
| 112 | - $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; |
|
| 111 | + $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args); |
|
| 112 | + $id = $id ? ' id="' . esc_attr($id) . '"' : ''; |
|
| 113 | 113 | |
| 114 | 114 | $output .= $indent . '<li' . $id . $value . $class_names . '>'; |
| 115 | 115 | |
| 116 | 116 | $atts = array(); |
| 117 | - $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : $item->title; |
|
| 118 | - $atts['target'] = ! empty( $item->target ) ? $item->target : ''; |
|
| 119 | - $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; |
|
| 117 | + $atts['title'] = ! empty($item->attr_title) ? $item->attr_title : $item->title; |
|
| 118 | + $atts['target'] = ! empty($item->target) ? $item->target : ''; |
|
| 119 | + $atts['rel'] = ! empty($item->xfn) ? $item->xfn : ''; |
|
| 120 | 120 | |
| 121 | 121 | // If item has_children add atts to a. |
| 122 | - if ( $args->has_children ) { |
|
| 123 | - $atts['href'] = ! empty( $item->url ) ? $item->url : ''; |
|
| 122 | + if ($args->has_children) { |
|
| 123 | + $atts['href'] = ! empty($item->url) ? $item->url : ''; |
|
| 124 | 124 | $atts['data-toggle'] = 'dropdown'; |
| 125 | 125 | $atts['class'] = 'dropdown-toggle'; |
| 126 | 126 | $atts['aria-haspopup'] = 'true'; |
| 127 | 127 | } else { |
| 128 | - $atts['href'] = ! empty( $item->url ) ? $item->url : ''; |
|
| 128 | + $atts['href'] = ! empty($item->url) ? $item->url : ''; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args ); |
|
| 131 | + $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args); |
|
| 132 | 132 | |
| 133 | 133 | $attributes = ''; |
| 134 | - foreach ( $atts as $attr => $value ) { |
|
| 135 | - if ( ! empty( $value ) ) { |
|
| 136 | - $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); |
|
| 134 | + foreach ($atts as $attr => $value) { |
|
| 135 | + if ( ! empty($value)) { |
|
| 136 | + $value = ('href' === $attr) ? esc_url($value) : esc_attr($value); |
|
| 137 | 137 | $attributes .= ' ' . $attr . '="' . $value . '"'; |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -141,11 +141,11 @@ discard block |
||
| 141 | 141 | $item_output = $args->before; |
| 142 | 142 | |
| 143 | 143 | $item_output .= '<a' . $attributes . '>'; |
| 144 | - $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; |
|
| 145 | - $item_output .= ( $args->has_children && 0 === $depth ) ? ' <span class="caret"></span></a>' : '</a>'; |
|
| 144 | + $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after; |
|
| 145 | + $item_output .= ($args->has_children && 0 === $depth) ? ' <span class="caret"></span></a>' : '</a>'; |
|
| 146 | 146 | $item_output .= $args->after; |
| 147 | 147 | |
| 148 | - $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); |
|
| 148 | + $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args); |
|
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | |
@@ -169,18 +169,18 @@ discard block |
||
| 169 | 169 | * @param string $output Passed by reference. Used to append additional content. |
| 170 | 170 | * @return null Null on failure with no changes to parameters. |
| 171 | 171 | */ |
| 172 | - public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { |
|
| 173 | - if ( ! $element ) { |
|
| 172 | + public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) { |
|
| 173 | + if ( ! $element) { |
|
| 174 | 174 | return; |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | $id_field = $this->db_fields['id']; |
| 178 | 178 | |
| 179 | - if ( is_object( $args[0] ) ) { |
|
| 180 | - $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
| 179 | + if (is_object($args[0])) { |
|
| 180 | + $args[0]->has_children = ! empty($children_elements[$element->$id_field]); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
|
| 183 | + parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | /** |
@@ -194,18 +194,18 @@ discard block |
||
| 194 | 194 | * @param array $args passed from the wp_nav_menu function. |
| 195 | 195 | * |
| 196 | 196 | */ |
| 197 | - public static function fallback( $args ) { |
|
| 198 | - if ( current_user_can( 'manage_options' ) ) { |
|
| 197 | + public static function fallback($args) { |
|
| 198 | + if (current_user_can('manage_options')) { |
|
| 199 | 199 | $fb_output = null; |
| 200 | 200 | |
| 201 | - if ( $args['container'] ) { |
|
| 201 | + if ($args['container']) { |
|
| 202 | 202 | $fb_output = '<' . $args['container']; |
| 203 | 203 | |
| 204 | - if ( $args['container_id'] ) { |
|
| 204 | + if ($args['container_id']) { |
|
| 205 | 205 | $fb_output .= ' id="' . $args['container_id'] . '"'; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - if ( $args['container_class'] ) { |
|
| 208 | + if ($args['container_class']) { |
|
| 209 | 209 | $fb_output .= ' class="' . $args['container_class'] . '"'; |
| 210 | 210 | } |
| 211 | 211 | |
@@ -214,23 +214,23 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | $fb_output .= '<ul'; |
| 216 | 216 | |
| 217 | - if ( $args['menu_id'] ) { |
|
| 217 | + if ($args['menu_id']) { |
|
| 218 | 218 | $fb_output .= ' id="' . $args['menu_id'] . '"'; |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | - if ( $args['menu_class'] ) { |
|
| 221 | + if ($args['menu_class']) { |
|
| 222 | 222 | $fb_output .= ' class="' . $args['menu_class'] . '"'; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | $fb_output .= '>'; |
| 226 | - $fb_output .= '<li><a href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add a menu', 'lsx' ) . '</a></li>'; |
|
| 226 | + $fb_output .= '<li><a href="' . esc_url(admin_url('nav-menus.php')) . '">' . esc_html__('Add a menu', 'lsx') . '</a></li>'; |
|
| 227 | 227 | $fb_output .= '</ul>'; |
| 228 | 228 | |
| 229 | - if ( $args['container'] ) { |
|
| 229 | + if ($args['container']) { |
|
| 230 | 230 | $fb_output .= '</' . $args['container'] . '>'; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - echo wp_kses_post( $fb_output ); |
|
| 233 | + echo wp_kses_post($fb_output); |
|
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | |
@@ -7,15 +7,15 @@ discard block |
||
| 7 | 7 | * @category header-layout |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | +if ( ! defined('ABSPATH')) { |
|
| 11 | 11 | exit; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if ( ! class_exists( 'WP_Customize_Control' ) ) { |
|
| 14 | +if ( ! class_exists('WP_Customize_Control')) { |
|
| 15 | 15 | return; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if ( ! class_exists( 'LSX_Customize_Header_Layout_Control' ) ) : |
|
| 18 | +if ( ! class_exists('LSX_Customize_Header_Layout_Control')) : |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * LSX_Customize_Header_Layout_Control Class |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | public $statuses; |
| 31 | 31 | public $layouts = array(); |
| 32 | 32 | |
| 33 | - public function __construct( $manager, $id, $args = array() ) { |
|
| 34 | - parent::__construct( $manager, $id, $args ); |
|
| 33 | + public function __construct($manager, $id, $args = array()) { |
|
| 34 | + parent::__construct($manager, $id, $args); |
|
| 35 | 35 | |
| 36 | - if ( ! empty( $args['choices'] ) ) { |
|
| 36 | + if ( ! empty($args['choices'])) { |
|
| 37 | 37 | $this->layouts = $args['choices']; |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -42,39 +42,39 @@ discard block |
||
| 42 | 42 | * Enqueue scripts/styles for the color picker. |
| 43 | 43 | */ |
| 44 | 44 | public function enqueue() { |
| 45 | - wp_enqueue_script( 'lsx-header-layout-control', get_template_directory_uri() . '/assets/js/admin/customizer-header-layout.js', array( 'jquery' ), LSX_VERSION, true ); |
|
| 45 | + wp_enqueue_script('lsx-header-layout-control', get_template_directory_uri() . '/assets/js/admin/customizer-header-layout.js', array('jquery'), LSX_VERSION, true); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Render output. |
| 50 | 50 | */ |
| 51 | 51 | public function render_content() { |
| 52 | - $post_id = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) ); |
|
| 52 | + $post_id = 'customize-control-' . str_replace('[', '-', str_replace(']', '', $this->id)); |
|
| 53 | 53 | $class = 'customize-control customize-control-' . $this->type; |
| 54 | 54 | $value = $this->value(); |
| 55 | 55 | ?> |
| 56 | 56 | <label> |
| 57 | 57 | <?php |
| 58 | - if ( ! empty( $this->label ) ) { |
|
| 58 | + if ( ! empty($this->label)) { |
|
| 59 | 59 | ?> |
| 60 | - <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
|
| 60 | + <span class="customize-control-title"><?php echo esc_html($this->label); ?></span> |
|
| 61 | 61 | <?php |
| 62 | 62 | } |
| 63 | - if ( ! empty( $this->description ) ) { |
|
| 63 | + if ( ! empty($this->description)) { |
|
| 64 | 64 | ?> |
| 65 | - <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> |
|
| 65 | + <span class="description customize-control-description"><?php echo esc_html($this->description); ?></span> |
|
| 66 | 66 | <?php } ?> |
| 67 | 67 | <div class="header-layouts-selector"> |
| 68 | 68 | <?php |
| 69 | - foreach ( $this->layouts as $layout ) { |
|
| 69 | + foreach ($this->layouts as $layout) { |
|
| 70 | 70 | $sel = 'border: 1px solid transparent;'; |
| 71 | - if ( $value === $layout ) { |
|
| 71 | + if ($value === $layout) { |
|
| 72 | 72 | $sel = 'border: 1px solid rgb(43, 166, 203);'; |
| 73 | 73 | } |
| 74 | - echo '<img class="header-layout-button" style="padding:2px;' . esc_attr( $sel ) . '" src="' . esc_attr( get_template_directory_uri() ) . '/assets/images/admin/header-' . esc_attr( $layout ) . '.png" data-option="' . esc_attr( $layout ) . '">'; |
|
| 74 | + echo '<img class="header-layout-button" style="padding:2px;' . esc_attr($sel) . '" src="' . esc_attr(get_template_directory_uri()) . '/assets/images/admin/header-' . esc_attr($layout) . '.png" data-option="' . esc_attr($layout) . '">'; |
|
| 75 | 75 | } |
| 76 | 76 | ?> |
| 77 | - <input <?php $this->link(); ?> class="selected-header-layout <?php echo esc_attr( $class ); ?>" id="<?php echo esc_attr( $post_id ); ?>" type="hidden" value="<?php echo esc_attr( $value ); ?>" <?php $this->input_attrs(); ?>> |
|
| 77 | + <input <?php $this->link(); ?> class="selected-header-layout <?php echo esc_attr($class); ?>" id="<?php echo esc_attr($post_id); ?>" type="hidden" value="<?php echo esc_attr($value); ?>" <?php $this->input_attrs(); ?>> |
|
| 78 | 78 | </div> |
| 79 | 79 | </label> |
| 80 | 80 | <?php |
@@ -5,35 +5,35 @@ discard block |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -if ( post_password_required() ) { |
|
| 8 | +if (post_password_required()) { |
|
| 9 | 9 | return; |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | $commenter = wp_get_current_commenter(); |
| 13 | -$req = get_option( 'require_name_email' ); |
|
| 14 | -$aria_req = ( $req ? " aria-required='true'" : '' ); |
|
| 15 | -$html_req = ( $req ? " required='required'" : '' ); |
|
| 13 | +$req = get_option('require_name_email'); |
|
| 14 | +$aria_req = ($req ? " aria-required='true'" : ''); |
|
| 15 | +$html_req = ($req ? " required='required'" : ''); |
|
| 16 | 16 | |
| 17 | 17 | $comment_form_args = array( |
| 18 | - 'comment_field' => '<p class="comment-form-comment"><textarea placeholder="' . esc_html__( 'Comment', 'lsx' ) . '" id="comment" class="form-control" name="comment" cols="45" rows="8"' . $aria_req . $html_req . '></textarea></p>', |
|
| 18 | + 'comment_field' => '<p class="comment-form-comment"><textarea placeholder="' . esc_html__('Comment', 'lsx') . '" id="comment" class="form-control" name="comment" cols="45" rows="8"' . $aria_req . $html_req . '></textarea></p>', |
|
| 19 | 19 | |
| 20 | 20 | 'fields' => array( |
| 21 | - 'author' => '<p class="comment-form-author"><label for="author">' . esc_html__( 'Name', 'lsx' ) . '</label> ' . |
|
| 22 | - ( $req ? '<span class="required">*</span>' : '' ) . |
|
| 23 | - '<input class="form-control" placeholder="' . esc_html__( 'Name', 'lsx' ) . '" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . $html_req . '></p>', |
|
| 21 | + 'author' => '<p class="comment-form-author"><label for="author">' . esc_html__('Name', 'lsx') . '</label> ' . |
|
| 22 | + ($req ? '<span class="required">*</span>' : '') . |
|
| 23 | + '<input class="form-control" placeholder="' . esc_html__('Name', 'lsx') . '" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . $html_req . '></p>', |
|
| 24 | 24 | |
| 25 | - 'email' => '<p class="comment-form-email"><label for="email">' . esc_html__( 'Email', 'lsx' ) . '</label> ' . |
|
| 26 | - ( $req ? '<span class="required">*</span>' : '' ) . |
|
| 27 | - '<input class="form-control" placeholder="' . esc_html__( 'Email', 'lsx' ) . '" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . $html_req . '></p>', |
|
| 25 | + 'email' => '<p class="comment-form-email"><label for="email">' . esc_html__('Email', 'lsx') . '</label> ' . |
|
| 26 | + ($req ? '<span class="required">*</span>' : '') . |
|
| 27 | + '<input class="form-control" placeholder="' . esc_html__('Email', 'lsx') . '" id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . $html_req . '></p>', |
|
| 28 | 28 | |
| 29 | - 'url' => '<p class="comment-form-url"><label for="url">' . esc_html__( 'Website', 'lsx' ) . '</label>' . |
|
| 30 | - '<input class="form-control" placeholder="' . esc_html__( 'Website', 'lsx' ) . '" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></p>', |
|
| 29 | + 'url' => '<p class="comment-form-url"><label for="url">' . esc_html__('Website', 'lsx') . '</label>' . |
|
| 30 | + '<input class="form-control" placeholder="' . esc_html__('Website', 'lsx') . '" id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30"></p>', |
|
| 31 | 31 | ), |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | -comment_form( $comment_form_args ); |
|
| 34 | +comment_form($comment_form_args); |
|
| 35 | 35 | |
| 36 | -if ( have_comments() ) : ?> |
|
| 36 | +if (have_comments()) : ?> |
|
| 37 | 37 | |
| 38 | 38 | <?php lsx_comments_before(); ?> |
| 39 | 39 | |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | <?php |
| 43 | 43 | $comments_number = get_comments_number(); |
| 44 | 44 | |
| 45 | - if ( '1' === $comments_number ) { |
|
| 45 | + if ('1' === $comments_number) { |
|
| 46 | 46 | printf( |
| 47 | 47 | /* Translators: %s: post title */ |
| 48 | - esc_html_x( 'One Response to “%s”', 'comments.php', 'lsx' ), |
|
| 48 | + esc_html_x('One Response to “%s”', 'comments.php', 'lsx'), |
|
| 49 | 49 | get_the_title() |
| 50 | 50 | ); |
| 51 | 51 | } else { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | 'lsx' |
| 61 | 61 | ) |
| 62 | 62 | ), |
| 63 | - esc_html( number_format_i18n( $comments_number ) ), |
|
| 63 | + esc_html(number_format_i18n($comments_number)), |
|
| 64 | 64 | get_the_title() |
| 65 | 65 | ); |
| 66 | 66 | } |
@@ -79,24 +79,24 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | <?php |
| 81 | 81 | $comment_pages_count = get_comment_pages_count(); |
| 82 | - if ( $comment_pages_count > 1 && get_option( 'page_comments' ) ) : |
|
| 82 | + if ($comment_pages_count > 1 && get_option('page_comments')) : |
|
| 83 | 83 | ?> |
| 84 | 84 | <nav> |
| 85 | 85 | <ul class="pager"> |
| 86 | - <?php if ( get_previous_comments_link() ) : ?> |
|
| 87 | - <li class="previous"><?php previous_comments_link( esc_html__( '← Older comments', 'lsx' ) ); ?></li> |
|
| 86 | + <?php if (get_previous_comments_link()) : ?> |
|
| 87 | + <li class="previous"><?php previous_comments_link(esc_html__('← Older comments', 'lsx')); ?></li> |
|
| 88 | 88 | <?php endif; ?> |
| 89 | 89 | |
| 90 | - <?php if ( get_next_comments_link() ) : ?> |
|
| 91 | - <li class="next"><?php next_comments_link( esc_html__( 'Newer comments →', 'lsx' ) ); ?></li> |
|
| 90 | + <?php if (get_next_comments_link()) : ?> |
|
| 91 | + <li class="next"><?php next_comments_link(esc_html__('Newer comments →', 'lsx')); ?></li> |
|
| 92 | 92 | <?php endif; ?> |
| 93 | 93 | </ul> |
| 94 | 94 | </nav> |
| 95 | 95 | <?php endif; ?> |
| 96 | 96 | |
| 97 | - <?php if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) : ?> |
|
| 97 | + <?php if ( ! comments_open() && ! is_page() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
| 98 | 98 | <div class="alert alert-warning"> |
| 99 | - <?php esc_html_e( 'Comments are closed.', 'lsx' ); ?> |
|
| 99 | + <?php esc_html_e('Comments are closed.', 'lsx'); ?> |
|
| 100 | 100 | </div> |
| 101 | 101 | <?php endif; ?> |
| 102 | 102 | </section><!-- /#comments --> |
@@ -105,11 +105,11 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | <?php endif; ?> |
| 107 | 107 | |
| 108 | -<?php if ( ! have_comments() && ! comments_open() && post_type_supports( get_post_type(), 'comments' ) ) : ?> |
|
| 108 | +<?php if ( ! have_comments() && ! comments_open() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
| 109 | 109 | |
| 110 | 110 | <section id="comments"> |
| 111 | 111 | <div class="alert alert-warning"> |
| 112 | - <?php esc_html_e( 'Comments are closed.', 'lsx' ); ?> |
|
| 112 | + <?php esc_html_e('Comments are closed.', 'lsx'); ?> |
|
| 113 | 113 | </div> |
| 114 | 114 | </section><!-- /#comments --> |
| 115 | 115 | |
@@ -7,15 +7,15 @@ discard block |
||
| 7 | 7 | * @category mobile-header-layout |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | +if ( ! defined('ABSPATH')) { |
|
| 11 | 11 | exit; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if ( ! class_exists( 'WP_Customize_Control' ) ) { |
|
| 14 | +if ( ! class_exists('WP_Customize_Control')) { |
|
| 15 | 15 | return; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if ( ! class_exists( 'LSX_Customize_Mobile_Header_Layout_Control' ) ) : |
|
| 18 | +if ( ! class_exists('LSX_Customize_Mobile_Header_Layout_Control')) : |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * LSX_Customize_Mobile_Header_Layout_Control Class |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | public $statuses; |
| 31 | 31 | public $layouts = array(); |
| 32 | 32 | |
| 33 | - public function __construct( $manager, $id, $args = array() ) { |
|
| 34 | - parent::__construct( $manager, $id, $args ); |
|
| 33 | + public function __construct($manager, $id, $args = array()) { |
|
| 34 | + parent::__construct($manager, $id, $args); |
|
| 35 | 35 | |
| 36 | - if ( ! empty( $args['choices'] ) ) { |
|
| 36 | + if ( ! empty($args['choices'])) { |
|
| 37 | 37 | $this->layouts = $args['choices']; |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -42,39 +42,39 @@ discard block |
||
| 42 | 42 | * Enqueue scripts/styles for the color picker. |
| 43 | 43 | */ |
| 44 | 44 | public function enqueue() { |
| 45 | - wp_enqueue_script( 'lsx-mobile-header-layout-control', get_template_directory_uri() . '/assets/js/admin/customizer-mobile-header-layout.js', array( 'jquery' ), LSX_VERSION, true ); |
|
| 45 | + wp_enqueue_script('lsx-mobile-header-layout-control', get_template_directory_uri() . '/assets/js/admin/customizer-mobile-header-layout.js', array('jquery'), LSX_VERSION, true); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Render output. |
| 50 | 50 | */ |
| 51 | 51 | public function render_content() { |
| 52 | - $post_id = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) ); |
|
| 52 | + $post_id = 'customize-control-' . str_replace('[', '-', str_replace(']', '', $this->id)); |
|
| 53 | 53 | $class = 'customize-control customize-control-' . $this->type; |
| 54 | 54 | $value = $this->value(); |
| 55 | 55 | ?> |
| 56 | 56 | <label> |
| 57 | 57 | <?php |
| 58 | - if ( ! empty( $this->label ) ) { |
|
| 58 | + if ( ! empty($this->label)) { |
|
| 59 | 59 | ?> |
| 60 | - <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
|
| 60 | + <span class="customize-control-title"><?php echo esc_html($this->label); ?></span> |
|
| 61 | 61 | <?php |
| 62 | 62 | } |
| 63 | - if ( ! empty( $this->description ) ) { |
|
| 63 | + if ( ! empty($this->description)) { |
|
| 64 | 64 | ?> |
| 65 | - <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> |
|
| 65 | + <span class="description customize-control-description"><?php echo esc_html($this->description); ?></span> |
|
| 66 | 66 | <?php } ?> |
| 67 | 67 | <div class="mobile-header-layouts-selector"> |
| 68 | 68 | <?php |
| 69 | - foreach ( $this->layouts as $layout ) { |
|
| 69 | + foreach ($this->layouts as $layout) { |
|
| 70 | 70 | $sel = 'border: 1px solid transparent;'; |
| 71 | - if ( $value === $layout ) { |
|
| 71 | + if ($value === $layout) { |
|
| 72 | 72 | $sel = 'border: 1px solid rgb(43, 166, 203);'; |
| 73 | 73 | } |
| 74 | - echo '<img class="mobile-header-layout-button" style="max-width:180px;padding:2px;' . esc_attr( $sel ) . '" src="' . esc_attr( get_template_directory_uri() ) . '/assets/images/admin/header-' . esc_attr( $layout ) . '.png" data-option="' . esc_attr( $layout ) . '">'; |
|
| 74 | + echo '<img class="mobile-header-layout-button" style="max-width:180px;padding:2px;' . esc_attr($sel) . '" src="' . esc_attr(get_template_directory_uri()) . '/assets/images/admin/header-' . esc_attr($layout) . '.png" data-option="' . esc_attr($layout) . '">'; |
|
| 75 | 75 | } |
| 76 | 76 | ?> |
| 77 | - <input <?php $this->link(); ?> class="selected-mobile-header-layout <?php echo esc_attr( $class ); ?>" id="<?php echo esc_attr( $post_id ); ?>" type="hidden" value="<?php echo esc_attr( $value ); ?>" <?php $this->input_attrs(); ?>> |
|
| 77 | + <input <?php $this->link(); ?> class="selected-mobile-header-layout <?php echo esc_attr($class); ?>" id="<?php echo esc_attr($post_id); ?>" type="hidden" value="<?php echo esc_attr($value); ?>" <?php $this->input_attrs(); ?>> |
|
| 78 | 78 | </div> |
| 79 | 79 | </label> |
| 80 | 80 | <?php |
@@ -9,8 +9,8 @@ discard block |
||
| 9 | 9 | * @package TribeEventsCalendarPro |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | - die( '-1' ); |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | + die('-1'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | // Setup an array of venue details for use later in the template. |
@@ -21,46 +21,46 @@ discard block |
||
| 21 | 21 | $venue_address = tribe_get_address(); |
| 22 | 22 | |
| 23 | 23 | // Venue. |
| 24 | -$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; |
|
| 24 | +$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : ''; |
|
| 25 | 25 | |
| 26 | 26 | // Organizer. |
| 27 | 27 | $organizer = tribe_get_organizer(); |
| 28 | 28 | |
| 29 | 29 | // Event Image. |
| 30 | -echo wp_kses_post( tribe_event_featured_image( null, 'medium' ) ); |
|
| 30 | +echo wp_kses_post(tribe_event_featured_image(null, 'medium')); |
|
| 31 | 31 | ?> |
| 32 | 32 | |
| 33 | 33 | <div class="tribe-events-event-content"> |
| 34 | 34 | <!-- Event Title --> |
| 35 | - <?php do_action( 'tribe_events_before_the_event_title' ); ?> |
|
| 35 | + <?php do_action('tribe_events_before_the_event_title'); ?> |
|
| 36 | 36 | <h2 class="tribe-events-list-event-title"> |
| 37 | - <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 37 | + <a class="tribe-event-url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 38 | 38 | <?php the_title(); ?> |
| 39 | 39 | </a> |
| 40 | 40 | </h2> |
| 41 | - <?php do_action( 'tribe_events_after_the_event_title' ); ?> |
|
| 41 | + <?php do_action('tribe_events_after_the_event_title'); ?> |
|
| 42 | 42 | |
| 43 | 43 | <!-- Event Meta --> |
| 44 | - <?php do_action( 'tribe_events_before_the_meta' ); ?> |
|
| 44 | + <?php do_action('tribe_events_before_the_meta'); ?> |
|
| 45 | 45 | <div class="tribe-events-event-meta"> |
| 46 | - <div class="author <?php echo esc_attr( $has_venue_address ); ?>"> |
|
| 46 | + <div class="author <?php echo esc_attr($has_venue_address); ?>"> |
|
| 47 | 47 | |
| 48 | 48 | <!-- Schedule & Recurrence Details --> |
| 49 | 49 | <div class="tribe-event-schedule-details"> |
| 50 | - <?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?> |
|
| 50 | + <?php echo wp_kses_post(tribe_events_event_schedule_details()); ?> |
|
| 51 | 51 | </div> |
| 52 | 52 | |
| 53 | - <?php if ( $venue_details ) : ?> |
|
| 53 | + <?php if ($venue_details) : ?> |
|
| 54 | 54 | <!-- Venue Display Info --> |
| 55 | 55 | <div class="tribe-events-venue-details"> |
| 56 | 56 | <?php |
| 57 | - $address_delimiter = empty( $venue_address ) ? ' ' : ', '; |
|
| 57 | + $address_delimiter = empty($venue_address) ? ' ' : ', '; |
|
| 58 | 58 | |
| 59 | 59 | // These details are already escaped in various ways earlier in the process. |
| 60 | - echo implode( $address_delimiter, $venue_details ); |
|
| 60 | + echo implode($address_delimiter, $venue_details); |
|
| 61 | 61 | |
| 62 | - if ( tribe_show_google_map_link() ) { |
|
| 63 | - echo wp_kses_post( tribe_get_map_link_html() ); |
|
| 62 | + if (tribe_show_google_map_link()) { |
|
| 63 | + echo wp_kses_post(tribe_get_map_link_html()); |
|
| 64 | 64 | } |
| 65 | 65 | ?> |
| 66 | 66 | </div> <!-- .tribe-events-venue-details --> |
@@ -70,29 +70,29 @@ discard block |
||
| 70 | 70 | </div><!-- .tribe-events-event-meta --> |
| 71 | 71 | |
| 72 | 72 | <!-- Event Cost --> |
| 73 | - <?php if ( tribe_get_cost() ) : ?> |
|
| 73 | + <?php if (tribe_get_cost()) : ?> |
|
| 74 | 74 | <div class="tribe-events-event-cost"> |
| 75 | - <?php esc_html_e( 'Price:', 'lsx' ); ?> |
|
| 76 | - <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span> |
|
| 75 | + <?php esc_html_e('Price:', 'lsx'); ?> |
|
| 76 | + <span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span> |
|
| 77 | 77 | <?php |
| 78 | 78 | /** |
| 79 | 79 | * Runs after cost is displayed in list style views |
| 80 | 80 | * |
| 81 | 81 | * @since 4.5 |
| 82 | 82 | */ |
| 83 | - do_action( 'tribe_events_inside_cost' ) |
|
| 83 | + do_action('tribe_events_inside_cost') |
|
| 84 | 84 | ?> |
| 85 | 85 | </div> |
| 86 | 86 | <?php endif; ?> |
| 87 | 87 | |
| 88 | - <?php do_action( 'tribe_events_after_the_meta' ); ?> |
|
| 88 | + <?php do_action('tribe_events_after_the_meta'); ?> |
|
| 89 | 89 | |
| 90 | 90 | <!-- Event Content --> |
| 91 | - <?php do_action( 'tribe_events_before_the_content' ); ?> |
|
| 91 | + <?php do_action('tribe_events_before_the_content'); ?> |
|
| 92 | 92 | <div class="tribe-events-list-event-description tribe-events-content description entry-summary"> |
| 93 | - <?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?> |
|
| 94 | - <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a> |
|
| 93 | + <?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?> |
|
| 94 | + <a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a> |
|
| 95 | 95 | </div><!-- .tribe-events-list-event-description --> |
| 96 | 96 | |
| 97 | - <?php do_action( 'tribe_events_after_the_content' ); ?> |
|
| 97 | + <?php do_action('tribe_events_after_the_content'); ?> |
|
| 98 | 98 | </div> |
@@ -9,52 +9,52 @@ discard block |
||
| 9 | 9 | * @package TribeEventsCalendarPro |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | - die( '-1' ); |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | + die('-1'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | // Setup an array of venue details for use later in the template. |
| 17 | 17 | $venue_details = tribe_get_venue_details(); |
| 18 | 18 | |
| 19 | 19 | // Venue. |
| 20 | -$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; |
|
| 20 | +$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : ''; |
|
| 21 | 21 | |
| 22 | 22 | // Organizer. |
| 23 | 23 | $organizer = tribe_get_organizer(); |
| 24 | 24 | |
| 25 | 25 | // Event Image. |
| 26 | -echo wp_kses_post( tribe_event_featured_image( null, 'large' ) ); |
|
| 26 | +echo wp_kses_post(tribe_event_featured_image(null, 'large')); |
|
| 27 | 27 | ?> |
| 28 | 28 | |
| 29 | 29 | <div class="tribe-events-event-content"> |
| 30 | 30 | <!-- Event Title --> |
| 31 | - <?php do_action( 'tribe_events_before_the_event_title' ); ?> |
|
| 31 | + <?php do_action('tribe_events_before_the_event_title'); ?> |
|
| 32 | 32 | <h2 class="tribe-events-list-event-title"> |
| 33 | - <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 33 | + <a class="tribe-event-url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 34 | 34 | <?php the_title(); ?> |
| 35 | 35 | </a> |
| 36 | 36 | |
| 37 | - <span class="label label-default"><?php esc_html_e( 'Featured', 'lsx' ); ?></span> |
|
| 37 | + <span class="label label-default"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
| 38 | 38 | </h2> |
| 39 | - <?php do_action( 'tribe_events_after_the_event_title' ); ?> |
|
| 39 | + <?php do_action('tribe_events_after_the_event_title'); ?> |
|
| 40 | 40 | |
| 41 | 41 | <!-- Event Meta --> |
| 42 | - <?php do_action( 'tribe_events_before_the_meta' ); ?> |
|
| 42 | + <?php do_action('tribe_events_before_the_meta'); ?> |
|
| 43 | 43 | <div class="tribe-events-event-meta"> |
| 44 | - <div class="author <?php echo esc_attr( $has_venue_address ); ?>"> |
|
| 44 | + <div class="author <?php echo esc_attr($has_venue_address); ?>"> |
|
| 45 | 45 | |
| 46 | 46 | <!-- Schedule & Recurrence Details --> |
| 47 | 47 | <div class="tribe-event-schedule-details"> |
| 48 | - <?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?> |
|
| 48 | + <?php echo wp_kses_post(tribe_events_event_schedule_details()); ?> |
|
| 49 | 49 | </div> |
| 50 | 50 | |
| 51 | - <?php if ( $venue_details ) : ?> |
|
| 51 | + <?php if ($venue_details) : ?> |
|
| 52 | 52 | <!-- Venue Display Info --> |
| 53 | 53 | <div class="tribe-events-venue-details"> |
| 54 | - <?php echo wp_kses_post( implode( ', ', $venue_details ) ); ?> |
|
| 54 | + <?php echo wp_kses_post(implode(', ', $venue_details)); ?> |
|
| 55 | 55 | <?php |
| 56 | - if ( tribe_show_google_map_link() ) { |
|
| 57 | - echo wp_kses_post( tribe_get_map_link_html() ); |
|
| 56 | + if (tribe_show_google_map_link()) { |
|
| 57 | + echo wp_kses_post(tribe_get_map_link_html()); |
|
| 58 | 58 | } |
| 59 | 59 | ?> |
| 60 | 60 | </div> <!-- .tribe-events-venue-details --> |
@@ -62,26 +62,26 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | </div> |
| 64 | 64 | </div><!-- .tribe-events-event-meta --> |
| 65 | - <?php do_action( 'tribe_events_after_the_meta' ); ?> |
|
| 65 | + <?php do_action('tribe_events_after_the_meta'); ?> |
|
| 66 | 66 | |
| 67 | 67 | <!-- Event Cost --> |
| 68 | - <?php if ( tribe_get_cost() ) : ?> |
|
| 68 | + <?php if (tribe_get_cost()) : ?> |
|
| 69 | 69 | <div class="tribe-events-event-cost featured-event"> |
| 70 | - <?php esc_html_e( 'Price:', 'lsx' ); ?> |
|
| 71 | - <span class="ticket-cost"><?php echo esc_html( tribe_get_cost( null, true ) ); ?></span> |
|
| 70 | + <?php esc_html_e('Price:', 'lsx'); ?> |
|
| 71 | + <span class="ticket-cost"><?php echo esc_html(tribe_get_cost(null, true)); ?></span> |
|
| 72 | 72 | <?php |
| 73 | 73 | /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
| 74 | - do_action( 'tribe_events_inside_cost' ) |
|
| 74 | + do_action('tribe_events_inside_cost') |
|
| 75 | 75 | ?> |
| 76 | 76 | </div> |
| 77 | 77 | <?php endif; ?> |
| 78 | 78 | |
| 79 | 79 | <!-- Event Content --> |
| 80 | - <?php do_action( 'tribe_events_before_the_content' ); ?> |
|
| 80 | + <?php do_action('tribe_events_before_the_content'); ?> |
|
| 81 | 81 | <div class="tribe-events-list-event-description tribe-events-content"> |
| 82 | - <?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?> |
|
| 83 | - <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a> |
|
| 82 | + <?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?> |
|
| 83 | + <a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a> |
|
| 84 | 84 | </div><!-- .tribe-events-list-event-description --> |
| 85 | 85 | |
| 86 | - <?php do_action( 'tribe_events_after_the_content' ); ?> |
|
| 86 | + <?php do_action('tribe_events_after_the_content'); ?> |
|
| 87 | 87 | </div> |
@@ -9,76 +9,76 @@ |
||
| 9 | 9 | * @package TribeEventsCalendarPro |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | - die( '-1' ); |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | + die('-1'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | $venue_details = tribe_get_venue_details(); |
| 17 | 17 | |
| 18 | 18 | // Venue microformats. |
| 19 | -$has_venue = ( $venue_details ) ? ' vcard' : ''; |
|
| 20 | -$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; |
|
| 19 | +$has_venue = ($venue_details) ? ' vcard' : ''; |
|
| 20 | +$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : ''; |
|
| 21 | 21 | |
| 22 | 22 | // The address string via tribe_get_venue_details will often be populated even when there's |
| 23 | 23 | // no address, so let's get the address string on its own for a couple of checks below. |
| 24 | 24 | $venue_address = tribe_get_address(); |
| 25 | 25 | |
| 26 | 26 | // Event Image. |
| 27 | -echo wp_kses_post( tribe_event_featured_image( null, 'medium' ) ); |
|
| 27 | +echo wp_kses_post(tribe_event_featured_image(null, 'medium')); |
|
| 28 | 28 | ?> |
| 29 | 29 | |
| 30 | 30 | <div class="tribe-events-event-content"> |
| 31 | 31 | <!-- Event Title --> |
| 32 | - <?php do_action( 'tribe_events_before_the_event_title' ); ?> |
|
| 32 | + <?php do_action('tribe_events_before_the_event_title'); ?> |
|
| 33 | 33 | <h2 class="tribe-events-list-event-title summary"> |
| 34 | - <a class="url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 34 | + <a class="url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 35 | 35 | <?php the_title(); ?> |
| 36 | 36 | </a> |
| 37 | 37 | </h2> |
| 38 | - <?php do_action( 'tribe_events_after_the_event_title' ); ?> |
|
| 38 | + <?php do_action('tribe_events_after_the_event_title'); ?> |
|
| 39 | 39 | |
| 40 | 40 | <!-- Event Meta --> |
| 41 | - <?php do_action( 'tribe_events_before_the_meta' ); ?> |
|
| 42 | - <div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>"> |
|
| 41 | + <?php do_action('tribe_events_before_the_meta'); ?> |
|
| 42 | + <div class="tribe-events-event-meta <?php echo esc_attr($has_venue . $has_venue_address); ?>"> |
|
| 43 | 43 | |
| 44 | 44 | <!-- Schedule & Recurrence Details --> |
| 45 | 45 | <div class="tribe-updated published time-details"> |
| 46 | - <?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?> |
|
| 46 | + <?php echo wp_kses_post(tribe_events_event_schedule_details()); ?> |
|
| 47 | 47 | </div> |
| 48 | 48 | |
| 49 | - <?php if ( $venue_details ) : ?> |
|
| 49 | + <?php if ($venue_details) : ?> |
|
| 50 | 50 | <!-- Venue Display Info --> |
| 51 | 51 | <div class="tribe-events-venue-details"> |
| 52 | 52 | <?php |
| 53 | - $address_delimiter = empty( $venue_address ) ? ' ' : ', '; |
|
| 53 | + $address_delimiter = empty($venue_address) ? ' ' : ', '; |
|
| 54 | 54 | |
| 55 | 55 | // These details are already escaped in various ways earlier in the code. |
| 56 | - echo implode( $address_delimiter, $venue_details ); |
|
| 56 | + echo implode($address_delimiter, $venue_details); |
|
| 57 | 57 | ?> |
| 58 | 58 | </div> <!-- .tribe-events-venue-details --> |
| 59 | 59 | <?php endif; ?> |
| 60 | 60 | |
| 61 | 61 | </div><!-- .tribe-events-event-meta --> |
| 62 | 62 | |
| 63 | - <?php if ( tribe_get_cost() ) : ?> |
|
| 63 | + <?php if (tribe_get_cost()) : ?> |
|
| 64 | 64 | <div class="tribe-events-event-cost"> |
| 65 | - <?php esc_html_e( 'Price:', 'lsx' ); ?> |
|
| 66 | - <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span> |
|
| 65 | + <?php esc_html_e('Price:', 'lsx'); ?> |
|
| 66 | + <span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span> |
|
| 67 | 67 | <?php |
| 68 | 68 | /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
| 69 | - do_action( 'tribe_events_inside_cost' ) |
|
| 69 | + do_action('tribe_events_inside_cost') |
|
| 70 | 70 | ?> |
| 71 | 71 | </div> |
| 72 | 72 | <?php endif; ?> |
| 73 | 73 | |
| 74 | - <?php do_action( 'tribe_events_after_the_meta' ); ?> |
|
| 74 | + <?php do_action('tribe_events_after_the_meta'); ?> |
|
| 75 | 75 | |
| 76 | 76 | <!-- Event Content --> |
| 77 | - <?php do_action( 'tribe_events_before_the_content' ); ?> |
|
| 77 | + <?php do_action('tribe_events_before_the_content'); ?> |
|
| 78 | 78 | <div class="tribe-events-list-event-description tribe-events-content description entry-summary"> |
| 79 | - <?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?> |
|
| 80 | - <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a> |
|
| 79 | + <?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?> |
|
| 80 | + <a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a> |
|
| 81 | 81 | </div><!-- .tribe-events-list-event-description --> |
| 82 | 82 | |
| 83 | - <?php do_action( 'tribe_events_after_the_content' ); ?> |
|
| 83 | + <?php do_action('tribe_events_after_the_content'); ?> |
|
| 84 | 84 | </div> |
@@ -9,66 +9,66 @@ |
||
| 9 | 9 | * @package TribeEventsCalendarPro |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | - die( '-1' ); |
|
| 12 | +if ( ! defined('ABSPATH')) { |
|
| 13 | + die('-1'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | $venue_details = tribe_get_venue_details(); |
| 17 | 17 | |
| 18 | 18 | // Venue microformats. |
| 19 | -$has_venue = ( $venue_details ) ? ' vcard' : ''; |
|
| 20 | -$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; |
|
| 19 | +$has_venue = ($venue_details) ? ' vcard' : ''; |
|
| 20 | +$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : ''; |
|
| 21 | 21 | |
| 22 | 22 | // Event Image. |
| 23 | -echo wp_kses_post( tribe_event_featured_image( null, 'large' ) ); |
|
| 23 | +echo wp_kses_post(tribe_event_featured_image(null, 'large')); |
|
| 24 | 24 | ?> |
| 25 | 25 | |
| 26 | 26 | <div class="tribe-events-event-content"> |
| 27 | 27 | <!-- Event Title --> |
| 28 | - <?php do_action( 'tribe_events_before_the_event_title' ); ?> |
|
| 28 | + <?php do_action('tribe_events_before_the_event_title'); ?> |
|
| 29 | 29 | <h2 class="tribe-events-list-event-title summary"> |
| 30 | - <a class="url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 30 | + <a class="url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"> |
|
| 31 | 31 | <?php the_title(); ?> |
| 32 | 32 | </a> |
| 33 | 33 | </h2> |
| 34 | - <?php do_action( 'tribe_events_after_the_event_title' ); ?> |
|
| 34 | + <?php do_action('tribe_events_after_the_event_title'); ?> |
|
| 35 | 35 | |
| 36 | 36 | <!-- Event Meta --> |
| 37 | - <?php do_action( 'tribe_events_before_the_meta' ); ?> |
|
| 38 | - <div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>"> |
|
| 37 | + <?php do_action('tribe_events_before_the_meta'); ?> |
|
| 38 | + <div class="tribe-events-event-meta <?php echo esc_attr($has_venue . $has_venue_address); ?>"> |
|
| 39 | 39 | |
| 40 | 40 | <!-- Schedule & Recurrence Details --> |
| 41 | 41 | <div class="tribe-updated published time-details"> |
| 42 | - <?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?> |
|
| 42 | + <?php echo wp_kses_post(tribe_events_event_schedule_details()); ?> |
|
| 43 | 43 | </div> |
| 44 | 44 | |
| 45 | - <?php if ( $venue_details ) : ?> |
|
| 45 | + <?php if ($venue_details) : ?> |
|
| 46 | 46 | <!-- Venue Display Info --> |
| 47 | 47 | <div class="tribe-events-venue-details"> |
| 48 | - <?php echo implode( ', ', $venue_details ); ?> |
|
| 48 | + <?php echo implode(', ', $venue_details); ?> |
|
| 49 | 49 | </div> <!-- .tribe-events-venue-details --> |
| 50 | 50 | <?php endif; ?> |
| 51 | 51 | |
| 52 | 52 | </div><!-- .tribe-events-event-meta --> |
| 53 | - <?php do_action( 'tribe_events_after_the_meta' ); ?> |
|
| 53 | + <?php do_action('tribe_events_after_the_meta'); ?> |
|
| 54 | 54 | |
| 55 | - <?php if ( tribe_get_cost() ) : ?> |
|
| 55 | + <?php if (tribe_get_cost()) : ?> |
|
| 56 | 56 | <div class="tribe-events-event-cost"> |
| 57 | - <?php esc_html_e( 'Price:', 'lsx' ); ?> |
|
| 58 | - <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span> |
|
| 57 | + <?php esc_html_e('Price:', 'lsx'); ?> |
|
| 58 | + <span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span> |
|
| 59 | 59 | <?php |
| 60 | 60 | /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
| 61 | - do_action( 'tribe_events_inside_cost' ) |
|
| 61 | + do_action('tribe_events_inside_cost') |
|
| 62 | 62 | ?> |
| 63 | 63 | </div> |
| 64 | 64 | <?php endif; ?> |
| 65 | 65 | |
| 66 | 66 | <!-- Event Content --> |
| 67 | - <?php do_action( 'tribe_events_before_the_content' ); ?> |
|
| 67 | + <?php do_action('tribe_events_before_the_content'); ?> |
|
| 68 | 68 | <div class="tribe-events-list-event-description tribe-events-content description entry-summary"> |
| 69 | - <?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?> |
|
| 70 | - <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a> |
|
| 69 | + <?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?> |
|
| 70 | + <a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a> |
|
| 71 | 71 | </div><!-- .tribe-events-list-event-description --> |
| 72 | 72 | |
| 73 | - <?php do_action( 'tribe_events_after_the_content' ); ?> |
|
| 73 | + <?php do_action('tribe_events_after_the_content'); ?> |
|
| 74 | 74 | </div> |
@@ -14,31 +14,31 @@ |
||
| 14 | 14 | * @package TribeEventsCalendarPro |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 18 | - die( '-1' ); |
|
| 17 | +if ( ! defined('ABSPATH')) { |
|
| 18 | + die('-1'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $posts = tribe_get_related_posts(); |
| 22 | 22 | |
| 23 | -if ( is_array( $posts ) && ! empty( $posts ) ) : ?> |
|
| 23 | +if (is_array($posts) && ! empty($posts)) : ?> |
|
| 24 | 24 | <?php /* Translators: %s: related */ ?> |
| 25 | -<h3 class="tribe-events-related-events-title"><?php printf( esc_html__( 'Related %s', 'lsx' ), esc_html( tribe_get_event_label_plural() ) ); ?></h3> |
|
| 25 | +<h3 class="tribe-events-related-events-title"><?php printf(esc_html__('Related %s', 'lsx'), esc_html(tribe_get_event_label_plural())); ?></h3> |
|
| 26 | 26 | |
| 27 | 27 | <ul class="tribe-related-events tribe-clearfix"> |
| 28 | - <?php foreach ( $posts as $post ) : ?> |
|
| 28 | + <?php foreach ($posts as $post) : ?> |
|
| 29 | 29 | <li> |
| 30 | - <?php $thumb = ( has_post_thumbnail( $post->ID ) ) ? get_the_post_thumbnail( $post->ID, 'large' ) : '<img src="' . esc_url( trailingslashit( Tribe__Events__Pro__Main::instance()->pluginUrl ) . 'src/resources/images/tribe-related-events-placeholder.png' ) . '" alt="' . esc_attr( get_the_title( $post->ID ) ) . '" />'; ?> |
|
| 30 | + <?php $thumb = (has_post_thumbnail($post->ID)) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . esc_url(trailingslashit(Tribe__Events__Pro__Main::instance()->pluginUrl) . 'src/resources/images/tribe-related-events-placeholder.png') . '" alt="' . esc_attr(get_the_title($post->ID)) . '" />'; ?> |
|
| 31 | 31 | <div class="tribe-related-events-thumbnail"> |
| 32 | - <a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="url" rel="bookmark"><?php echo wp_kses_post( $thumb ); ?></a> |
|
| 32 | + <a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="url" rel="bookmark"><?php echo wp_kses_post($thumb); ?></a> |
|
| 33 | 33 | </div> |
| 34 | 34 | <div class="tribe-related-event-info"> |
| 35 | - <h3 class="tribe-related-events-title"><a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title( $post->ID ); ?></a></h3> |
|
| 35 | + <h3 class="tribe-related-events-title"><a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title($post->ID); ?></a></h3> |
|
| 36 | 36 | <?php |
| 37 | - if ( Tribe__Events__Main::POSTTYPE === $post->post_type ) { |
|
| 38 | - echo wp_kses_post( tribe_events_event_schedule_details( $post ) ); |
|
| 37 | + if (Tribe__Events__Main::POSTTYPE === $post->post_type) { |
|
| 38 | + echo wp_kses_post(tribe_events_event_schedule_details($post)); |
|
| 39 | 39 | } |
| 40 | 40 | ?> |
| 41 | - <a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="moretag"><?php esc_html_e( 'View event', 'lsx' ); ?></a> |
|
| 41 | + <a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="moretag"><?php esc_html_e('View event', 'lsx'); ?></a> |
|
| 42 | 42 | </div> |
| 43 | 43 | </li> |
| 44 | 44 | <?php endforeach; ?> |