@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | <?php lsx_content_wrap_before(); ?> |
| 12 | 12 | |
| 13 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 13 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 14 | 14 | |
| 15 | 15 | <?php lsx_content_before(); ?> |
| 16 | 16 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | <?php lsx_content_top(); ?> |
| 20 | 20 | |
| 21 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 21 | + <?php while (have_posts()) : the_post(); ?> |
|
| 22 | 22 | |
| 23 | 23 | <?php lsx_entry_before(); ?> |
| 24 | 24 | |
@@ -32,25 +32,25 @@ discard block |
||
| 32 | 32 | <div class="entry-meta"> |
| 33 | 33 | <?php |
| 34 | 34 | $metadata = wp_get_attachment_metadata(); |
| 35 | - printf( wp_kses_post( '%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s × %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>' ), |
|
| 36 | - esc_html__( 'Published', 'lsx' ), |
|
| 37 | - esc_attr( get_the_date( 'c' ) ), |
|
| 38 | - esc_html( get_the_date() ), |
|
| 39 | - esc_html__( 'at', 'lsx' ), |
|
| 40 | - esc_url( wp_get_attachment_url() ), |
|
| 41 | - esc_attr( $metadata['width'] ), |
|
| 42 | - esc_attr( $metadata['height'] ), |
|
| 43 | - esc_html__( 'in', 'lsx' ), |
|
| 44 | - esc_url( get_permalink( $post->post_parent ) ), |
|
| 45 | - get_the_title( $post->post_parent ) |
|
| 35 | + printf(wp_kses_post('%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s × %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>'), |
|
| 36 | + esc_html__('Published', 'lsx'), |
|
| 37 | + esc_attr(get_the_date('c')), |
|
| 38 | + esc_html(get_the_date()), |
|
| 39 | + esc_html__('at', 'lsx'), |
|
| 40 | + esc_url(wp_get_attachment_url()), |
|
| 41 | + esc_attr($metadata['width']), |
|
| 42 | + esc_attr($metadata['height']), |
|
| 43 | + esc_html__('in', 'lsx'), |
|
| 44 | + esc_url(get_permalink($post->post_parent)), |
|
| 45 | + get_the_title($post->post_parent) |
|
| 46 | 46 | ); |
| 47 | 47 | ?> |
| 48 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
|
| 48 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="sep"> | </span> <span class="edit-link">', '</span>'); ?> |
|
| 49 | 49 | </div><!-- .entry-meta --> |
| 50 | 50 | |
| 51 | 51 | <nav id="image-navigation" class="site-navigation"> |
| 52 | - <span class="previous-image"><?php previous_image_link( false, '← '.esc_html__( 'Previous', 'lsx' ) ); ?></span> |
|
| 53 | - <span class="next-image"><?php next_image_link( false, esc_html__( 'Next', 'lsx' ).' →' ); ?></span> |
|
| 52 | + <span class="previous-image"><?php previous_image_link(false, '← ' . esc_html__('Previous', 'lsx')); ?></span> |
|
| 53 | + <span class="next-image"><?php next_image_link(false, esc_html__('Next', 'lsx') . ' →'); ?></span> |
|
| 54 | 54 | </nav><!-- #image-navigation --> |
| 55 | 55 | </header><!-- .entry-header --> |
| 56 | 56 | |
@@ -63,33 +63,33 @@ discard block |
||
| 63 | 63 | * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, |
| 64 | 64 | * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file |
| 65 | 65 | */ |
| 66 | - $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
|
| 67 | - foreach ( $attachments as $k => $attachment ) { |
|
| 68 | - if ( $attachment->ID == $post->ID ) |
|
| 66 | + $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'))); |
|
| 67 | + foreach ($attachments as $k => $attachment) { |
|
| 68 | + if ($attachment->ID == $post->ID) |
|
| 69 | 69 | break; |
| 70 | 70 | } |
| 71 | 71 | $k++; |
| 72 | 72 | // If there is more than 1 attachment in a gallery |
| 73 | - if ( count( $attachments ) > 1 ) { |
|
| 74 | - if ( isset( $attachments[ $k ] ) ) |
|
| 73 | + if (count($attachments) > 1) { |
|
| 74 | + if (isset($attachments[$k])) |
|
| 75 | 75 | // get the URL of the next image attachment |
| 76 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
| 76 | + $next_attachment_url = get_attachment_link($attachments[$k]->ID); |
|
| 77 | 77 | else |
| 78 | 78 | // or get the URL of the first image attachment |
| 79 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
| 79 | + $next_attachment_url = get_attachment_link($attachments[0]->ID); |
|
| 80 | 80 | } else { |
| 81 | 81 | // or, if there's only 1 image, get the URL of the image |
| 82 | 82 | $next_attachment_url = wp_get_attachment_url(); |
| 83 | 83 | } |
| 84 | 84 | ?> |
| 85 | 85 | |
| 86 | - <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
|
| 87 | - $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
| 88 | - echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
| 86 | + <a href="<?php echo esc_url($next_attachment_url); ?>" title="<?php echo esc_attr(get_the_title()); ?>" rel="attachment"><?php |
|
| 87 | + $attachment_size = apply_filters('shape_attachment_size', array(1200, 1200)); // Filterable image size. |
|
| 88 | + echo wp_get_attachment_image($post->ID, $attachment_size); |
|
| 89 | 89 | ?></a> |
| 90 | 90 | </div><!-- .attachment --> |
| 91 | 91 | |
| 92 | - <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
|
| 92 | + <?php if ( ! empty($post->post_excerpt)) : ?> |
|
| 93 | 93 | <div class="entry-caption"> |
| 94 | 94 | <?php the_excerpt(); ?> |
| 95 | 95 | </div><!-- .entry-caption --> |
@@ -99,27 +99,27 @@ discard block |
||
| 99 | 99 | <?php |
| 100 | 100 | the_content(); |
| 101 | 101 | |
| 102 | - wp_link_pages( array( |
|
| 102 | + wp_link_pages(array( |
|
| 103 | 103 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 104 | 104 | 'after' => '</div></div>', |
| 105 | 105 | 'link_before' => '<span>', |
| 106 | 106 | 'link_after' => '</span>' |
| 107 | - ) ); |
|
| 107 | + )); |
|
| 108 | 108 | ?> |
| 109 | 109 | |
| 110 | 110 | </div><!-- .entry-content --> |
| 111 | 111 | |
| 112 | 112 | <footer class="entry-meta"> |
| 113 | 113 | |
| 114 | - <?php if ( ! is_single() ) : ?> |
|
| 115 | - <a class="read-more" href="<?php the_permalink(); ?>"><?php esc_html_e( 'Read More', 'lsx' ); ?></a> |
|
| 114 | + <?php if ( ! is_single()) : ?> |
|
| 115 | + <a class="read-more" href="<?php the_permalink(); ?>"><?php esc_html_e('Read More', 'lsx'); ?></a> |
|
| 116 | 116 | <?php endif ?> |
| 117 | 117 | |
| 118 | - <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> |
|
| 119 | - <span class="comments-link"><?php comments_popup_link( esc_html__( 'Leave a comment', 'lsx' ), esc_html__( '1 Comment', 'lsx' ), esc_html__( '% Comments', 'lsx' ) ); ?></span> |
|
| 118 | + <?php if ( ! post_password_required() && (comments_open() || '0' != get_comments_number())) : ?> |
|
| 119 | + <span class="comments-link"><?php comments_popup_link(esc_html__('Leave a comment', 'lsx'), esc_html__('1 Comment', 'lsx'), esc_html__('% Comments', 'lsx')); ?></span> |
|
| 120 | 120 | <?php endif; ?> |
| 121 | 121 | |
| 122 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 122 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?> |
|
| 123 | 123 | </footer><!-- .entry-meta --> |
| 124 | 124 | |
| 125 | 125 | <?php lsx_entry_bottom(); ?> |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | <?php |
| 130 | 130 | // If comments are open or we have at least one comment, load up the comment template |
| 131 | - if ( comments_open() || '0' != get_comments_number() ) : |
|
| 131 | + if (comments_open() || '0' != get_comments_number()) : |
|
| 132 | 132 | comments_template(); |
| 133 | 133 | endif; |
| 134 | 134 | ?> |
@@ -12,20 +12,20 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | <?php |
| 14 | 14 | $format = get_post_format(); |
| 15 | - if ( false === $format ) { |
|
| 15 | + if (false === $format) { |
|
| 16 | 16 | $format = 'standard'; |
| 17 | 17 | } |
| 18 | 18 | $format_link = get_post_format_link($format); |
| 19 | 19 | $format = lsx_translate_format_to_fontawesome($format); |
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | - <?php if ( ! is_single() ) { ?> |
|
| 22 | + <?php if ( ! is_single()) { ?> |
|
| 23 | 23 | <header class="entry-header"> |
| 24 | 24 | <h1 class="entry-title"> |
| 25 | - <?php if ( has_post_thumbnail() ) { ?> |
|
| 26 | - <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 25 | + <?php if (has_post_thumbnail()) { ?> |
|
| 26 | + <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 27 | 27 | <?php } else { ?> |
| 28 | - <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 28 | + <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 29 | 29 | <?php } ?> |
| 30 | 30 | |
| 31 | 31 | <span><?php the_title(); ?></span> |
@@ -39,33 +39,33 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | <div class="entry-content"> |
| 41 | 41 | <?php |
| 42 | - if ( ! is_singular() ) { |
|
| 42 | + if ( ! is_singular()) { |
|
| 43 | 43 | the_excerpt(); |
| 44 | 44 | } else { |
| 45 | 45 | the_content(); |
| 46 | 46 | |
| 47 | - wp_link_pages( array( |
|
| 47 | + wp_link_pages(array( |
|
| 48 | 48 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 49 | 49 | 'after' => '</div></div>', |
| 50 | 50 | 'link_before' => '<span>', |
| 51 | 51 | 'link_after' => '</span>' |
| 52 | - ) ); |
|
| 52 | + )); |
|
| 53 | 53 | } ?> |
| 54 | 54 | </div><!-- .entry-content --> |
| 55 | 55 | |
| 56 | 56 | <footer class="footer-meta"> |
| 57 | - <?php if ( has_tag() || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
| 57 | + <?php if (has_tag() || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
| 58 | 58 | <div class="post-tags-wrapper"> |
| 59 | 59 | <?php lsx_content_post_tags(); ?> |
| 60 | 60 | |
| 61 | 61 | <?php |
| 62 | - if ( function_exists( 'sharing_display' ) ) { |
|
| 63 | - sharing_display( '', true ); |
|
| 62 | + if (function_exists('sharing_display')) { |
|
| 63 | + sharing_display('', true); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 66 | + if (class_exists('Jetpack_Likes')) { |
|
| 67 | 67 | $custom_likes = new Jetpack_Likes; |
| 68 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
| 68 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
| 69 | 69 | } |
| 70 | 70 | ?> |
| 71 | 71 | </div> |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | <?php |
| 75 | 75 | // If comments are open or we have at least one comment, load up the comment template |
| 76 | - if ( comments_open() || '0' != get_comments_number() ) : ?> |
|
| 77 | - <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html( get_comments_number() ) ?></strong> <?php esc_html_e('Comments','lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
|
| 76 | + if (comments_open() || '0' != get_comments_number()) : ?> |
|
| 77 | + <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html(get_comments_number()) ?></strong> <?php esc_html_e('Comments', 'lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
|
| 78 | 78 | |
| 79 | 79 | <div class="collapse" id="comments-collapse"> |
| 80 | 80 | <?php |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | <?php endif; ?> |
| 85 | 85 | </footer><!-- .footer-meta --> |
| 86 | 86 | |
| 87 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
| 87 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
| 88 | 88 | |
| 89 | 89 | <?php lsx_entry_bottom(); ?> |
| 90 | 90 | |
@@ -1,53 +1,53 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
| 2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Register widgetized area and update sidebar with default widgets. |
| 6 | 6 | */ |
| 7 | 7 | function lsx_widget_area_init() { |
| 8 | 8 | |
| 9 | - register_sidebar( array( |
|
| 10 | - 'name' => esc_html__( 'Home', 'lsx' ), |
|
| 9 | + register_sidebar(array( |
|
| 10 | + 'name' => esc_html__('Home', 'lsx'), |
|
| 11 | 11 | 'id' => 'sidebar-home', |
| 12 | 12 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 13 | 13 | 'after_widget' => '</aside>', |
| 14 | 14 | 'before_title' => '<h3 class="widget-title">', |
| 15 | 15 | 'after_title' => '</h3>', |
| 16 | - ) ); |
|
| 16 | + )); |
|
| 17 | 17 | |
| 18 | - register_sidebar( array( |
|
| 19 | - 'name' => esc_html__( 'Sidebar', 'lsx' ), |
|
| 18 | + register_sidebar(array( |
|
| 19 | + 'name' => esc_html__('Sidebar', 'lsx'), |
|
| 20 | 20 | 'id' => 'sidebar-1', |
| 21 | 21 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 22 | 22 | 'after_widget' => '</aside>', |
| 23 | 23 | 'before_title' => '<h3 class="widget-title">', |
| 24 | 24 | 'after_title' => '</h3>', |
| 25 | - ) ); |
|
| 25 | + )); |
|
| 26 | 26 | |
| 27 | - register_sidebar( array( |
|
| 28 | - 'name' => esc_html__( 'Footer', 'lsx' ), |
|
| 27 | + register_sidebar(array( |
|
| 28 | + 'name' => esc_html__('Footer', 'lsx'), |
|
| 29 | 29 | 'id' => 'sidebar-footer', |
| 30 | 30 | 'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">', |
| 31 | 31 | 'after_widget' => '</aside></div>', |
| 32 | 32 | 'before_title' => '<h3 class="widget-title">', |
| 33 | 33 | 'after_title' => '</h3>', |
| 34 | - ) ); |
|
| 34 | + )); |
|
| 35 | 35 | |
| 36 | - register_sidebar( array( |
|
| 37 | - 'name' => esc_html__( 'Footer Call to Action', 'lsx' ), |
|
| 36 | + register_sidebar(array( |
|
| 37 | + 'name' => esc_html__('Footer Call to Action', 'lsx'), |
|
| 38 | 38 | 'id' => 'sidebar-footer-cta', |
| 39 | 39 | 'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">', |
| 40 | 40 | 'after_widget' => '</aside></div>', |
| 41 | 41 | 'before_title' => '<h3 class="widget-title">', |
| 42 | 42 | 'after_title' => '</h3>', |
| 43 | - ) ); |
|
| 43 | + )); |
|
| 44 | 44 | } |
| 45 | -add_action( 'widgets_init', 'lsx_widget_area_init' ); |
|
| 45 | +add_action('widgets_init', 'lsx_widget_area_init'); |
|
| 46 | 46 | |
| 47 | -function lsx_sidebar_footer_params( $params ) { |
|
| 47 | +function lsx_sidebar_footer_params($params) { |
|
| 48 | 48 | $sidebar_id = $params[0]['id']; |
| 49 | 49 | |
| 50 | - if ( 'sidebar-footer' == $sidebar_id ) { |
|
| 50 | + if ('sidebar-footer' == $sidebar_id) { |
|
| 51 | 51 | $total_widgets = wp_get_sidebars_widgets(); |
| 52 | 52 | $sidebar_widgets = count($total_widgets[$sidebar_id]); |
| 53 | 53 | |
@@ -56,4 +56,4 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | return $params; |
| 58 | 58 | } |
| 59 | -add_filter( 'dynamic_sidebar_params', 'lsx_sidebar_footer_params' ); |
|
| 60 | 59 | \ No newline at end of file |
| 60 | +add_filter('dynamic_sidebar_params', 'lsx_sidebar_footer_params'); |
|
| 61 | 61 | \ No newline at end of file |
@@ -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', array(), LSX_VERSION ); |
|
| 21 | + wp_enqueue_style('events', get_template_directory_uri() . '/css/the-events-calendar.css', array(), LSX_VERSION); |
|
| 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' ).'">'.esc_html__('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') . '">' . esc_html__('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' ).'">'.esc_html__('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',esc_html__('Events','lsx'),$output); |
|
| 49 | + $output = str_replace('Page', '<a href="' . get_post_type_archive_link('tribe_events') . '">' . esc_html__('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', esc_html__('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">'.esc_html__('Events','lsx').'</span>'; |
|
| 56 | + $last_breadcrumb = '<span class="breadcrumb_last">' . esc_html__('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' ).'">'.esc_html__('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') . '">' . esc_html__('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' ).'">'.esc_html__('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') . '">' . esc_html__('Events', 'lsx') . '</a> / ' . apply_filters('the_title', $tax_event->name), $output); |
|
| 64 | 64 | |
| 65 | - }else{ |
|
| 66 | - $output = str_replace('Page',esc_html__('Events','lsx'),$output); |
|
| 65 | + } else { |
|
| 66 | + $output = str_replace('Page', esc_html__('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 |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | function lsx_allowed_related_post_types($allowed_post_types) { |
| 21 | 21 | $allowed_post_types[] = 'jetpack-portfolio'; |
| 22 | - foreach($allowed_post_types as $key => $value){ |
|
| 23 | - if('page' == $value){ |
|
| 22 | + foreach ($allowed_post_types as $key => $value) { |
|
| 23 | + if ('page' == $value) { |
|
| 24 | 24 | unset($allowed_post_types[$key]); |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | * @category site-logo |
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | -function lsx_site_logo_title_tag( $html) { |
|
| 38 | +function lsx_site_logo_title_tag($html) { |
|
| 39 | 39 | |
| 40 | - $html = str_replace('<a', '<a title="'.get_bloginfo('name').'" ', $html); |
|
| 40 | + $html = str_replace('<a', '<a title="' . get_bloginfo('name') . '" ', $html); |
|
| 41 | 41 | return $html; |
| 42 | 42 | } |
| 43 | -add_filter( 'jetpack_the_site_logo', 'lsx_site_logo_title_tag'); |
|
| 43 | +add_filter('jetpack_the_site_logo', 'lsx_site_logo_title_tag'); |
|
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | /* |
@@ -54,19 +54,19 @@ discard block |
||
| 54 | 54 | * @subpackage jetpack |
| 55 | 55 | * @category portfolio |
| 56 | 56 | */ |
| 57 | -function lsx_portfolio_infinite_scroll(){ |
|
| 58 | - global $_wp_theme_features,$wp_query; |
|
| 57 | +function lsx_portfolio_infinite_scroll() { |
|
| 58 | + global $_wp_theme_features, $wp_query; |
|
| 59 | 59 | |
| 60 | - if(is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')){ |
|
| 60 | + if (is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')) { |
|
| 61 | 61 | |
| 62 | - if(class_exists('The_Neverending_Home_Page')){ |
|
| 62 | + if (class_exists('The_Neverending_Home_Page')) { |
|
| 63 | 63 | $_wp_theme_features['infinite-scroll'][0]['container'] = 'portfolio-infinite-scroll-wrapper'; |
| 64 | 64 | $_wp_theme_features['infinite-scroll'][0]['posts_per_page'] = 99; |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | } |
| 69 | -add_action('wp_head','lsx_portfolio_infinite_scroll',1000); |
|
| 69 | +add_action('wp_head', 'lsx_portfolio_infinite_scroll', 1000); |
|
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * Disables the infinite scroll on the portfolio archive |
@@ -75,13 +75,13 @@ discard block |
||
| 75 | 75 | * @subpackage jetpack |
| 76 | 76 | * @category portfolio |
| 77 | 77 | */ |
| 78 | -function lsx_portfolio_infinite_scroll_disable($supported){ |
|
| 79 | - if(is_post_type_archive('jetpack-portfolio')){ |
|
| 78 | +function lsx_portfolio_infinite_scroll_disable($supported) { |
|
| 79 | + if (is_post_type_archive('jetpack-portfolio')) { |
|
| 80 | 80 | $supported = false; |
| 81 | 81 | } |
| 82 | 82 | return $supported; |
| 83 | 83 | } |
| 84 | -add_filter( 'infinite_scroll_archive_supported', 'lsx_portfolio_infinite_scroll_disable', 1, 10 ); |
|
| 84 | +add_filter('infinite_scroll_archive_supported', 'lsx_portfolio_infinite_scroll_disable', 1, 10); |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Set the Portfolio to 9 posts per page |
@@ -90,14 +90,14 @@ discard block |
||
| 90 | 90 | * @subpackage jetpack |
| 91 | 91 | * @category portfolio |
| 92 | 92 | */ |
| 93 | -function lsx_portfolio_archive_pagination( $query ) { |
|
| 94 | - if(!is_admin()){ |
|
| 95 | - if ( $query->is_post_type_archive(array('jetpack-portfolio')) && $query->is_main_query() && class_exists('The_Neverending_Home_Page')) { |
|
| 96 | - $query->set( 'posts_per_page', -1 ); |
|
| 93 | +function lsx_portfolio_archive_pagination($query) { |
|
| 94 | + if ( ! is_admin()) { |
|
| 95 | + if ($query->is_post_type_archive(array('jetpack-portfolio')) && $query->is_main_query() && class_exists('The_Neverending_Home_Page')) { |
|
| 96 | + $query->set('posts_per_page', -1); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | -add_action( 'pre_get_posts', 'lsx_portfolio_archive_pagination' , 100 ); |
|
| 100 | +add_action('pre_get_posts', 'lsx_portfolio_archive_pagination', 100); |
|
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * Remove the related posts from below the content area. |
@@ -107,13 +107,13 @@ discard block |
||
| 107 | 107 | * @category portfolio |
| 108 | 108 | */ |
| 109 | 109 | function lsx_remove_portfolio_related_posts() { |
| 110 | - if ( is_single() && 'jetpack-portfolio' == get_post_type() && class_exists( 'Jetpack_RelatedPosts' ) ) { |
|
| 110 | + if (is_single() && 'jetpack-portfolio' == get_post_type() && class_exists('Jetpack_RelatedPosts')) { |
|
| 111 | 111 | $jprp = Jetpack_RelatedPosts::init(); |
| 112 | - $callback = array( $jprp, 'filter_add_target_to_dom' ); |
|
| 113 | - remove_filter( 'the_content', $callback, 40 ); |
|
| 112 | + $callback = array($jprp, 'filter_add_target_to_dom'); |
|
| 113 | + remove_filter('the_content', $callback, 40); |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | -add_filter( 'wp', 'lsx_remove_portfolio_related_posts', 20 ); |
|
| 116 | +add_filter('wp', 'lsx_remove_portfolio_related_posts', 20); |
|
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * Remove the related posts from below the content area. |
@@ -123,13 +123,13 @@ discard block |
||
| 123 | 123 | * @category portfolio |
| 124 | 124 | */ |
| 125 | 125 | function lsx_remove_single_related_posts() { |
| 126 | - if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) { |
|
| 126 | + if (is_single() && class_exists('Jetpack_RelatedPosts')) { |
|
| 127 | 127 | $jprp = Jetpack_RelatedPosts::init(); |
| 128 | - $callback = array( $jprp, 'filter_add_target_to_dom' ); |
|
| 129 | - remove_filter( 'the_content', $callback, 40 ); |
|
| 128 | + $callback = array($jprp, 'filter_add_target_to_dom'); |
|
| 129 | + remove_filter('the_content', $callback, 40); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | -add_filter( 'wp', 'lsx_remove_single_related_posts', 20 ); |
|
| 132 | +add_filter('wp', 'lsx_remove_single_related_posts', 20); |
|
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | 135 | * A template tag to call the Portfolios Related posts |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | * @subpackage jetpack |
| 139 | 139 | * @category portfolio |
| 140 | 140 | */ |
| 141 | -function lsx_portfolio_related_posts(){ |
|
| 142 | - if(class_exists('Jetpack_RelatedPosts')){ ?> |
|
| 141 | +function lsx_portfolio_related_posts() { |
|
| 142 | + if (class_exists('Jetpack_RelatedPosts')) { ?> |
|
| 143 | 143 | <div class="row"> |
| 144 | 144 | <div class="col-md-12"> |
| 145 | 145 | <?php echo do_shortcode('[jetpack-related-posts]'); ?> |
@@ -156,16 +156,16 @@ discard block |
||
| 156 | 156 | * @category portfolio |
| 157 | 157 | */ |
| 158 | 158 | function lsx_portfolio_remove_share() { |
| 159 | - if ( ( is_single() && 'jetpack-portfolio' == get_post_type() ) || is_page_template( 'page-templates/template-portfolio.php' ) ) { |
|
| 160 | - remove_filter( 'the_content', 'sharing_display',19 ); |
|
| 161 | - remove_filter( 'the_excerpt', 'sharing_display',19 ); |
|
| 159 | + if ((is_single() && 'jetpack-portfolio' == get_post_type()) || is_page_template('page-templates/template-portfolio.php')) { |
|
| 160 | + remove_filter('the_content', 'sharing_display', 19); |
|
| 161 | + remove_filter('the_excerpt', 'sharing_display', 19); |
|
| 162 | 162 | |
| 163 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 164 | - remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); |
|
| 163 | + if (class_exists('Jetpack_Likes')) { |
|
| 164 | + remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | -add_action( 'loop_start', 'lsx_portfolio_remove_share' ); |
|
| 168 | +add_action('loop_start', 'lsx_portfolio_remove_share'); |
|
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * Remove the sharing from single |
@@ -175,16 +175,16 @@ discard block |
||
| 175 | 175 | * @category post |
| 176 | 176 | */ |
| 177 | 177 | function lsx_single_remove_share() { |
| 178 | - if ( is_single() ) { |
|
| 179 | - remove_filter( 'the_content', 'sharing_display',19 ); |
|
| 180 | - remove_filter( 'the_excerpt', 'sharing_display',19 ); |
|
| 178 | + if (is_single()) { |
|
| 179 | + remove_filter('the_content', 'sharing_display', 19); |
|
| 180 | + remove_filter('the_excerpt', 'sharing_display', 19); |
|
| 181 | 181 | |
| 182 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 183 | - remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); |
|
| 182 | + if (class_exists('Jetpack_Likes')) { |
|
| 183 | + remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | -add_action( 'loop_start', 'lsx_single_remove_share' ); |
|
| 187 | +add_action('loop_start', 'lsx_single_remove_share'); |
|
| 188 | 188 | |
| 189 | 189 | /** |
| 190 | 190 | * Redirect the template archive to our one |
@@ -193,18 +193,18 @@ discard block |
||
| 193 | 193 | * @subpackage jetpack |
| 194 | 194 | * @category portfolio |
| 195 | 195 | */ |
| 196 | -function lsx_portfolio_taxonomy_template( $template ) { |
|
| 196 | +function lsx_portfolio_taxonomy_template($template) { |
|
| 197 | 197 | |
| 198 | - if ( is_tax(array('jetpack-portfolio-type','jetpack-portfolio-tag')) ) { |
|
| 199 | - $new_template = locate_template( array( 'archive-jetpack-portfolio.php' ) ); |
|
| 200 | - if ( '' != $new_template ) { |
|
| 201 | - return $new_template ; |
|
| 198 | + if (is_tax(array('jetpack-portfolio-type', 'jetpack-portfolio-tag'))) { |
|
| 199 | + $new_template = locate_template(array('archive-jetpack-portfolio.php')); |
|
| 200 | + if ('' != $new_template) { |
|
| 201 | + return $new_template; |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | return $template; |
| 206 | 206 | } |
| 207 | -add_filter( 'template_include', 'lsx_portfolio_taxonomy_template', 99 ); |
|
| 207 | +add_filter('template_include', 'lsx_portfolio_taxonomy_template', 99); |
|
| 208 | 208 | |
| 209 | 209 | |
| 210 | 210 | /** |
@@ -214,43 +214,43 @@ discard block |
||
| 214 | 214 | * @subpackage jetpack |
| 215 | 215 | * @category portfolio |
| 216 | 216 | */ |
| 217 | -add_action( 'add_meta_boxes', 'lsx_add_portfolio_post_meta_boxes' ); |
|
| 218 | -add_action( 'save_post', 'lsx_save_portfolio_post_meta', 100, 2 ); |
|
| 217 | +add_action('add_meta_boxes', 'lsx_add_portfolio_post_meta_boxes'); |
|
| 218 | +add_action('save_post', 'lsx_save_portfolio_post_meta', 100, 2); |
|
| 219 | 219 | |
| 220 | -function lsx_save_portfolio_post_meta( $post_id, $post ) { |
|
| 221 | - if ( 'jetpack-portfolio' != $post->post_type ) { |
|
| 220 | +function lsx_save_portfolio_post_meta($post_id, $post) { |
|
| 221 | + if ('jetpack-portfolio' != $post->post_type) { |
|
| 222 | 222 | return; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - if ( ! isset( $_POST['lsx-website'] ) && ! isset( $_POST['lsx-client'] ) ) { |
|
| 225 | + if ( ! isset($_POST['lsx-website']) && ! isset($_POST['lsx-client'])) { |
|
| 226 | 226 | return; |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - $post_type = get_post_type_object( $post->post_type ); |
|
| 229 | + $post_type = get_post_type_object($post->post_type); |
|
| 230 | 230 | |
| 231 | - if ( ! current_user_can( $post_type->cap->edit_post, $post_id ) ) { |
|
| 231 | + if ( ! current_user_can($post_type->cap->edit_post, $post_id)) { |
|
| 232 | 232 | return; |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | - check_admin_referer( 'lsx_save_portfolio', '_lsx_client_nonce' ); |
|
| 236 | - check_admin_referer( 'lsx_save_portfolio', '_lsx_website_nonce' ); |
|
| 235 | + check_admin_referer('lsx_save_portfolio', '_lsx_client_nonce'); |
|
| 236 | + check_admin_referer('lsx_save_portfolio', '_lsx_website_nonce'); |
|
| 237 | 237 | |
| 238 | - $meta_keys = array('lsx-website','lsx-client'); |
|
| 238 | + $meta_keys = array('lsx-website', 'lsx-client'); |
|
| 239 | 239 | |
| 240 | - foreach($meta_keys as $meta_key){ |
|
| 241 | - $new_meta_value = sanitize_text_field( wp_unslash( $_POST[$meta_key] ) ); |
|
| 242 | - $new_meta_value = ! empty( $new_meta_value ) ? $new_meta_value : ''; |
|
| 240 | + foreach ($meta_keys as $meta_key) { |
|
| 241 | + $new_meta_value = sanitize_text_field(wp_unslash($_POST[$meta_key])); |
|
| 242 | + $new_meta_value = ! empty($new_meta_value) ? $new_meta_value : ''; |
|
| 243 | 243 | |
| 244 | - $meta_value = get_post_meta( $post_id, $meta_key, true ); |
|
| 244 | + $meta_value = get_post_meta($post_id, $meta_key, true); |
|
| 245 | 245 | |
| 246 | - if ( $new_meta_value && '' == $meta_value ) |
|
| 247 | - add_post_meta( $post_id, $meta_key, $new_meta_value, true ); |
|
| 246 | + if ($new_meta_value && '' == $meta_value) |
|
| 247 | + add_post_meta($post_id, $meta_key, $new_meta_value, true); |
|
| 248 | 248 | |
| 249 | - elseif ( $new_meta_value && $new_meta_value != $meta_value ) |
|
| 250 | - update_post_meta( $post_id, $meta_key, $new_meta_value ); |
|
| 249 | + elseif ($new_meta_value && $new_meta_value != $meta_value) |
|
| 250 | + update_post_meta($post_id, $meta_key, $new_meta_value); |
|
| 251 | 251 | |
| 252 | - elseif ( '' == $new_meta_value && $meta_value ) |
|
| 253 | - delete_post_meta( $post_id, $meta_key, $meta_value ); |
|
| 252 | + elseif ('' == $new_meta_value && $meta_value) |
|
| 253 | + delete_post_meta($post_id, $meta_key, $meta_value); |
|
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | |
| 259 | 259 | add_meta_box( |
| 260 | 260 | 'lsx_client_meta_box', |
| 261 | - esc_html__( 'Client', 'lsx' ), |
|
| 261 | + esc_html__('Client', 'lsx'), |
|
| 262 | 262 | 'lsx_client_meta_box', |
| 263 | 263 | 'jetpack-portfolio', |
| 264 | 264 | 'side', |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | add_meta_box( |
| 269 | 269 | 'lsx_website_meta_box', |
| 270 | - esc_html__( 'Website', 'lsx' ), |
|
| 270 | + esc_html__('Website', 'lsx'), |
|
| 271 | 271 | 'lsx_website_meta_box', |
| 272 | 272 | 'jetpack-portfolio', |
| 273 | 273 | 'side', |
@@ -275,25 +275,25 @@ discard block |
||
| 275 | 275 | ); |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | -function lsx_client_meta_box( $object, $box ) { ?> |
|
| 278 | +function lsx_client_meta_box($object, $box) { ?> |
|
| 279 | 279 | |
| 280 | - <?php wp_nonce_field( 'lsx_save_portfolio', '_lsx_client_nonce' ); ?> |
|
| 280 | + <?php wp_nonce_field('lsx_save_portfolio', '_lsx_client_nonce'); ?> |
|
| 281 | 281 | |
| 282 | 282 | <p> |
| 283 | - <input class="widefat" type="text" name="lsx-client" id="lsx-client" value="<?php echo esc_attr( get_post_meta( $object->ID, 'lsx-client', true ) ); ?>" size="30" /> |
|
| 283 | + <input class="widefat" type="text" name="lsx-client" id="lsx-client" value="<?php echo esc_attr(get_post_meta($object->ID, 'lsx-client', true)); ?>" size="30" /> |
|
| 284 | 284 | <br /><br /> |
| 285 | - <label for="lsx-client"><?php esc_html_e( 'Enter the name of the project client', 'lsx' ); ?></label> |
|
| 285 | + <label for="lsx-client"><?php esc_html_e('Enter the name of the project client', 'lsx'); ?></label> |
|
| 286 | 286 | </p> |
| 287 | 287 | <?php } |
| 288 | 288 | |
| 289 | -function lsx_website_meta_box( $object, $box ) { ?> |
|
| 289 | +function lsx_website_meta_box($object, $box) { ?> |
|
| 290 | 290 | |
| 291 | - <?php wp_nonce_field( 'lsx_save_portfolio', '_lsx_website_nonce' ); ?> |
|
| 291 | + <?php wp_nonce_field('lsx_save_portfolio', '_lsx_website_nonce'); ?> |
|
| 292 | 292 | |
| 293 | 293 | <p> |
| 294 | - <input class="widefat" type="text" name="lsx-website" id="lsx-website" value="<?php echo esc_attr( get_post_meta( $object->ID, 'lsx-website', true ) ); ?>" size="30" /> |
|
| 294 | + <input class="widefat" type="text" name="lsx-website" id="lsx-website" value="<?php echo esc_attr(get_post_meta($object->ID, 'lsx-website', true)); ?>" size="30" /> |
|
| 295 | 295 | <br /><br /> |
| 296 | - <label for="lsx-website"><?php esc_html_e( 'Enter the URL of the project website', 'lsx' ); ?></label> |
|
| 296 | + <label for="lsx-website"><?php esc_html_e('Enter the URL of the project website', 'lsx'); ?></label> |
|
| 297 | 297 | </p> |
| 298 | 298 | <?php } |
| 299 | 299 | |
@@ -306,18 +306,18 @@ discard block |
||
| 306 | 306 | * @category portfolio |
| 307 | 307 | */ |
| 308 | 308 | |
| 309 | -function lsx_portfolio_sorter(){ ?> |
|
| 309 | +function lsx_portfolio_sorter() { ?> |
|
| 310 | 310 | <ul id="filterNav" class="clearfix"> |
| 311 | - <li class="allBtn"><a href="#" data-filter="*" class="selected"><?php esc_html_e( 'All', 'lsx' ); ?></a></li> |
|
| 311 | + <li class="allBtn"><a href="#" data-filter="*" class="selected"><?php esc_html_e('All', 'lsx'); ?></a></li> |
|
| 312 | 312 | <?php |
| 313 | 313 | $types = get_terms('jetpack-portfolio-type'); |
| 314 | 314 | |
| 315 | - if(is_array($types)){ |
|
| 315 | + if (is_array($types)) { |
|
| 316 | 316 | foreach ($types as $type) { |
| 317 | - $content = '<li><a href="#" data-filter=".'.$type->slug.'">'; |
|
| 317 | + $content = '<li><a href="#" data-filter=".' . $type->slug . '">'; |
|
| 318 | 318 | $content .= $type->name; |
| 319 | 319 | $content .= '</a></li>'; |
| 320 | - echo wp_kses_post( $content ); |
|
| 320 | + echo wp_kses_post($content); |
|
| 321 | 321 | echo "\n"; |
| 322 | 322 | } |
| 323 | 323 | }?> |
@@ -332,18 +332,18 @@ discard block |
||
| 332 | 332 | * @category portfolio |
| 333 | 333 | */ |
| 334 | 334 | |
| 335 | -function lsx_portfolio_naviagtion_labels($labels){ |
|
| 335 | +function lsx_portfolio_naviagtion_labels($labels) { |
|
| 336 | 336 | |
| 337 | - if(is_post_type_archive('jetpack-portfolio')){ |
|
| 337 | + if (is_post_type_archive('jetpack-portfolio')) { |
|
| 338 | 338 | $labels = array( |
| 339 | - 'next' => '<span class="meta-nav">←</span> '.esc_html__( 'Older', 'lsx' ), |
|
| 340 | - 'previous' => esc_html__( 'Newer', 'lsx' ).' <span class="meta-nav">→</span>', |
|
| 341 | - 'title' => esc_html__( 'Portfolio navigation', 'lsx' ) |
|
| 339 | + 'next' => '<span class="meta-nav">←</span> ' . esc_html__('Older', 'lsx'), |
|
| 340 | + 'previous' => esc_html__('Newer', 'lsx') . ' <span class="meta-nav">→</span>', |
|
| 341 | + 'title' => esc_html__('Portfolio navigation', 'lsx') |
|
| 342 | 342 | ); |
| 343 | 343 | } |
| 344 | 344 | return $labels; |
| 345 | 345 | } |
| 346 | -add_filter('lsx_post_navigation_labels','lsx_portfolio_naviagtion_labels',1,10); |
|
| 346 | +add_filter('lsx_post_navigation_labels', 'lsx_portfolio_naviagtion_labels', 1, 10); |
|
| 347 | 347 | |
| 348 | 348 | |
| 349 | 349 | /* |
@@ -357,11 +357,11 @@ discard block |
||
| 357 | 357 | * @subpackage jetpack |
| 358 | 358 | * @category related-posts |
| 359 | 359 | */ |
| 360 | -function lsx_remove_related_post_context(){ |
|
| 361 | - add_filter( 'jetpack_relatedposts_filter_post_context', '__return_empty_string' ); |
|
| 362 | - add_filter( 'rest_api_allowed_post_types', 'lsx_allowed_related_post_types' ); |
|
| 360 | +function lsx_remove_related_post_context() { |
|
| 361 | + add_filter('jetpack_relatedposts_filter_post_context', '__return_empty_string'); |
|
| 362 | + add_filter('rest_api_allowed_post_types', 'lsx_allowed_related_post_types'); |
|
| 363 | 363 | } |
| 364 | -add_action('init','lsx_remove_related_post_context',20); |
|
| 364 | +add_action('init', 'lsx_remove_related_post_context', 20); |
|
| 365 | 365 | |
| 366 | 366 | |
| 367 | 367 | /* |
@@ -378,13 +378,13 @@ discard block |
||
| 378 | 378 | $infinite_scroll_args = array( |
| 379 | 379 | 'container' => 'main', |
| 380 | 380 | 'type' => 'click', |
| 381 | - 'posts_per_page' => get_option('posts_per_page',10), |
|
| 381 | + 'posts_per_page' => get_option('posts_per_page', 10), |
|
| 382 | 382 | 'render' => 'lsx_infinite_scroll_render' |
| 383 | 383 | ); |
| 384 | 384 | |
| 385 | - add_theme_support( 'infinite-scroll', $infinite_scroll_args ); |
|
| 385 | + add_theme_support('infinite-scroll', $infinite_scroll_args); |
|
| 386 | 386 | } |
| 387 | -add_action( 'after_setup_theme', 'lsx_jetpack_infinite_scroll_after_setup' ); |
|
| 387 | +add_action('after_setup_theme', 'lsx_jetpack_infinite_scroll_after_setup'); |
|
| 388 | 388 | |
| 389 | 389 | /** |
| 390 | 390 | * Set the code to be rendered on for calling posts, |
@@ -397,13 +397,13 @@ discard block |
||
| 397 | 397 | function lsx_infinite_scroll_render() { |
| 398 | 398 | global $wp_query; |
| 399 | 399 | |
| 400 | - while(have_posts()){ |
|
| 400 | + while (have_posts()) { |
|
| 401 | 401 | the_post(); |
| 402 | 402 | |
| 403 | - if('jetpack-portfolio' == get_post_type()){ |
|
| 404 | - get_template_part( 'content', 'portfolio' ); |
|
| 405 | - }else{ |
|
| 406 | - get_template_part( 'content', get_post_type() ); |
|
| 403 | + if ('jetpack-portfolio' == get_post_type()) { |
|
| 404 | + get_template_part('content', 'portfolio'); |
|
| 405 | + } else { |
|
| 406 | + get_template_part('content', get_post_type()); |
|
| 407 | 407 | } |
| 408 | 408 | } |
| 409 | 409 | } |
@@ -415,8 +415,8 @@ discard block |
||
| 415 | 415 | * @subpackage jetpack |
| 416 | 416 | * @category related posts |
| 417 | 417 | */ |
| 418 | -function lsx_related_posts_headline( $headline ) { |
|
| 419 | - $headline = sprintf( '<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', esc_html__( 'Related Posts', 'lsx' ) ); |
|
| 418 | +function lsx_related_posts_headline($headline) { |
|
| 419 | + $headline = sprintf('<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', esc_html__('Related Posts', 'lsx')); |
|
| 420 | 420 | return $headline; |
| 421 | 421 | } |
| 422 | -add_filter( 'jetpack_relatedposts_filter_headline', 'lsx_related_posts_headline' ); |
|
| 422 | +add_filter('jetpack_relatedposts_filter_headline', 'lsx_related_posts_headline'); |
|
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
| 2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Enable extra attributes (srcset, sizes) in img tag |
| 6 | 6 | */ |
| 7 | -function lsx_kses_allowed_html( $allowedtags, $context ) { |
|
| 7 | +function lsx_kses_allowed_html($allowedtags, $context) { |
|
| 8 | 8 | $allowedtags['img']['srcset'] = true; |
| 9 | 9 | $allowedtags['img']['sizes'] = true; |
| 10 | 10 | |
| 11 | 11 | return $allowedtags; |
| 12 | 12 | } |
| 13 | -add_filter( 'wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2 ); |
|
| 13 | +add_filter('wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2); |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Add and remove body_class() classes |
@@ -19,21 +19,21 @@ discard block |
||
| 19 | 19 | /* |
| 20 | 20 | * Add the header layout class |
| 21 | 21 | */ |
| 22 | - $header_layout = get_theme_mod('lsx_header_layout','inline'); |
|
| 23 | - $classes[] = 'header-'.$header_layout; |
|
| 22 | + $header_layout = get_theme_mod('lsx_header_layout', 'inline'); |
|
| 23 | + $classes[] = 'header-' . $header_layout; |
|
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | // Add post/page slug |
| 27 | - if (is_single() || is_page() && !is_front_page()) { |
|
| 27 | + if (is_single() || is_page() && ! is_front_page()) { |
|
| 28 | 28 | $classes[] = basename(get_permalink()); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - if(!class_exists('Lsx_Banners')){ |
|
| 32 | - $post_types = array('page','post'); |
|
| 33 | - $post_types = apply_filters('lsx_allowed_post_type_banners',$post_types); |
|
| 31 | + if ( ! class_exists('Lsx_Banners')) { |
|
| 32 | + $post_types = array('page', 'post'); |
|
| 33 | + $post_types = apply_filters('lsx_allowed_post_type_banners', $post_types); |
|
| 34 | 34 | |
| 35 | - if((is_singular($post_types) && has_post_thumbnail()) |
|
| 36 | - || (is_singular('jetpack-portfolio'))){ |
|
| 35 | + if ((is_singular($post_types) && has_post_thumbnail()) |
|
| 36 | + || (is_singular('jetpack-portfolio'))) { |
|
| 37 | 37 | $classes[] = 'page-has-banner'; |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $classes[] = 'has-top-menu'; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if ( get_theme_mod( 'lsx_preloader_content_status', '1' ) === '1' ) { |
|
| 45 | + if (get_theme_mod('lsx_preloader_content_status', '1') === '1') { |
|
| 46 | 46 | $classes[] = 'preloader-content-enable'; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -66,30 +66,30 @@ discard block |
||
| 66 | 66 | * @param string $sep Optional separator. |
| 67 | 67 | * @return string The filtered title. |
| 68 | 68 | */ |
| 69 | -function lsx_wp_title( $title, $sep ) { |
|
| 69 | +function lsx_wp_title($title, $sep) { |
|
| 70 | 70 | global $page, $paged; |
| 71 | 71 | |
| 72 | - if ( is_feed() ) { |
|
| 72 | + if (is_feed()) { |
|
| 73 | 73 | return $title; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | // Add the blog name |
| 77 | - $title .= get_bloginfo( 'name' ); |
|
| 77 | + $title .= get_bloginfo('name'); |
|
| 78 | 78 | |
| 79 | 79 | // Add the blog description for the home/front page. |
| 80 | - $site_description = get_bloginfo( 'description', 'display' ); |
|
| 81 | - if ( $site_description && ( is_home() || is_front_page() ) ) { |
|
| 80 | + $site_description = get_bloginfo('description', 'display'); |
|
| 81 | + if ($site_description && (is_home() || is_front_page())) { |
|
| 82 | 82 | $title .= " $sep $site_description"; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | // Add a page number if necessary: |
| 86 | - if ( $paged >= 2 || $page >= 2 ) { |
|
| 87 | - $title .= " $sep " . sprintf( __( 'Page %s', 'lsx' ), max( $paged, $page ) ); |
|
| 86 | + if ($paged >= 2 || $page >= 2) { |
|
| 87 | + $title .= " $sep " . sprintf(__('Page %s', 'lsx'), max($paged, $page)); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return $title; |
| 91 | 91 | } |
| 92 | -add_filter( 'wp_title', 'lsx_wp_title', 10, 2 ); |
|
| 92 | +add_filter('wp_title', 'lsx_wp_title', 10, 2); |
|
| 93 | 93 | |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | function lsx_remove_self_closing_tags($input) { |
| 111 | 111 | return str_replace(' />', '>', $input); |
| 112 | 112 | } |
| 113 | -add_filter('get_avatar', 'lsx_remove_self_closing_tags'); // <img /> |
|
| 114 | -add_filter('comment_id_fields', 'lsx_remove_self_closing_tags'); // <input /> |
|
| 113 | +add_filter('get_avatar', 'lsx_remove_self_closing_tags'); // <img /> |
|
| 114 | +add_filter('comment_id_fields', 'lsx_remove_self_closing_tags'); // <input /> |
|
| 115 | 115 | add_filter('post_thumbnail_html', 'lsx_remove_self_closing_tags'); // <img /> |
| 116 | 116 | |
| 117 | 117 | |
| 118 | -if (!function_exists('lsx_get_attachment_id')) { |
|
| 118 | +if ( ! function_exists('lsx_get_attachment_id')) { |
|
| 119 | 119 | /** |
| 120 | 120 | * Get the Attachment ID for a given image URL. |
| 121 | 121 | * |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | function lsx_get_attachment_id($url) { |
| 127 | 127 | $dir = wp_upload_dir(); |
| 128 | 128 | // baseurl never has a trailing slash |
| 129 | - if (false === strpos($url, $dir['baseurl'].'/')) { |
|
| 129 | + if (false === strpos($url, $dir['baseurl'] . '/')) { |
|
| 130 | 130 | // URL points to a place outside of upload directory |
| 131 | 131 | return false; |
| 132 | 132 | } |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | $query['meta_query'][0]['key'] = '_wp_attached_file'; |
| 145 | 145 | // query attachments |
| 146 | 146 | $ids = get_posts($query); |
| 147 | - if (!empty($ids)) { |
|
| 147 | + if ( ! empty($ids)) { |
|
| 148 | 148 | foreach ($ids as $id) { |
| 149 | 149 | // first entry of returned array is the URL |
| 150 | - $temp_url = wp_get_attachment_image_src( $id, 'full' ); |
|
| 151 | - if ( array_shift( $temp_url ) === $url ) { |
|
| 150 | + $temp_url = wp_get_attachment_image_src($id, 'full'); |
|
| 151 | + if (array_shift($temp_url) === $url) { |
|
| 152 | 152 | return $id; |
| 153 | 153 | } |
| 154 | 154 | } |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | foreach ($ids as $id) { |
| 163 | 163 | $meta = wp_get_attachment_metadata($id); |
| 164 | - foreach ( $meta['sizes'] as $size => $values ) { |
|
| 165 | - if ( $values['file'] === $file && array_shift( wp_get_attachment_image_src( $id, $size ) ) === $url ) { |
|
| 164 | + foreach ($meta['sizes'] as $size => $values) { |
|
| 165 | + if ($values['file'] === $file && array_shift(wp_get_attachment_image_src($id, $size)) === $url) { |
|
| 166 | 166 | return $id; |
| 167 | 167 | } |
| 168 | 168 | } |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | */ |
| 188 | 188 | function lsx_is_element_empty($element) { |
| 189 | 189 | $element = trim($element); |
| 190 | - return empty($element)?false:true; |
|
| 190 | + return empty($element) ? false : true; |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | |
@@ -198,39 +198,39 @@ discard block |
||
| 198 | 198 | * @subpackage extras |
| 199 | 199 | * @category thumbnails |
| 200 | 200 | */ |
| 201 | -function lsx_get_thumbnail($size,$image_src = false){ |
|
| 201 | +function lsx_get_thumbnail($size, $image_src = false) { |
|
| 202 | 202 | |
| 203 | - if(false === $image_src){ |
|
| 203 | + if (false === $image_src) { |
|
| 204 | 204 | $post_id = get_the_ID(); |
| 205 | - $post_thumbnail_id = get_post_thumbnail_id( $post_id ); |
|
| 206 | - }elseif(false != $image_src ){ |
|
| 207 | - if(is_numeric($image_src)){ |
|
| 205 | + $post_thumbnail_id = get_post_thumbnail_id($post_id); |
|
| 206 | + }elseif (false != $image_src) { |
|
| 207 | + if (is_numeric($image_src)) { |
|
| 208 | 208 | $post_thumbnail_id = $image_src; |
| 209 | - }else{ |
|
| 209 | + } else { |
|
| 210 | 210 | $post_thumbnail_id = lsx_get_attachment_id_from_src($image_src); |
| 211 | 211 | } |
| 212 | 212 | } |
| 213 | - $size = apply_filters('lsx_thumbnail_size',$size); |
|
| 213 | + $size = apply_filters('lsx_thumbnail_size', $size); |
|
| 214 | 214 | $img = false; |
| 215 | - if ( 'lsx-thumbnail-wide' === $size || 'thumbnail' === $size ) { |
|
| 215 | + if ('lsx-thumbnail-wide' === $size || 'thumbnail' === $size) { |
|
| 216 | 216 | $srcset = false; |
| 217 | - $img = wp_get_attachment_image_src($post_thumbnail_id,$size); |
|
| 217 | + $img = wp_get_attachment_image_src($post_thumbnail_id, $size); |
|
| 218 | 218 | $img = $img[0]; |
| 219 | 219 | } else { |
| 220 | 220 | $srcset = true; |
| 221 | - $img = wp_get_attachment_image_srcset($post_thumbnail_id,$size); |
|
| 222 | - if ( false == $img ) { |
|
| 221 | + $img = wp_get_attachment_image_srcset($post_thumbnail_id, $size); |
|
| 222 | + if (false == $img) { |
|
| 223 | 223 | $srcset = false; |
| 224 | - $img = wp_get_attachment_image_src($post_thumbnail_id,$size); |
|
| 224 | + $img = wp_get_attachment_image_src($post_thumbnail_id, $size); |
|
| 225 | 225 | $img = $img[0]; |
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | - if ( $srcset ) { |
|
| 229 | - $img = '<img alt="'.get_the_title(get_the_ID()).'" class="attachment-responsive wp-post-image lsx-responsive" srcset="'.$img.'" />'; |
|
| 228 | + if ($srcset) { |
|
| 229 | + $img = '<img alt="' . get_the_title(get_the_ID()) . '" class="attachment-responsive wp-post-image lsx-responsive" srcset="' . $img . '" />'; |
|
| 230 | 230 | } else { |
| 231 | - $img = '<img alt="'.get_the_title(get_the_ID()).'" class="attachment-responsive wp-post-image lsx-responsive" src="'.$img.'" />'; |
|
| 231 | + $img = '<img alt="' . get_the_title(get_the_ID()) . '" class="attachment-responsive wp-post-image lsx-responsive" src="' . $img . '" />'; |
|
| 232 | 232 | } |
| 233 | - $img = apply_filters('lsx_lazyload_filter_images',$img); |
|
| 233 | + $img = apply_filters('lsx_lazyload_filter_images', $img); |
|
| 234 | 234 | return $img; |
| 235 | 235 | } |
| 236 | 236 | |
@@ -241,8 +241,8 @@ discard block |
||
| 241 | 241 | * @subpackage extras |
| 242 | 242 | * @category thumbnails |
| 243 | 243 | */ |
| 244 | -function lsx_thumbnail( $size = 'thumbnail', $image_src = false ) { |
|
| 245 | - echo wp_kses_post( lsx_get_thumbnail( $size, $image_src ) ); |
|
| 244 | +function lsx_thumbnail($size = 'thumbnail', $image_src = false) { |
|
| 245 | + echo wp_kses_post(lsx_get_thumbnail($size, $image_src)); |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | |
@@ -252,13 +252,13 @@ discard block |
||
| 252 | 252 | * @subpackage extras |
| 253 | 253 | * @category thumbnails |
| 254 | 254 | */ |
| 255 | -function lsx_get_attachment_id_from_src( $image_src ) { |
|
| 256 | - $post_id = wp_cache_get( $image_src, 'lsx_get_attachment_id_from_src' ); |
|
| 255 | +function lsx_get_attachment_id_from_src($image_src) { |
|
| 256 | + $post_id = wp_cache_get($image_src, 'lsx_get_attachment_id_from_src'); |
|
| 257 | 257 | |
| 258 | - if ( false === $post_id ) { |
|
| 258 | + if (false === $post_id) { |
|
| 259 | 259 | global $wpdb; |
| 260 | - $post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src ) ); |
|
| 261 | - wp_cache_set( $image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600 ); |
|
| 260 | + $post_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src)); |
|
| 261 | + wp_cache_set($image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600); |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | return $post_id; |
@@ -272,28 +272,28 @@ discard block |
||
| 272 | 272 | * @subpackage extras |
| 273 | 273 | * @category banner |
| 274 | 274 | */ |
| 275 | -if (!function_exists('lsx_page_banner')) { |
|
| 275 | +if ( ! function_exists('lsx_page_banner')) { |
|
| 276 | 276 | function lsx_page_banner() { |
| 277 | 277 | |
| 278 | - $post_types = array('page','post'); |
|
| 279 | - $post_types = apply_filters('lsx_allowed_post_type_banners',$post_types); |
|
| 278 | + $post_types = array('page', 'post'); |
|
| 279 | + $post_types = apply_filters('lsx_allowed_post_type_banners', $post_types); |
|
| 280 | 280 | |
| 281 | - if ( (is_singular($post_types) && has_post_thumbnail()) |
|
| 282 | - || (is_singular('jetpack-portfolio')) ) { ?> |
|
| 281 | + if ((is_singular($post_types) && has_post_thumbnail()) |
|
| 282 | + || (is_singular('jetpack-portfolio'))) { ?> |
|
| 283 | 283 | |
| 284 | 284 | <?php |
| 285 | 285 | $bg_image = ''; |
| 286 | - if(has_post_thumbnail()){ |
|
| 287 | - $bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full'); |
|
| 286 | + if (has_post_thumbnail()) { |
|
| 287 | + $bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full'); |
|
| 288 | 288 | $bg_image = $bg_image[0]; |
| 289 | 289 | } |
| 290 | 290 | ?> |
| 291 | 291 | |
| 292 | - <?php if ( ! empty( $bg_image ) ) : ?> |
|
| 292 | + <?php if ( ! empty($bg_image)) : ?> |
|
| 293 | 293 | |
| 294 | 294 | <div class="page-banner-wrap"> |
| 295 | 295 | <div class="page-banner"> |
| 296 | - <div class="page-banner-image" style="background-image:url(<?php echo esc_attr( $bg_image ); ?>);"></div> |
|
| 296 | + <div class="page-banner-image" style="background-image:url(<?php echo esc_attr($bg_image); ?>);"></div> |
|
| 297 | 297 | |
| 298 | 298 | <div class="container"> |
| 299 | 299 | <header class="page-header"> |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | <?php } |
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | -add_action( 'lsx_header_after', 'lsx_page_banner' ); |
|
| 312 | +add_action('lsx_header_after', 'lsx_page_banner'); |
|
| 313 | 313 | |
| 314 | 314 | |
| 315 | 315 | /** |
@@ -319,43 +319,43 @@ discard block |
||
| 319 | 319 | * @subpackage extras |
| 320 | 320 | * @category mobile |
| 321 | 321 | */ |
| 322 | -function lsx_allow_sms_protocol( $protocols ) { |
|
| 322 | +function lsx_allow_sms_protocol($protocols) { |
|
| 323 | 323 | $protocols[] = 'sms'; |
| 324 | 324 | return $protocols; |
| 325 | 325 | } |
| 326 | -add_filter( 'kses_allowed_protocols', 'lsx_allow_sms_protocol' ); |
|
| 326 | +add_filter('kses_allowed_protocols', 'lsx_allow_sms_protocol'); |
|
| 327 | 327 | |
| 328 | 328 | |
| 329 | 329 | /** |
| 330 | 330 | * Adding browser and user-agent classes to body |
| 331 | 331 | */ |
| 332 | 332 | function mv_browser_body_class($classes) { |
| 333 | - $http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); |
|
| 334 | - $http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : ''; |
|
| 333 | + $http_user_agent = sanitize_text_field(wp_unslash($_SERVER['HTTP_USER_AGENT'])); |
|
| 334 | + $http_user_agent = ! empty($http_user_agent) ? $http_user_agent : ''; |
|
| 335 | 335 | |
| 336 | 336 | global $is_lynx, $is_gecko, $is_ie, $is_opera, $is_ns4, $is_safari, $is_chrome, $is_iphone; |
| 337 | - if($is_lynx) $classes[] = 'lynx'; |
|
| 338 | - elseif($is_gecko) $classes[] = 'gecko'; |
|
| 339 | - elseif($is_opera) $classes[] = 'opera'; |
|
| 340 | - elseif($is_ns4) $classes[] = 'ns4'; |
|
| 341 | - elseif($is_safari) $classes[] = 'safari'; |
|
| 342 | - elseif($is_chrome) $classes[] = 'chrome'; |
|
| 343 | - elseif($is_ie) { |
|
| 337 | + if ($is_lynx) $classes[] = 'lynx'; |
|
| 338 | + elseif ($is_gecko) $classes[] = 'gecko'; |
|
| 339 | + elseif ($is_opera) $classes[] = 'opera'; |
|
| 340 | + elseif ($is_ns4) $classes[] = 'ns4'; |
|
| 341 | + elseif ($is_safari) $classes[] = 'safari'; |
|
| 342 | + elseif ($is_chrome) $classes[] = 'chrome'; |
|
| 343 | + elseif ($is_ie) { |
|
| 344 | 344 | $classes[] = 'ie'; |
| 345 | - if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) |
|
| 346 | - $classes[] = 'ie'.$browser_version[1]; |
|
| 345 | + if (preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) |
|
| 346 | + $classes[] = 'ie' . $browser_version[1]; |
|
| 347 | 347 | } else $classes[] = 'unknown'; |
| 348 | - if($is_iphone) $classes[] = 'iphone'; |
|
| 349 | - if ( stristr( $http_user_agent, "mac") ) { |
|
| 348 | + if ($is_iphone) $classes[] = 'iphone'; |
|
| 349 | + if (stristr($http_user_agent, "mac")) { |
|
| 350 | 350 | $classes[] = 'osx'; |
| 351 | - } elseif ( stristr( $http_user_agent, "linux") ) { |
|
| 351 | + } elseif (stristr($http_user_agent, "linux")) { |
|
| 352 | 352 | $classes[] = 'linux'; |
| 353 | - } elseif ( stristr( $http_user_agent, "windows") ) { |
|
| 353 | + } elseif (stristr($http_user_agent, "windows")) { |
|
| 354 | 354 | $classes[] = 'windows'; |
| 355 | 355 | } |
| 356 | 356 | return $classes; |
| 357 | 357 | } |
| 358 | -add_filter('body_class','mv_browser_body_class'); |
|
| 358 | +add_filter('body_class', 'mv_browser_body_class'); |
|
| 359 | 359 | |
| 360 | 360 | |
| 361 | 361 | /** |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | * @param $form Object |
| 369 | 369 | * @return String |
| 370 | 370 | */ |
| 371 | -function lsx_form_submit_button($button, $form){ |
|
| 371 | +function lsx_form_submit_button($button, $form) { |
|
| 372 | 372 | return "<button class='btn btn-primary' id='gform_submit_button_{$form["id"]}'><span>Submit</span></button>"; |
| 373 | 373 | } |
| 374 | 374 | add_filter("gform_submit_button", "lsx_form_submit_button", 10, 2); |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | //return ' ... <a class="moretag" href="'. get_permalink($post->ID) . '">'.esc_html__('Continue reading','lsx').'</a>'; |
| 383 | 383 | return '...'; |
| 384 | 384 | } |
| 385 | -add_filter( 'excerpt_more', 'lsx_excerpt_more' ); |
|
| 385 | +add_filter('excerpt_more', 'lsx_excerpt_more'); |
|
| 386 | 386 | |
| 387 | 387 | |
| 388 | 388 | /** |
@@ -391,44 +391,44 @@ discard block |
||
| 391 | 391 | function lsx_the_excerpt_filter($excerpt) { |
| 392 | 392 | $show_full_content = has_post_format(apply_filters('lsx_the_excerpt_filter_post_types', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio'))); |
| 393 | 393 | |
| 394 | - if (!$show_full_content) { |
|
| 395 | - if ('' !== $excerpt && !stristr($excerpt, 'moretag')) { |
|
| 396 | - $pagination = wp_link_pages( array( |
|
| 394 | + if ( ! $show_full_content) { |
|
| 395 | + if ('' !== $excerpt && ! stristr($excerpt, 'moretag')) { |
|
| 396 | + $pagination = wp_link_pages(array( |
|
| 397 | 397 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 398 | 398 | 'after' => '</div></div>', |
| 399 | 399 | 'link_before' => '<span>', |
| 400 | 400 | 'link_after' => '</span>', |
| 401 | 401 | 'echo' => 0 |
| 402 | - ) ); |
|
| 402 | + )); |
|
| 403 | 403 | |
| 404 | - if ( ! empty( $pagination ) ) { |
|
| 404 | + if ( ! empty($pagination)) { |
|
| 405 | 405 | $excerpt .= $pagination; |
| 406 | 406 | } |
| 407 | 407 | else { |
| 408 | - $excerpt .= '<p><a class="moretag" href="'.get_permalink().'">'.esc_html__('Continue reading','lsx').'</a></p>'; |
|
| 408 | + $excerpt .= '<p><a class="moretag" href="' . get_permalink() . '">' . esc_html__('Continue reading', 'lsx') . '</a></p>'; |
|
| 409 | 409 | } |
| 410 | 410 | } |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | return $excerpt; |
| 414 | 414 | } |
| 415 | -add_filter( 'the_excerpt', 'lsx_the_excerpt_filter' , 1 , 20 ); |
|
| 415 | +add_filter('the_excerpt', 'lsx_the_excerpt_filter', 1, 20); |
|
| 416 | 416 | |
| 417 | 417 | |
| 418 | 418 | /** |
| 419 | 419 | * Allow HTML tags in excerpt |
| 420 | 420 | */ |
| 421 | -if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) { |
|
| 421 | +if ( ! function_exists('wpse_custom_wp_trim_excerpt')) { |
|
| 422 | 422 | function wpse_custom_wp_trim_excerpt($wpse_excerpt) { |
| 423 | 423 | global $post; |
| 424 | 424 | $raw_excerpt = $wpse_excerpt; |
| 425 | 425 | |
| 426 | - if ( '' == $wpse_excerpt ) { |
|
| 426 | + if ('' == $wpse_excerpt) { |
|
| 427 | 427 | $wpse_excerpt = get_the_content(''); |
| 428 | 428 | $show_full_content = has_post_format(array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio')); |
| 429 | 429 | |
| 430 | - if (!$show_full_content) { |
|
| 431 | - $wpse_excerpt = strip_shortcodes( $wpse_excerpt ); |
|
| 430 | + if ( ! $show_full_content) { |
|
| 431 | + $wpse_excerpt = strip_shortcodes($wpse_excerpt); |
|
| 432 | 432 | $wpse_excerpt = apply_filters('the_content', $wpse_excerpt); |
| 433 | 433 | $wpse_excerpt = str_replace(']]>', ']]>', $wpse_excerpt); |
| 434 | 434 | $wpse_excerpt = strip_tags($wpse_excerpt, '<blockquote>,<p>,<br>,<b>,<strong>,<i>,<u>,<ul>,<li>,<span>,<div>'); |
@@ -456,12 +456,12 @@ discard block |
||
| 456 | 456 | $wpse_excerpt = trim(force_balance_tags($excerpt_output)); |
| 457 | 457 | |
| 458 | 458 | if ($has_more) { |
| 459 | - $excerpt_end = '<a class="moretag" href="'.get_permalink().'">'.esc_html__('More','lsx').'</a>'; |
|
| 459 | + $excerpt_end = '<a class="moretag" href="' . get_permalink() . '">' . esc_html__('More', 'lsx') . '</a>'; |
|
| 460 | 460 | $excerpt_end = apply_filters('excerpt_more', ' ' . $excerpt_end); |
| 461 | 461 | |
| 462 | 462 | $pos = strrpos($wpse_excerpt, '</'); |
| 463 | 463 | |
| 464 | - if ( false !== $pos ) { |
|
| 464 | + if (false !== $pos) { |
|
| 465 | 465 | // Inside last HTML tag |
| 466 | 466 | $wpse_excerpt = substr_replace($wpse_excerpt, $excerpt_end, $pos, 0); /* Add read more next to last word */ |
| 467 | 467 | } else { |
@@ -484,4 +484,4 @@ discard block |
||
| 484 | 484 | } |
| 485 | 485 | remove_filter('get_the_excerpt', 'wp_trim_excerpt'); |
| 486 | 486 | add_filter('get_the_excerpt', 'wpse_custom_wp_trim_excerpt'); |
| 487 | -remove_filter( 'the_excerpt', 'wpautop' ); |
|
| 487 | +remove_filter('the_excerpt', 'wpautop'); |
|
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
| 2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
| 3 | 3 | |
| 4 | 4 | |
| 5 | -if ( ! function_exists( 'lsx_activation_admin_notice' ) ) : |
|
| 5 | +if ( ! function_exists('lsx_activation_admin_notice')) : |
|
| 6 | 6 | /** |
| 7 | 7 | * Adds an admin notice upon successful activation. |
| 8 | 8 | * |
@@ -12,15 +12,15 @@ discard block |
||
| 12 | 12 | function lsx_activation_admin_notice() { |
| 13 | 13 | global $pagenow; |
| 14 | 14 | |
| 15 | - if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { |
|
| 16 | - add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 ); |
|
| 15 | + if (is_admin() && 'themes.php' == $pagenow && isset($_GET['activated'])) { |
|
| 16 | + add_action('admin_notices', 'lsx_welcome_admin_notice', 99); |
|
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | endif; // lsx_activation_admin_notice |
| 20 | -add_action( 'load-themes.php', 'lsx_activation_admin_notice' ); |
|
| 20 | +add_action('load-themes.php', 'lsx_activation_admin_notice'); |
|
| 21 | 21 | |
| 22 | 22 | |
| 23 | -if ( ! function_exists( 'lsx_welcome_admin_notice' ) ) : |
|
| 23 | +if ( ! function_exists('lsx_welcome_admin_notice')) : |
|
| 24 | 24 | /** |
| 25 | 25 | * Display an admin notice linking to the welcome screen. |
| 26 | 26 | * |
@@ -30,15 +30,15 @@ discard block |
||
| 30 | 30 | function lsx_welcome_admin_notice() { |
| 31 | 31 | ?> |
| 32 | 32 | <div class="updated notice is-dismissible"> |
| 33 | - <p><?php echo sprintf( esc_html__( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ), '<a href="' . esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ) . '">', '</a>' ); ?></p> |
|
| 34 | - <p><a href="<?php echo esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ); ?>" class="button" style="text-decoration: none;"><?php esc_attr_e( 'Get started with LSX', 'lsx' ); ?></a></p> |
|
| 33 | + <p><?php echo sprintf(esc_html__('Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx'), '<a href="' . esc_url(admin_url('themes.php?page=lsx-welcome')) . '">', '</a>'); ?></p> |
|
| 34 | + <p><a href="<?php echo esc_url(admin_url('themes.php?page=lsx-welcome')); ?>" class="button" style="text-decoration: none;"><?php esc_attr_e('Get started with LSX', 'lsx'); ?></a></p> |
|
| 35 | 35 | </div> |
| 36 | 36 | <?php |
| 37 | 37 | } |
| 38 | 38 | endif; // lsx_welcome_admin_notice |
| 39 | 39 | |
| 40 | 40 | |
| 41 | -if ( ! function_exists( 'lsx_welcome_style' ) ) : |
|
| 41 | +if ( ! function_exists('lsx_welcome_style')) : |
|
| 42 | 42 | /** |
| 43 | 43 | * Load welcome screen css. |
| 44 | 44 | * |
@@ -46,16 +46,16 @@ discard block |
||
| 46 | 46 | * @since 1.8.0 |
| 47 | 47 | * @package lsx |
| 48 | 48 | */ |
| 49 | - function lsx_welcome_style( $hook_suffix ) { |
|
| 50 | - if ( 'appearance_page_lsx-welcome' == $hook_suffix ) { |
|
| 51 | - wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/css/admin/welcome-screen/welcome.css', array(), LSX_VERSION ); |
|
| 49 | + function lsx_welcome_style($hook_suffix) { |
|
| 50 | + if ('appearance_page_lsx-welcome' == $hook_suffix) { |
|
| 51 | + wp_enqueue_style('lsx-welcome-screen', get_template_directory_uri() . '/css/admin/welcome-screen/welcome.css', array(), LSX_VERSION); |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | endif; // lsx_welcome_style |
| 55 | -add_action( 'admin_enqueue_scripts', 'lsx_welcome_style' ); |
|
| 55 | +add_action('admin_enqueue_scripts', 'lsx_welcome_style'); |
|
| 56 | 56 | |
| 57 | 57 | |
| 58 | -if ( ! function_exists( 'lsx_welcome_register_menu' ) ) : |
|
| 58 | +if ( ! function_exists('lsx_welcome_register_menu')) : |
|
| 59 | 59 | /** |
| 60 | 60 | * Creates the dashboard page. |
| 61 | 61 | * |
@@ -63,13 +63,13 @@ discard block |
||
| 63 | 63 | * @package lsx |
| 64 | 64 | */ |
| 65 | 65 | function lsx_welcome_register_menu() { |
| 66 | - add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' ); |
|
| 66 | + add_theme_page('LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen'); |
|
| 67 | 67 | } |
| 68 | 68 | endif; // lsx_welcome_register_menu |
| 69 | -add_action( 'admin_menu', 'lsx_welcome_register_menu' ); |
|
| 69 | +add_action('admin_menu', 'lsx_welcome_register_menu'); |
|
| 70 | 70 | |
| 71 | 71 | |
| 72 | -if ( ! function_exists( 'lsx_welcome_screen' ) ) : |
|
| 72 | +if ( ! function_exists('lsx_welcome_screen')) : |
|
| 73 | 73 | /** |
| 74 | 74 | * The welcome screen. |
| 75 | 75 | * |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | * @package lsx |
| 78 | 78 | */ |
| 79 | 79 | function lsx_welcome_screen() { |
| 80 | - require_once( ABSPATH . 'wp-load.php' ); |
|
| 81 | - require_once( ABSPATH . 'wp-admin/admin.php' ); |
|
| 82 | - require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
|
| 80 | + require_once(ABSPATH . 'wp-load.php'); |
|
| 81 | + require_once(ABSPATH . 'wp-admin/admin.php'); |
|
| 82 | + require_once(ABSPATH . 'wp-admin/admin-header.php'); |
|
| 83 | 83 | ?> |
| 84 | 84 | <div class="wrap about-wrap"> |
| 85 | 85 | <?php |
@@ -90,14 +90,14 @@ discard block |
||
| 90 | 90 | * @hooked lsx_welcome_enhance - 20 |
| 91 | 91 | * @hooked lsx_welcome_footer - 30 |
| 92 | 92 | */ |
| 93 | - do_action( 'lsx_welcome' ); ?> |
|
| 93 | + do_action('lsx_welcome'); ?> |
|
| 94 | 94 | </div> |
| 95 | 95 | <?php |
| 96 | 96 | } |
| 97 | 97 | endif; // lsx_welcome_screen |
| 98 | 98 | |
| 99 | 99 | |
| 100 | -if ( ! function_exists( 'lsx_welcome_header' ) ) : |
|
| 100 | +if ( ! function_exists('lsx_welcome_header')) : |
|
| 101 | 101 | /** |
| 102 | 102 | * Welcome screen intro |
| 103 | 103 | * |
@@ -105,13 +105,13 @@ discard block |
||
| 105 | 105 | * @package lsx |
| 106 | 106 | */ |
| 107 | 107 | function lsx_welcome_header() { |
| 108 | - require_once( get_template_directory() . '/inc/admin/welcome-screen/component-header.php' ); |
|
| 108 | + require_once(get_template_directory() . '/inc/admin/welcome-screen/component-header.php'); |
|
| 109 | 109 | } |
| 110 | 110 | endif; // lsx_welcome_header |
| 111 | -add_action( 'lsx_welcome', 'lsx_welcome_header', 10 ); |
|
| 111 | +add_action('lsx_welcome', 'lsx_welcome_header', 10); |
|
| 112 | 112 | |
| 113 | 113 | |
| 114 | -if ( ! function_exists( 'lsx_welcome_enhance' ) ) : |
|
| 114 | +if ( ! function_exists('lsx_welcome_enhance')) : |
|
| 115 | 115 | /** |
| 116 | 116 | * Welcome screen enhance section |
| 117 | 117 | * |
@@ -119,13 +119,13 @@ discard block |
||
| 119 | 119 | * @package lsx |
| 120 | 120 | */ |
| 121 | 121 | function lsx_welcome_enhance() { |
| 122 | - require_once( get_template_directory() . '/inc/admin/welcome-screen/component-enhance.php' ); |
|
| 122 | + require_once(get_template_directory() . '/inc/admin/welcome-screen/component-enhance.php'); |
|
| 123 | 123 | } |
| 124 | 124 | endif; // lsx_welcome_enhance |
| 125 | -add_action( 'lsx_welcome', 'lsx_welcome_enhance', 20 ); |
|
| 125 | +add_action('lsx_welcome', 'lsx_welcome_enhance', 20); |
|
| 126 | 126 | |
| 127 | 127 | |
| 128 | -if ( ! function_exists( 'lsx_welcome_footer' ) ) : |
|
| 128 | +if ( ! function_exists('lsx_welcome_footer')) : |
|
| 129 | 129 | /** |
| 130 | 130 | * Welcome screen contribute section |
| 131 | 131 | * |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * @package lsx |
| 134 | 134 | */ |
| 135 | 135 | function lsx_welcome_footer() { |
| 136 | - require_once( get_template_directory() . '/inc/admin/welcome-screen/component-footer.php' ); |
|
| 136 | + require_once(get_template_directory() . '/inc/admin/welcome-screen/component-footer.php'); |
|
| 137 | 137 | } |
| 138 | 138 | endif; // lsx_welcome_footer |
| 139 | -add_action( 'lsx_welcome', 'lsx_welcome_footer', 30 ); |
|
| 139 | +add_action('lsx_welcome', 'lsx_welcome_footer', 30); |
|
@@ -9,47 +9,47 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | <div class="row"> |
| 11 | 11 | <div class="col-md-6"> |
| 12 | - <h1><?php echo esc_html__( 'LSX', 'lsx' ) . ' <sup class="version">' . esc_attr( LSX_VERSION ) . '</sup>'; ?></h1> |
|
| 12 | + <h1><?php echo esc_html__('LSX', 'lsx') . ' <sup class="version">' . esc_attr(LSX_VERSION) . '</sup>'; ?></h1> |
|
| 13 | 13 | </div> |
| 14 | 14 | |
| 15 | 15 | <div class="col-md-6"> |
| 16 | - <p class="review"><?php echo sprintf( esc_html__( '%1$sEnjoying LSX?%2$s Why not %3$sleave a review%4$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx' ), '<strong>', '</strong>', '<a href="https://wordpress.org/themes/lsx" target="_blank">', '</a>' ); ?></p> |
|
| 16 | + <p class="review"><?php echo sprintf(esc_html__('%1$sEnjoying LSX?%2$s Why not %3$sleave a review%4$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx'), '<strong>', '</strong>', '<a href="https://wordpress.org/themes/lsx" target="_blank">', '</a>'); ?></p> |
|
| 17 | 17 | </div> |
| 18 | 18 | </div> |
| 19 | 19 | |
| 20 | 20 | <div class="row"> |
| 21 | 21 | <div class="col-md-6"> |
| 22 | 22 | <div class="box enrich"> |
| 23 | - <h2><?php esc_html_e( 'Built to enrich your WordPress experience', 'lsx' ); ?></h2> |
|
| 24 | - <p><?php esc_html_e( 'Whether you\'re using LSX for your personal blog, as the platform for a powerful WooCommerce store or as the foundation for your own child-theme, you\'ll find it\'s the perfect fit for WordPress.', 'lsx' ); ?></p> |
|
| 23 | + <h2><?php esc_html_e('Built to enrich your WordPress experience', 'lsx'); ?></h2> |
|
| 24 | + <p><?php esc_html_e('Whether you\'re using LSX for your personal blog, as the platform for a powerful WooCommerce store or as the foundation for your own child-theme, you\'ll find it\'s the perfect fit for WordPress.', 'lsx'); ?></p> |
|
| 25 | 25 | </div> |
| 26 | 26 | </div> |
| 27 | 27 | |
| 28 | 28 | <div class="col-md-6"> |
| 29 | 29 | <div class="box news"> |
| 30 | - <h2><?php esc_html_e( 'LSX News & Documentation', 'lsx' ); ?></h2> |
|
| 30 | + <h2><?php esc_html_e('LSX News & Documentation', 'lsx'); ?></h2> |
|
| 31 | 31 | |
| 32 | 32 | <div class="row"> |
| 33 | 33 | <div class="col-md-6 news"> |
| 34 | - <h3><?php esc_html_e( 'Recent News', 'lsx' ); ?></h3> |
|
| 34 | + <h3><?php esc_html_e('Recent News', 'lsx'); ?></h3> |
|
| 35 | 35 | |
| 36 | 36 | <ul> |
| 37 | 37 | <?php |
| 38 | - $rss = fetch_feed( 'https://www.lsdev.biz/lsx/feed/' ); |
|
| 38 | + $rss = fetch_feed('https://www.lsdev.biz/lsx/feed/'); |
|
| 39 | 39 | $rss_items = array(); |
| 40 | 40 | |
| 41 | - if ( ! is_wp_error( $rss ) ) { |
|
| 42 | - $maxitems = $rss->get_item_quantity( 3 ); |
|
| 43 | - $rss_items = $rss->get_items( 0, $maxitems ); |
|
| 41 | + if ( ! is_wp_error($rss)) { |
|
| 42 | + $maxitems = $rss->get_item_quantity(3); |
|
| 43 | + $rss_items = $rss->get_items(0, $maxitems); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - foreach ( $rss_items as $item ) : ?> |
|
| 46 | + foreach ($rss_items as $item) : ?> |
|
| 47 | 47 | <li> |
| 48 | - <a href="<?php echo esc_url( $item->get_permalink() ); ?>" target="_blank"> |
|
| 49 | - <?php echo esc_html( $item->get_title() ); ?> |
|
| 48 | + <a href="<?php echo esc_url($item->get_permalink()); ?>" target="_blank"> |
|
| 49 | + <?php echo esc_html($item->get_title()); ?> |
|
| 50 | 50 | </a> |
| 51 | 51 | </li> |
| 52 | - <span class="date"><?php echo esc_attr( $item->get_date( 'j F Y' ) ); ?></span> |
|
| 52 | + <span class="date"><?php echo esc_attr($item->get_date('j F Y')); ?></span> |
|
| 53 | 53 | <?php |
| 54 | 54 | endforeach; |
| 55 | 55 | ?> |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | </div> |
| 58 | 58 | |
| 59 | 59 | <div class="col-md-6 docs"> |
| 60 | - <h3><?php esc_html_e( 'Documentation', 'lsx' ); ?></h3> |
|
| 60 | + <h3><?php esc_html_e('Documentation', 'lsx'); ?></h3> |
|
| 61 | 61 | |
| 62 | 62 | <ul> |
| 63 | 63 | <li> |
| 64 | - <a href="https://www.lsdev.biz/documentation/lsx/" target="_blank"><?php esc_html_e( 'Installation & configuration', 'lsx' ); ?></a> |
|
| 64 | + <a href="https://www.lsdev.biz/documentation/lsx/" target="_blank"><?php esc_html_e('Installation & configuration', 'lsx'); ?></a> |
|
| 65 | 65 | </li> |
| 66 | 66 | </ul> |
| 67 | 67 | </div> |
@@ -10,12 +10,12 @@ discard block |
||
| 10 | 10 | <div class="row"> |
| 11 | 11 | <div class="col-md-4"> |
| 12 | 12 | <div class="box customise"> |
| 13 | - <h2><?php esc_html_e( 'Theme Customizer', 'lsx' ); ?> - <span class="price">$59.00</span></h2> |
|
| 14 | - <p><?php esc_html_e( 'You\'ve installed LSX, so now why not make it all yours? Whether it\'s a small CSS tweak or changing the entire layout of pages, posts or archives, please make use of the Theme Customizer plugin. Click below to install and get custom!', 'lsx' ); ?></p> |
|
| 13 | + <h2><?php esc_html_e('Theme Customizer', 'lsx'); ?> - <span class="price">$59.00</span></h2> |
|
| 14 | + <p><?php esc_html_e('You\'ve installed LSX, so now why not make it all yours? Whether it\'s a small CSS tweak or changing the entire layout of pages, posts or archives, please make use of the Theme Customizer plugin. Click below to install and get custom!', 'lsx'); ?></p> |
|
| 15 | 15 | |
| 16 | 16 | <div class="more-button"> |
| 17 | 17 | <a href="https://www.lsdev.biz/product/lsx-theme-customizer/" target="_blank" class="button button-primary"> |
| 18 | - <?php esc_html_e( 'Theme Customizer', 'lsx' ); ?> |
|
| 18 | + <?php esc_html_e('Theme Customizer', 'lsx'); ?> |
|
| 19 | 19 | </a> |
| 20 | 20 | </div> |
| 21 | 21 | </div> |
@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | <div class="col-md-4"> |
| 25 | 25 | <div class="box support"> |
| 26 | - <h2><?php esc_html_e( 'Get support', 'lsx' ); ?></h2> |
|
| 27 | - <p><?php printf( esc_html__( 'You\'ll find information on how to use and customize the LSX theme in our %1$sdocumentation%2$s section. However, please do %3$scontact us%4$s for support should you still find yourself unable to achieve your needs.', 'lsx' ), '<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank">', '</a>', '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>' ); ?></p> |
|
| 26 | + <h2><?php esc_html_e('Get support', 'lsx'); ?></h2> |
|
| 27 | + <p><?php printf(esc_html__('You\'ll find information on how to use and customize the LSX theme in our %1$sdocumentation%2$s section. However, please do %3$scontact us%4$s for support should you still find yourself unable to achieve your needs.', 'lsx'), '<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank">', '</a>', '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>'); ?></p> |
|
| 28 | 28 | |
| 29 | 29 | <div class="more-button"> |
| 30 | 30 | <a href="https://www.lsdev.biz/contact-us/" target="_blank" class="button button-primary"> |
| 31 | - <?php esc_html_e( 'Get in touch', 'lsx' ); ?> |
|
| 31 | + <?php esc_html_e('Get in touch', 'lsx'); ?> |
|
| 32 | 32 | </a> |
| 33 | 33 | </div> |
| 34 | 34 | </div> |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | <div class="col-md-4"> |
| 38 | 38 | <div class="box suggest"> |
| 39 | - <h2><?php esc_html_e( 'Suggest a feature', 'lsx' ); ?></h2> |
|
| 40 | - <p><?php printf( esc_html__( 'If you\'d like to suggest a feature for inclusion in upcoming releases of the LSX theme, please don\'t hesitate to %1$scontact us%2$s directly. We\'re always on the lookout for fresh ideas to help make LSX even better.', 'lsx' ), '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>' ); ?></p> |
|
| 39 | + <h2><?php esc_html_e('Suggest a feature', 'lsx'); ?></h2> |
|
| 40 | + <p><?php printf(esc_html__('If you\'d like to suggest a feature for inclusion in upcoming releases of the LSX theme, please don\'t hesitate to %1$scontact us%2$s directly. We\'re always on the lookout for fresh ideas to help make LSX even better.', 'lsx'), '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>'); ?></p> |
|
| 41 | 41 | |
| 42 | 42 | <div class="more-button"> |
| 43 | 43 | <a href="https://www.lsdev.biz/contact-us/" target="_blank" class="button button-primary"> |
| 44 | - <?php esc_html_e( 'Submit a request', 'lsx' ); ?> |
|
| 44 | + <?php esc_html_e('Submit a request', 'lsx'); ?> |
|
| 45 | 45 | </a> |
| 46 | 46 | </div> |
| 47 | 47 | </div> |