@@ -8,51 +8,51 @@ discard block |
||
| 8 | 8 | * @version 4.6.3 |
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 12 | - die( '-1' ); |
|
| 11 | +if ( ! defined('ABSPATH')) { |
|
| 12 | + die('-1'); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | // Setup an array of venue details for use later in the template |
| 16 | 16 | $venue_details = tribe_get_venue_details(); |
| 17 | 17 | |
| 18 | 18 | // Venue |
| 19 | -$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; |
|
| 19 | +$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : ''; |
|
| 20 | 20 | |
| 21 | 21 | // Organizer |
| 22 | 22 | $organizer = tribe_get_organizer(); |
| 23 | 23 | |
| 24 | 24 | // Event Image |
| 25 | -echo tribe_event_featured_image( null, 'large' ); |
|
| 25 | +echo tribe_event_featured_image(null, 'large'); |
|
| 26 | 26 | ?> |
| 27 | 27 | |
| 28 | 28 | <div class="tribe-events-event-content"> |
| 29 | 29 | <!-- Event Title --> |
| 30 | - <?php do_action( 'tribe_events_before_the_event_title' ) ?> |
|
| 30 | + <?php do_action('tribe_events_before_the_event_title') ?> |
|
| 31 | 31 | <h2 class="tribe-events-list-event-title"> |
| 32 | - <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark"> |
|
| 32 | + <a class="tribe-event-url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute() ?>" rel="bookmark"> |
|
| 33 | 33 | <?php the_title() ?> |
| 34 | 34 | </a> |
| 35 | 35 | |
| 36 | - <span class="label label-default"><?php esc_html_e( 'Featured', 'the-events-calendar' ) ?></span> |
|
| 36 | + <span class="label label-default"><?php esc_html_e('Featured', 'the-events-calendar') ?></span> |
|
| 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' ) ?> |
|
| 41 | + <?php do_action('tribe_events_before_the_meta') ?> |
|
| 42 | 42 | <div class="tribe-events-event-meta"> |
| 43 | - <div class="author <?php echo esc_attr( $has_venue_address ); ?>"> |
|
| 43 | + <div class="author <?php echo esc_attr($has_venue_address); ?>"> |
|
| 44 | 44 | |
| 45 | 45 | <!-- Schedule & Recurrence Details --> |
| 46 | 46 | <div class="tribe-event-schedule-details"> |
| 47 | 47 | <?php echo tribe_events_event_schedule_details() ?> |
| 48 | 48 | </div> |
| 49 | 49 | |
| 50 | - <?php if ( $venue_details ) : ?> |
|
| 50 | + <?php if ($venue_details) : ?> |
|
| 51 | 51 | <!-- Venue Display Info --> |
| 52 | 52 | <div class="tribe-events-venue-details"> |
| 53 | - <?php echo implode( ', ', $venue_details ); ?> |
|
| 53 | + <?php echo implode(', ', $venue_details); ?> |
|
| 54 | 54 | <?php |
| 55 | - if ( tribe_show_google_map_link() ) { |
|
| 55 | + if (tribe_show_google_map_link()) { |
|
| 56 | 56 | echo tribe_get_map_link_html(); |
| 57 | 57 | } |
| 58 | 58 | ?> |
@@ -61,26 +61,26 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | </div> |
| 63 | 63 | </div><!-- .tribe-events-event-meta --> |
| 64 | - <?php do_action( 'tribe_events_after_the_meta' ) ?> |
|
| 64 | + <?php do_action('tribe_events_after_the_meta') ?> |
|
| 65 | 65 | |
| 66 | 66 | <!-- Event Cost --> |
| 67 | - <?php if ( tribe_get_cost() ) : ?> |
|
| 67 | + <?php if (tribe_get_cost()) : ?> |
|
| 68 | 68 | <div class="tribe-events-event-cost featured-event"> |
| 69 | - <?php esc_html_e( 'Price:', 'lsx' ) ?> |
|
| 70 | - <span class="ticket-cost"><?php echo esc_html( tribe_get_cost( null, true ) ); ?></span> |
|
| 69 | + <?php esc_html_e('Price:', 'lsx') ?> |
|
| 70 | + <span class="ticket-cost"><?php echo esc_html(tribe_get_cost(null, true)); ?></span> |
|
| 71 | 71 | <?php |
| 72 | 72 | /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
| 73 | - do_action( 'tribe_events_inside_cost' ) |
|
| 73 | + do_action('tribe_events_inside_cost') |
|
| 74 | 74 | ?> |
| 75 | 75 | </div> |
| 76 | 76 | <?php endif; ?> |
| 77 | 77 | |
| 78 | 78 | <!-- Event Content --> |
| 79 | - <?php do_action( 'tribe_events_before_the_content' ) ?> |
|
| 79 | + <?php do_action('tribe_events_before_the_content') ?> |
|
| 80 | 80 | <div class="tribe-events-list-event-description tribe-events-content"> |
| 81 | - <?php echo tribe_events_get_the_excerpt( null, wp_kses_allowed_html( 'post' ) ); ?> |
|
| 82 | - <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'the-events-calendar' ) ?></a> |
|
| 81 | + <?php echo tribe_events_get_the_excerpt(null, wp_kses_allowed_html('post')); ?> |
|
| 82 | + <a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'the-events-calendar') ?></a> |
|
| 83 | 83 | </div><!-- .tribe-events-list-event-description --> |
| 84 | 84 | |
| 85 | - <?php do_action( 'tribe_events_after_the_content' ); ?> |
|
| 85 | + <?php do_action('tribe_events_after_the_content'); ?> |
|
| 86 | 86 | </div> |
@@ -9,66 +9,66 @@ |
||
| 9 | 9 | * |
| 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 tribe_event_featured_image( null, 'large' ); |
|
| 23 | +echo 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 | 42 | <?php echo 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 | 69 | <?php echo 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', 'the-events-calendar' ) ?></a> |
|
| 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', 'the-events-calendar') ?></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> |
@@ -9,76 +9,76 @@ |
||
| 9 | 9 | * |
| 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 tribe_event_featured_image( null, 'medium' ); |
|
| 27 | +echo 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 | 46 | <?php echo 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 | 79 | <?php echo 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', 'the-events-calendar' ) ?></a> |
|
| 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', 'the-events-calendar') ?></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> |
@@ -6,13 +6,13 @@ discard block |
||
| 6 | 6 | * @subpackage sensei |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if ( ! defined('ABSPATH')) { |
|
| 10 | 10 | exit; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | global $woothemes_sensei; |
| 14 | 14 | |
| 15 | -if ( ! function_exists( 'lsx_sensei_scripts_add_styles' ) ) : |
|
| 15 | +if ( ! function_exists('lsx_sensei_scripts_add_styles')) : |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Sensei enqueue styles. |
@@ -21,15 +21,15 @@ discard block |
||
| 21 | 21 | * @subpackage sensei |
| 22 | 22 | */ |
| 23 | 23 | function lsx_sensei_scripts_add_styles() { |
| 24 | - wp_enqueue_style( 'sensei-lsx', get_template_directory_uri() . '/assets/css/sensei.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 25 | - wp_style_add_data( 'sensei-lsx', 'rtl', 'replace' ); |
|
| 24 | + wp_enqueue_style('sensei-lsx', get_template_directory_uri() . '/assets/css/sensei.css', array('lsx_main'), LSX_VERSION); |
|
| 25 | + wp_style_add_data('sensei-lsx', 'rtl', 'replace'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - add_action( 'wp_enqueue_scripts', 'lsx_sensei_scripts_add_styles' ); |
|
| 28 | + add_action('wp_enqueue_scripts', 'lsx_sensei_scripts_add_styles'); |
|
| 29 | 29 | |
| 30 | 30 | endif; |
| 31 | 31 | |
| 32 | -if ( ! function_exists( 'lsx_sensei_theme_wrapper_start' ) ) : |
|
| 32 | +if ( ! function_exists('lsx_sensei_theme_wrapper_start')) : |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Sensei wrapper start. |
@@ -39,18 +39,18 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | function lsx_sensei_theme_wrapper_start() { |
| 41 | 41 | lsx_content_wrap_before(); |
| 42 | - echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">'; |
|
| 42 | + echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">'; |
|
| 43 | 43 | lsx_content_before(); |
| 44 | 44 | echo '<main id="main" class="site-main" role="main">'; |
| 45 | 45 | lsx_content_top(); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); |
|
| 49 | - add_action( 'sensei_before_main_content', 'lsx_sensei_theme_wrapper_start' ); |
|
| 48 | + remove_action('sensei_before_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper'), 10); |
|
| 49 | + add_action('sensei_before_main_content', 'lsx_sensei_theme_wrapper_start'); |
|
| 50 | 50 | |
| 51 | 51 | endif; |
| 52 | 52 | |
| 53 | -if ( ! function_exists( 'lsx_sensei_theme_wrapper_end' ) ) : |
|
| 53 | +if ( ! function_exists('lsx_sensei_theme_wrapper_end')) : |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Sensei wrapper end. |
@@ -66,12 +66,12 @@ discard block |
||
| 66 | 66 | lsx_content_wrap_after(); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); |
|
| 70 | - add_action( 'sensei_after_main_content', 'lsx_sensei_theme_wrapper_end' ); |
|
| 69 | + remove_action('sensei_after_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper_end'), 10); |
|
| 70 | + add_action('sensei_after_main_content', 'lsx_sensei_theme_wrapper_end'); |
|
| 71 | 71 | |
| 72 | 72 | endif; |
| 73 | 73 | |
| 74 | -if ( ! function_exists( 'lsx_sensei_disable_lsx_banner' ) ) : |
|
| 74 | +if ( ! function_exists('lsx_sensei_disable_lsx_banner')) : |
|
| 75 | 75 | |
| 76 | 76 | /** |
| 77 | 77 | * Disable LSX Banners in some Sensei pages. |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | * @package lsx |
| 80 | 80 | * @subpackage sensei |
| 81 | 81 | */ |
| 82 | - function lsx_sensei_disable_lsx_banner( $disabled ) { |
|
| 83 | - if ( is_sensei() ) { |
|
| 82 | + function lsx_sensei_disable_lsx_banner($disabled) { |
|
| 83 | + if (is_sensei()) { |
|
| 84 | 84 | $disabled = true; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -88,15 +88,15 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | // LSX |
| 91 | - add_filter( 'lsx_global_header_disable', 'lsx_sensei_disable_lsx_banner' ); |
|
| 91 | + add_filter('lsx_global_header_disable', 'lsx_sensei_disable_lsx_banner'); |
|
| 92 | 92 | // LSX Banners - Plugin, Placeholders |
| 93 | - add_filter( 'lsx_banner_plugin_disable', 'lsx_sensei_disable_lsx_banner' ); |
|
| 93 | + add_filter('lsx_banner_plugin_disable', 'lsx_sensei_disable_lsx_banner'); |
|
| 94 | 94 | // LSX Banners - Banner |
| 95 | - add_filter( 'lsx_banner_disable', 'lsx_sensei_disable_lsx_banner' ); |
|
| 95 | + add_filter('lsx_banner_disable', 'lsx_sensei_disable_lsx_banner'); |
|
| 96 | 96 | |
| 97 | 97 | endif; |
| 98 | 98 | |
| 99 | -if ( ! function_exists( 'lsx_sensei_archive_title' ) ) : |
|
| 99 | +if ( ! function_exists('lsx_sensei_archive_title')) : |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Filters the archive title. |
@@ -104,17 +104,17 @@ discard block |
||
| 104 | 104 | * @package lsx |
| 105 | 105 | * @subpackage sensei |
| 106 | 106 | */ |
| 107 | - function lsx_sensei_archive_title( $html ) { |
|
| 108 | - $html = preg_replace( '/<header class="archive-header"><h1>([^<]+)<\/h1><\/header>/i', '<h1>$1</h1>', $html ); |
|
| 107 | + function lsx_sensei_archive_title($html) { |
|
| 108 | + $html = preg_replace('/<header class="archive-header"><h1>([^<]+)<\/h1><\/header>/i', '<h1>$1</h1>', $html); |
|
| 109 | 109 | return $html; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - add_filter( 'course_archive_title', 'lsx_sensei_archive_title', 10, 1 ); |
|
| 113 | - add_filter( 'sensei_lesson_archive_title', 'lsx_sensei_archive_title', 10, 1 ); |
|
| 112 | + add_filter('course_archive_title', 'lsx_sensei_archive_title', 10, 1); |
|
| 113 | + add_filter('sensei_lesson_archive_title', 'lsx_sensei_archive_title', 10, 1); |
|
| 114 | 114 | |
| 115 | 115 | endif; |
| 116 | 116 | |
| 117 | -if ( ! function_exists( 'lsx_sensei_category_title' ) ) : |
|
| 117 | +if ( ! function_exists('lsx_sensei_category_title')) : |
|
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * Filters the archive title. |
@@ -122,24 +122,24 @@ discard block |
||
| 122 | 122 | * @package lsx |
| 123 | 123 | * @subpackage sensei |
| 124 | 124 | */ |
| 125 | - function lsx_sensei_category_title( $html ) { |
|
| 126 | - $html = str_replace( 'h2', 'h1', $html ); |
|
| 125 | + function lsx_sensei_category_title($html) { |
|
| 126 | + $html = str_replace('h2', 'h1', $html); |
|
| 127 | 127 | return $html; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - add_filter( 'course_category_title', 'lsx_sensei_category_title', 10, 1 ); |
|
| 130 | + add_filter('course_category_title', 'lsx_sensei_category_title', 10, 1); |
|
| 131 | 131 | |
| 132 | 132 | endif; |
| 133 | 133 | |
| 134 | 134 | // Switching the course filters and the headers around |
| 135 | -remove_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 ); |
|
| 136 | -remove_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_sorting' ) ); |
|
| 137 | -remove_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_filters' ) ); |
|
| 138 | -add_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 11, 0 ); |
|
| 139 | -add_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_sorting' ),12 ); |
|
| 140 | -add_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_filters' ),12 ); |
|
| 135 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0); |
|
| 136 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting')); |
|
| 137 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters')); |
|
| 138 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 11, 0); |
|
| 139 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'), 12); |
|
| 140 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'), 12); |
|
| 141 | 141 | |
| 142 | -if ( ! function_exists( 'lsx_sensei_add_buttons' ) ) : |
|
| 142 | +if ( ! function_exists('lsx_sensei_add_buttons')) : |
|
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | 145 | * Add extra buttons to the single view on lists. |
@@ -147,27 +147,27 @@ discard block |
||
| 147 | 147 | * @package lsx |
| 148 | 148 | * @subpackage sensei |
| 149 | 149 | */ |
| 150 | - function lsx_sensei_add_buttons( $course_id ) { |
|
| 150 | + function lsx_sensei_add_buttons($course_id) { |
|
| 151 | 151 | global $post, $current_user; |
| 152 | - $is_user_taking_course = Sensei_Utils::user_started_course( $post->ID, $current_user->ID ); |
|
| 152 | + $is_user_taking_course = Sensei_Utils::user_started_course($post->ID, $current_user->ID); |
|
| 153 | 153 | ?> |
| 154 | 154 | <section class="entry-actions"> |
| 155 | - <a class="button" href="<?php echo esc_url( tribe_get_event_link() ); ?>"><?php esc_html_e( 'View course', 'lsx' ); ?></a> |
|
| 155 | + <a class="button" href="<?php echo esc_url(tribe_get_event_link()); ?>"><?php esc_html_e('View course', 'lsx'); ?></a> |
|
| 156 | 156 | |
| 157 | 157 | <?php |
| 158 | - if ( is_user_logged_in() && ! $is_user_taking_course ) { |
|
| 159 | - Sensei_WC::the_add_to_cart_button_html( $post->ID ); |
|
| 158 | + if (is_user_logged_in() && ! $is_user_taking_course) { |
|
| 159 | + Sensei_WC::the_add_to_cart_button_html($post->ID); |
|
| 160 | 160 | } |
| 161 | 161 | ?> |
| 162 | 162 | </section> |
| 163 | 163 | <?php |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - add_action( 'sensei_course_content_inside_after', 'lsx_sensei_add_buttons', 9 ); |
|
| 166 | + add_action('sensei_course_content_inside_after', 'lsx_sensei_add_buttons', 9); |
|
| 167 | 167 | |
| 168 | 168 | endif; |
| 169 | 169 | |
| 170 | -if ( ! function_exists( 'lsx_sensei_add_to_cart_text' ) ) : |
|
| 170 | +if ( ! function_exists('lsx_sensei_add_to_cart_text')) : |
|
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | 173 | * Change add to cart button text. |
@@ -175,12 +175,12 @@ discard block |
||
| 175 | 175 | * @package lsx |
| 176 | 176 | * @subpackage sensei |
| 177 | 177 | */ |
| 178 | - function lsx_sensei_add_to_cart_text( $text ) { |
|
| 179 | - $text = esc_html__( 'Add to cart', 'lsx' ); |
|
| 178 | + function lsx_sensei_add_to_cart_text($text) { |
|
| 179 | + $text = esc_html__('Add to cart', 'lsx'); |
|
| 180 | 180 | return $text; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - add_filter( 'sensei_wc_single_add_to_cart_button_text', 'lsx_sensei_add_to_cart_text' ); |
|
| 183 | + add_filter('sensei_wc_single_add_to_cart_button_text', 'lsx_sensei_add_to_cart_text'); |
|
| 184 | 184 | |
| 185 | 185 | endif; |
| 186 | 186 | |