@@ -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 | ?> |
@@ -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 | |
@@ -10,23 +10,23 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | <?php lsx_content_top(); ?> |
| 12 | 12 | |
| 13 | - <?php if(is_tax()){ ?> |
|
| 13 | + <?php if (is_tax()) { ?> |
|
| 14 | 14 | <div class="entry-content"> |
| 15 | 15 | <?php the_archive_description(); ?> |
| 16 | 16 | </div> |
| 17 | 17 | <?php } ?> |
| 18 | 18 | |
| 19 | 19 | <?php |
| 20 | - if ( post_type_exists( 'jetpack-portfolio' ) && have_posts() ) : |
|
| 20 | + if (post_type_exists('jetpack-portfolio') && have_posts()) : |
|
| 21 | 21 | ?> |
| 22 | 22 | |
| 23 | - <?php if(!is_tax()){ lsx_portfolio_sorter(); } ?> |
|
| 23 | + <?php if ( ! is_tax()) { lsx_portfolio_sorter(); } ?> |
|
| 24 | 24 | |
| 25 | 25 | <div class="filter-items-wrapper lsx-portfolio-wrapper"> |
| 26 | 26 | <div id="portfolio-infinite-scroll-wrapper" class="filter-items-container lsx-portfolio masonry"> |
| 27 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 27 | + <?php while (have_posts()) : the_post(); ?> |
|
| 28 | 28 | |
| 29 | - <?php get_template_part( 'content', 'portfolio' ); ?> |
|
| 29 | + <?php get_template_part('content', 'portfolio'); ?> |
|
| 30 | 30 | |
| 31 | 31 | <?php endwhile; ?> |
| 32 | 32 | </div> |
@@ -40,17 +40,17 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | <section class="no-results not-found"> |
| 42 | 42 | <header class="page-header"> |
| 43 | - <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' ); ?></h1> |
|
| 43 | + <h1 class="page-title"><?php esc_html_e('Nothing Found', 'lsx'); ?></h1> |
|
| 44 | 44 | </header><!-- .page-header --> |
| 45 | 45 | |
| 46 | 46 | <div class="page-content"> |
| 47 | - <?php if ( current_user_can( 'publish_posts' ) ) : ?> |
|
| 47 | + <?php if (current_user_can('publish_posts')) : ?> |
|
| 48 | 48 | |
| 49 | - <p><?php esc_html_e( 'Ready to publish your first project?', 'lsx' ); ?> <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=jetpack-portfolio' ) ) ?>"><?php esc_html_e( 'Get started here', 'lsx' ); ?></a></p> |
|
| 49 | + <p><?php esc_html_e('Ready to publish your first project?', 'lsx'); ?> <a href="<?php echo esc_url(admin_url('post-new.php?post_type=jetpack-portfolio')) ?>"><?php esc_html_e('Get started here', 'lsx'); ?></a></p> |
|
| 50 | 50 | |
| 51 | 51 | <?php else : ?> |
| 52 | 52 | |
| 53 | - <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lsx' ); ?></p> |
|
| 53 | + <p><?php esc_html_e('It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lsx'); ?></p> |
|
| 54 | 54 | <?php get_search_form(); ?> |
| 55 | 55 | |
| 56 | 56 | <?php endif; ?> |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | <?php lsx_content_wrap_before(); ?> |
| 7 | 7 | |
| 8 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 8 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 9 | 9 | |
| 10 | 10 | <?php lsx_content_before(); ?> |
| 11 | 11 | |
@@ -13,7 +13,7 @@ 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 | 18 | <?php lsx_entry_before(); ?> |
| 19 | 19 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | <?php lsx_sitemap_custom_post_type(); ?> |
| 29 | 29 | |
| 30 | 30 | </div><!-- .entry-content --> |
| 31 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
| 31 | + <?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
| 32 | 32 | |
| 33 | 33 | <?php lsx_entry_bottom(); ?> |
| 34 | 34 | |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | <?php lsx_content_wrap_before(); ?> |
| 13 | 13 | |
| 14 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 14 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 15 | 15 | |
| 16 | 16 | <?php lsx_content_before(); ?> |
| 17 | 17 | |
@@ -19,12 +19,12 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | <?php lsx_content_top(); ?> |
| 21 | 21 | |
| 22 | - <?php if ( have_posts() ) : ?> |
|
| 22 | + <?php if (have_posts()) : ?> |
|
| 23 | 23 | |
| 24 | 24 | <?php |
| 25 | - $layout = get_theme_mod('lsx_layout','2cr'); |
|
| 26 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 27 | - if('1c' === $layout && !is_post_type_archive('tribe_events')){ |
|
| 25 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 26 | + $layout = apply_filters('lsx_layout', $layout); |
|
| 27 | + if ('1c' === $layout && ! is_post_type_archive('tribe_events')) { |
|
| 28 | 28 | lsx_breadcrumbs(); |
| 29 | 29 | } |
| 30 | 30 | ?> |
@@ -33,14 +33,14 @@ discard block |
||
| 33 | 33 | ?> |
| 34 | 34 | |
| 35 | 35 | <?php /* Start the Loop */ ?> |
| 36 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 36 | + <?php while (have_posts()) : the_post(); ?> |
|
| 37 | 37 | |
| 38 | 38 | <?php |
| 39 | 39 | /* Include the Post-Format-specific template for the content. |
| 40 | 40 | * If you want to override this in a child theme, then include a file |
| 41 | 41 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
| 42 | 42 | */ |
| 43 | - get_template_part( 'content', get_post_format() ); |
|
| 43 | + get_template_part('content', get_post_format()); |
|
| 44 | 44 | ?> |
| 45 | 45 | |
| 46 | 46 | <?php endwhile; ?> |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | <?php else : ?> |
| 51 | 51 | |
| 52 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 52 | + <?php get_template_part('content', 'none'); ?> |
|
| 53 | 53 | |
| 54 | 54 | <?php endif; ?> |
| 55 | 55 | |
@@ -7,22 +7,22 @@ |
||
| 7 | 7 | |
| 8 | 8 | get_header(); ?> |
| 9 | 9 | |
| 10 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 10 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 11 | 11 | <main id="main" class="site-main"> |
| 12 | 12 | |
| 13 | 13 | <section class="error-404 not-found"> |
| 14 | 14 | <header class="page-header"> |
| 15 | - <h1 class="page-title"><?php esc_html_e( 'Whoops!', 'lsx' ); ?></h1> |
|
| 15 | + <h1 class="page-title"><?php esc_html_e('Whoops!', 'lsx'); ?></h1> |
|
| 16 | 16 | </header><!-- .page-header --> |
| 17 | 17 | |
| 18 | 18 | <div class="page-content"> |
| 19 | - <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'lsx' ); ?></p> |
|
| 19 | + <p><?php esc_html_e('It looks like nothing was found at this location. Maybe try a search?', 'lsx'); ?></p> |
|
| 20 | 20 | |
| 21 | 21 | </div> <!-- .row --> |
| 22 | 22 | <?php get_search_form(); ?> |
| 23 | 23 | <br /> |
| 24 | 24 | |
| 25 | - <p><?php esc_html_e( 'Alternatively, you can check out the', 'lsx' ); ?> <a href="/sitemap"><strong><?php esc_html_e( 'sitemap', 'lsx' ); ?></strong></a></p> |
|
| 25 | + <p><?php esc_html_e('Alternatively, you can check out the', 'lsx'); ?> <a href="/sitemap"><strong><?php esc_html_e('sitemap', 'lsx'); ?></strong></a></p> |
|
| 26 | 26 | |
| 27 | 27 | </div><!-- .page-content --> |
| 28 | 28 | </section><!-- .error-404 --> |
@@ -9,8 +9,8 @@ discard block |
||
| 9 | 9 | /* |
| 10 | 10 | * Hooks |
| 11 | 11 | */ |
| 12 | -remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); |
|
| 13 | -remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); |
|
| 12 | +remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); |
|
| 13 | +remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); |
|
| 14 | 14 | |
| 15 | 15 | add_action('woocommerce_before_main_content', 'lsx_woocommerce_before_content', 10); |
| 16 | 16 | add_action('woocommerce_after_main_content', 'lsx_woocommerce_after_content', 10); |
@@ -25,10 +25,10 @@ discard block |
||
| 25 | 25 | * @subpackage woocommerce |
| 26 | 26 | * @category layout |
| 27 | 27 | */ |
| 28 | -function lsx_woocommerce_before_content(){ ?> |
|
| 28 | +function lsx_woocommerce_before_content() { ?> |
|
| 29 | 29 | <?php lsx_content_wrap_before(); ?> |
| 30 | 30 | |
| 31 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 31 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 32 | 32 | |
| 33 | 33 | <?php lsx_content_before(); ?> |
| 34 | 34 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @subpackage woocommerce |
| 44 | 44 | * @category layout |
| 45 | 45 | */ |
| 46 | -function lsx_woocommerce_after_content(){ ?> |
|
| 46 | +function lsx_woocommerce_after_content() { ?> |
|
| 47 | 47 | <?php lsx_content_bottom(); ?> |
| 48 | 48 | |
| 49 | 49 | </main><!-- #main --> |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | * @subpackage woocommerce |
| 67 | 67 | * @category styles |
| 68 | 68 | */ |
| 69 | -add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' ); |
|
| 69 | +add_filter('woocommerce_enqueue_styles', '__return_empty_array'); |
|
| 70 | 70 | |
| 71 | 71 | function lsx_woocommerce_styles() { |
| 72 | - wp_enqueue_style( 'woocommerce-layout', get_template_directory_uri() . '/css/woocommerce-layout.css', array(), WC_VERSION, 'all' ); |
|
| 73 | - wp_enqueue_style( 'woocommerce-smallscreen', get_template_directory_uri() . '/css/woocommerce-smallscreen.css', array( 'woocommerce-layout' ), WC_VERSION, 'only screen and (max-width: 767px)' ); |
|
| 74 | - wp_enqueue_style( 'woocommerce-general', get_template_directory_uri() . '/css/woocommerce.css', array(), WC_VERSION, 'all' ); |
|
| 72 | + wp_enqueue_style('woocommerce-layout', get_template_directory_uri() . '/css/woocommerce-layout.css', array(), WC_VERSION, 'all'); |
|
| 73 | + wp_enqueue_style('woocommerce-smallscreen', get_template_directory_uri() . '/css/woocommerce-smallscreen.css', array('woocommerce-layout'), WC_VERSION, 'only screen and (max-width: 767px)'); |
|
| 74 | + wp_enqueue_style('woocommerce-general', get_template_directory_uri() . '/css/woocommerce.css', array(), WC_VERSION, 'all'); |
|
| 75 | 75 | } |
| 76 | -add_action( 'wp_enqueue_scripts', 'lsx_woocommerce_styles' ); |
|
| 77 | 76 | \ No newline at end of file |
| 77 | +add_action('wp_enqueue_scripts', 'lsx_woocommerce_styles'); |
|
| 78 | 78 | \ No newline at end of file |
@@ -12,26 +12,26 @@ discard block |
||
| 12 | 12 | * Hooks |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); |
|
| 16 | -remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); |
|
| 15 | +remove_action('sensei_before_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper'), 10); |
|
| 16 | +remove_action('sensei_after_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper_end'), 10); |
|
| 17 | 17 | |
| 18 | 18 | add_action('sensei_before_main_content', 'lsx_sensei_before_content', 10); |
| 19 | 19 | add_action('sensei_after_main_content', 'lsx_sensei_after_content', 10); |
| 20 | 20 | |
| 21 | 21 | //Switching the course filters and the headers around |
| 22 | -remove_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 ); |
|
| 23 | -remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ) ); |
|
| 24 | -remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ) ); |
|
| 25 | -add_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 11, 0 ); |
|
| 26 | -add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ),12 ); |
|
| 27 | -add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ),12 ); |
|
| 22 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0); |
|
| 23 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting')); |
|
| 24 | +remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters')); |
|
| 25 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 11, 0); |
|
| 26 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'), 12); |
|
| 27 | +add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'), 12); |
|
| 28 | 28 | |
| 29 | 29 | // Moving course image up in DOM |
| 30 | -remove_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,10, 1 ); |
|
| 31 | -add_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,1, 1 ); |
|
| 30 | +remove_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 10, 1); |
|
| 31 | +add_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 1, 1); |
|
| 32 | 32 | |
| 33 | -remove_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 20 ); |
|
| 34 | -add_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 12 ); |
|
| 33 | +remove_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 20); |
|
| 34 | +add_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 12); |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Adds the top and primary divs for the layout. |
@@ -39,22 +39,22 @@ discard block |
||
| 39 | 39 | * @subpackage sensei |
| 40 | 40 | * @category layout |
| 41 | 41 | */ |
| 42 | -function lsx_sensei_wp_head(){ |
|
| 42 | +function lsx_sensei_wp_head() { |
|
| 43 | 43 | |
| 44 | - $layout = get_theme_mod('lsx_layout','2cr'); |
|
| 45 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 44 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 45 | + $layout = apply_filters('lsx_layout', $layout); |
|
| 46 | 46 | |
| 47 | - if('1c' === $layout && is_post_type_archive(array('course','lesson'))) { |
|
| 48 | - add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11 ); |
|
| 47 | + if ('1c' === $layout && is_post_type_archive(array('course', 'lesson'))) { |
|
| 48 | + add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if('1c' === $layout && is_tax(array('module','course-category'))) { |
|
| 51 | + if ('1c' === $layout && is_tax(array('module', 'course-category'))) { |
|
| 52 | 52 | remove_action('lsx_content_top', 'lsx_breadcrumbs'); |
| 53 | - add_action( 'sensei_loop_course_before', 'lsx_breadcrumbs', 80 , 1 ); |
|
| 53 | + add_action('sensei_loop_course_before', 'lsx_breadcrumbs', 80, 1); |
|
| 54 | 54 | |
| 55 | - if(is_tax('module')){ |
|
| 56 | - remove_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 20 ); |
|
| 57 | - add_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 40 ); |
|
| 55 | + if (is_tax('module')) { |
|
| 56 | + remove_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 20); |
|
| 57 | + add_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 40); |
|
| 58 | 58 | |
| 59 | 59 | remove_action('sensei_content_lesson_inside_before', array('Sensei_Core_Modules', 'module_archive_description'), 11); |
| 60 | 60 | } |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | * @subpackage sensei |
| 74 | 74 | * @category layout |
| 75 | 75 | */ |
| 76 | -function lsx_sensei_before_content(){ ?> |
|
| 76 | +function lsx_sensei_before_content() { ?> |
|
| 77 | 77 | <?php lsx_content_wrap_before(); ?> |
| 78 | 78 | |
| 79 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 79 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 80 | 80 | |
| 81 | 81 | <?php lsx_content_before(); ?> |
| 82 | 82 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * @subpackage sensei |
| 93 | 93 | * @category layout |
| 94 | 94 | */ |
| 95 | -function lsx_sensei_after_content(){ ?> |
|
| 95 | +function lsx_sensei_after_content() { ?> |
|
| 96 | 96 | <?php lsx_content_bottom(); ?> |
| 97 | 97 | |
| 98 | 98 | </main><!-- #main --> |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @subpackage sensei |
| 117 | 117 | * @category redirect |
| 118 | 118 | */ |
| 119 | -add_filter( 'sensei_disable_styles', '__return_true' ); |
|
| 119 | +add_filter('sensei_disable_styles', '__return_true'); |
|
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | 122 | * Includes the sensei specific styles. |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | * @category styles |
| 126 | 126 | */ |
| 127 | 127 | function lsx_sensei_styles() { |
| 128 | - wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' ); |
|
| 128 | + wp_enqueue_style('sensei', get_template_directory_uri() . '/css/sensei.css'); |
|
| 129 | 129 | } |
| 130 | -add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' ); |
|
| 130 | +add_action('wp_enqueue_scripts', 'lsx_sensei_styles'); |
|
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | 133 | * Redirects Lessons Archive to Courses Overview |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | * @subpackage woocommerce |
| 136 | 136 | * @category styles |
| 137 | 137 | */ |
| 138 | -function lsx_sensei_redirect_to_home( $query ){ |
|
| 139 | - if(!is_admin() && is_post_type_archive( 'lesson' ) ) { |
|
| 140 | - wp_redirect( home_url() . '/courses-overview' ); |
|
| 138 | +function lsx_sensei_redirect_to_home($query) { |
|
| 139 | + if ( ! is_admin() && is_post_type_archive('lesson')) { |
|
| 140 | + wp_redirect(home_url() . '/courses-overview'); |
|
| 141 | 141 | exit; |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | -add_action( 'parse_query', 'lsx_sensei_redirect_to_home' ); |
|
| 144 | +add_action('parse_query', 'lsx_sensei_redirect_to_home'); |
|
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * Filters the archive title |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | * @subpackage woocommerce |
| 150 | 150 | * @category styles |
| 151 | 151 | */ |
| 152 | -function lsx_sensei_category_title( $html,$term_id ){ |
|
| 153 | - $html = str_replace('h2','h1',$html); |
|
| 154 | - $html = str_replace('sensei-category-title','archive-title',$html); |
|
| 152 | +function lsx_sensei_category_title($html, $term_id) { |
|
| 153 | + $html = str_replace('h2', 'h1', $html); |
|
| 154 | + $html = str_replace('sensei-category-title', 'archive-title', $html); |
|
| 155 | 155 | |
| 156 | - return '<header class="archive-header">'.$html.'</header>'; |
|
| 156 | + return '<header class="archive-header">' . $html . '</header>'; |
|
| 157 | 157 | } |
| 158 | -add_filter( 'course_category_title', 'lsx_sensei_category_title',1,10 ); |
|
| 159 | 158 | \ No newline at end of file |
| 159 | +add_filter('course_category_title', 'lsx_sensei_category_title', 1, 10); |
|
| 160 | 160 | \ No newline at end of file |