@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | if('posts' == $show_on_front && is_home()){ |
24 | 24 | $sidebar = 'home'; |
25 | - }else{ |
|
25 | + } else{ |
|
26 | 26 | $sidebar = 'sidebar-1'; |
27 | 27 | } |
28 | 28 | } |
@@ -38,9 +38,12 @@ discard block |
||
38 | 38 | |
39 | 39 | <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
40 | 40 | |
41 | - <?php else : ?> |
|
41 | + <?php else { |
|
42 | + : ?> |
|
42 | 43 | |
43 | - <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
|
44 | + <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); |
|
45 | +} |
|
46 | +?>" role="complementary"> |
|
44 | 47 | |
45 | 48 | <?php endif ; ?> |
46 | 49 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $layout = get_theme_mod('lsx_layout','2cr'); |
13 | 13 | if('posts' == $show_on_front && is_home()){ |
14 | 14 | $sidebar = 'home'; |
15 | - }else{ |
|
15 | + } else{ |
|
16 | 16 | $sidebar = 'sidebar-1'; |
17 | 17 | } |
18 | 18 |
@@ -44,9 +44,12 @@ |
||
44 | 44 | |
45 | 45 | <?php lsx_paging_nav(); ?> |
46 | 46 | |
47 | - <?php else : ?> |
|
47 | + <?php else { |
|
48 | + : ?> |
|
48 | 49 | |
49 | - <?php get_template_part( 'content', 'none' ); ?> |
|
50 | + <?php get_template_part( 'content', 'none' ); |
|
51 | +} |
|
52 | +?> |
|
50 | 53 | |
51 | 54 | <?php endif; ?> |
52 | 55 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | if(has_nav_menu('footer-menu')){ |
26 | 26 | wp_nav_menu(array('theme_location' => 'footer-menu')); |
27 | 27 | } |
28 | - }else{ |
|
28 | + } else{ |
|
29 | 29 | if(has_nav_menu('footer_logged_in')){ |
30 | 30 | wp_nav_menu(array('theme_location' => 'footer_logged_in')); |
31 | 31 | } |
@@ -62,18 +62,20 @@ |
||
62 | 62 | */ |
63 | 63 | $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' ) ) ); |
64 | 64 | foreach ( $attachments as $k => $attachment ) { |
65 | - if ( $attachment->ID == $post->ID ) |
|
66 | - break; |
|
65 | + if ( $attachment->ID == $post->ID ) { |
|
66 | + break; |
|
67 | + } |
|
67 | 68 | } |
68 | 69 | $k++; |
69 | 70 | // If there is more than 1 attachment in a gallery |
70 | 71 | if ( count( $attachments ) > 1 ) { |
71 | - if ( isset( $attachments[ $k ] ) ) |
|
72 | - // get the URL of the next image attachment |
|
72 | + if ( isset( $attachments[ $k ] ) ) { |
|
73 | + // get the URL of the next image attachment |
|
73 | 74 | $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
74 | - else |
|
75 | - // or get the URL of the first image attachment |
|
75 | + } else { |
|
76 | + // or get the URL of the first image attachment |
|
76 | 77 | $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
78 | + } |
|
77 | 79 | } else { |
78 | 80 | // or, if there's only 1 image, get the URL of the image |
79 | 81 | $next_attachment_url = wp_get_attachment_url(); |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | $show_on_front = get_option('show_on_front','posts'); |
34 | 34 | if('page' == $show_on_front){ |
35 | 35 | $archive_link = get_permalink(get_option('page_for_posts')); |
36 | - }else{ |
|
36 | + } else{ |
|
37 | 37 | $archive_link = home_url(); |
38 | 38 | } |
39 | - }else{ |
|
39 | + } else{ |
|
40 | 40 | $archive_link = get_post_format_link($format); |
41 | 41 | } |
42 | 42 | $format = lsx_translate_format_to_fontawesome($format); |
@@ -71,10 +71,12 @@ discard block |
||
71 | 71 | </div><!-- .entry-summary --> |
72 | 72 | <?php elseif ( has_post_format( array('link') ) ) : ?> |
73 | 73 | |
74 | - <?php else : ?> |
|
74 | + <?php else { |
|
75 | + : ?> |
|
75 | 76 | <div class="entry-content"> |
76 | 77 | <?php |
77 | 78 | the_content(); |
79 | +} |
|
78 | 80 | |
79 | 81 | wp_link_pages( array( |
80 | 82 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + return; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Layout hooks |
@@ -62,7 +65,7 @@ discard block |
||
62 | 65 | $show_on_front = get_option('show_on_front'); |
63 | 66 | if('page' == $show_on_front){ |
64 | 67 | return lsx_layout_selector( 'main', 'home' ); |
65 | - }else{ |
|
68 | + } else{ |
|
66 | 69 | return lsx_layout_selector( 'main', 'site' ); |
67 | 70 | } |
68 | 71 |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + return; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /* |
5 | 7 | * LSX Lazy Load Images Class |
@@ -25,8 +27,9 @@ discard block |
||
25 | 27 | protected static $noscripts = array(); |
26 | 28 | |
27 | 29 | static function init() { |
28 | - if ( is_admin() ) |
|
29 | - return; |
|
30 | + if ( is_admin() ) { |
|
31 | + return; |
|
32 | + } |
|
30 | 33 | |
31 | 34 | if ( get_theme_mod( 'lsx_lazyload_status', '1' ) === false ) { |
32 | 35 | self::$enabled = false; |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + return; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * lsx Comment Walker |
@@ -67,7 +70,7 @@ discard block |
||
67 | 70 | foreach($fields as &$field){ |
68 | 71 | if(stristr('class=', $field)){ |
69 | 72 | $field = str_replace('class="', 'class="form-control ', $field); |
70 | - }else{ |
|
73 | + } else{ |
|
71 | 74 | $field = str_replace('<input', '<input class="form-control" ', $field); |
72 | 75 | } |
73 | 76 | } |