@@ -31,9 +31,11 @@ |
||
31 | 31 | // Load content after the loop. |
32 | 32 | do_action( 'alnp_load_after_loop' ); |
33 | 33 | |
34 | -else : |
|
34 | +else { |
|
35 | + : |
|
35 | 36 | |
36 | 37 | // Load content if there are no more posts. |
37 | 38 | do_action( 'alnp_no_more_posts' ); |
39 | +} |
|
38 | 40 | |
39 | 41 | endif; // END if have_posts() |
@@ -39,9 +39,11 @@ |
||
39 | 39 | // Load content after the loop. |
40 | 40 | do_action( 'alnp_load_after_loop' ); |
41 | 41 | |
42 | - else : |
|
42 | + else { |
|
43 | + : |
|
43 | 44 | |
44 | 45 | // Load content if there are no more posts. |
45 | 46 | do_action( 'alnp_no_more_posts' ); |
47 | + } |
|
46 | 48 | |
47 | 49 | endif; // END if have_posts() |
@@ -46,7 +46,9 @@ |
||
46 | 46 | // Preferred implementation, where theme provides an array of options |
47 | 47 | if ( isset( $theme_support[0] ) && is_array( $theme_support[0] ) ) { |
48 | 48 | foreach( $theme_support[0] as $key => $value ) { |
49 | - if ( ! empty( $value ) ) update_option( 'auto_load_next_post_' . $key, $value ); |
|
49 | + if ( ! empty( $value ) ) { |
|
50 | + update_option( 'auto_load_next_post_' . $key, $value ); |
|
51 | + } |
|
50 | 52 | } |
51 | 53 | } |
52 | 54 | } |
@@ -124,8 +124,7 @@ |
||
124 | 124 | add_action( 'admin_notices', array( $this, 'theme_ready_notice' ) ); |
125 | 125 | update_option( 'auto_load_next_post_theme_supported', $template ); |
126 | 126 | } |
127 | - } |
|
128 | - else { |
|
127 | + } else { |
|
129 | 128 | // If theme not supported then delete option. |
130 | 129 | delete_option( 'auto_load_next_post_theme_supported' ); |
131 | 130 | } |
@@ -31,9 +31,11 @@ |
||
31 | 31 | // Load content after the loop. |
32 | 32 | do_action( 'alnp_load_after_loop' ); |
33 | 33 | |
34 | -else : |
|
34 | +else { |
|
35 | + : |
|
35 | 36 | |
36 | 37 | // Load content if there are no more posts. |
37 | 38 | do_action( 'alnp_no_more_posts' ); |
39 | +} |
|
38 | 40 | |
39 | 41 | endif; // END if have_posts() |
@@ -52,8 +52,7 @@ |
||
52 | 52 | // Checks if Auto Load Next Post Pro is installed before displaying sidebar. |
53 | 53 | if ( ! is_alnp_pro_version_installed() ) { |
54 | 54 | include_once( dirname( __FILE__ ) . '/html-admin-sidebar.php' ); |
55 | - } |
|
56 | - else { |
|
55 | + } else { |
|
57 | 56 | echo '<div class="alnp-sidebar">'; |
58 | 57 | |
59 | 58 | do_action( 'auto_load_next_post_after_settings' ); |
@@ -121,10 +121,18 @@ discard block |
||
121 | 121 | $navigation_container = alnp_get_theme_support( 'navigation_container' ); |
122 | 122 | $comments_container = alnp_get_theme_support( 'comments_container' ); |
123 | 123 | |
124 | - if ( ! empty( $content_container ) ) update_option( 'auto_load_next_post_content_container', $content_container ); |
|
125 | - if ( ! empty( $title_selector ) ) update_option( 'auto_load_next_post_title_selector', $title_selector ); |
|
126 | - if ( ! empty( $navigation_container ) ) update_option( 'auto_load_next_post_navigation_container', $navigation_container ); |
|
127 | - if ( ! empty( $comments_container ) ) update_option( 'auto_load_next_post_comments_container', $comments_container ); |
|
124 | + if ( ! empty( $content_container ) ) { |
|
125 | + update_option( 'auto_load_next_post_content_container', $content_container ); |
|
126 | + } |
|
127 | + if ( ! empty( $title_selector ) ) { |
|
128 | + update_option( 'auto_load_next_post_title_selector', $title_selector ); |
|
129 | + } |
|
130 | + if ( ! empty( $navigation_container ) ) { |
|
131 | + update_option( 'auto_load_next_post_navigation_container', $navigation_container ); |
|
132 | + } |
|
133 | + if ( ! empty( $comments_container ) ) { |
|
134 | + update_option( 'auto_load_next_post_comments_container', $comments_container ); |
|
135 | + } |
|
128 | 136 | } |
129 | 137 | } // END set_theme_selectors() |
130 | 138 | |
@@ -143,8 +151,12 @@ discard block |
||
143 | 151 | $load_js_in_footer = alnp_get_theme_support( 'load_js_in_footer' ); |
144 | 152 | $lock_js_in_footer = alnp_get_theme_support( 'lock_js_in_footer' ); |
145 | 153 | |
146 | - if ( ! empty( $load_js_in_footer ) && $load_js_in_footer == 'yes' ) update_option( 'auto_load_next_post_load_js_in_footer', $load_js_in_footer ); |
|
147 | - if ( ! empty( $lock_js_in_footer ) && $lock_js_in_footer == 'yes' ) update_option( 'auto_load_next_post_lock_js_in_footer', $lock_js_in_footer ); |
|
154 | + if ( ! empty( $load_js_in_footer ) && $load_js_in_footer == 'yes' ) { |
|
155 | + update_option( 'auto_load_next_post_load_js_in_footer', $load_js_in_footer ); |
|
156 | + } |
|
157 | + if ( ! empty( $lock_js_in_footer ) && $lock_js_in_footer == 'yes' ) { |
|
158 | + update_option( 'auto_load_next_post_lock_js_in_footer', $lock_js_in_footer ); |
|
159 | + } |
|
148 | 160 | } |
149 | 161 | } // END set_js_in_footer() |
150 | 162 |
@@ -165,8 +165,12 @@ discard block |
||
165 | 165 | public function alnp_remove_widgets_panel( $components ) { |
166 | 166 | if ( $this->alnp_is_customizer() ) { |
167 | 167 | foreach( $components as $key => $component ) { |
168 | - if ( $component == 'widgets' ) unset( $components[ 'widgets' ] ); |
|
169 | - if ( $component == 'nav_menus' ) unset( $components[ 'nav_menus' ] ); |
|
168 | + if ( $component == 'widgets' ) { |
|
169 | + unset( $components[ 'widgets' ] ); |
|
170 | + } |
|
171 | + if ( $component == 'nav_menus' ) { |
|
172 | + unset( $components[ 'nav_menus' ] ); |
|
173 | + } |
|
170 | 174 | } |
171 | 175 | } |
172 | 176 | |
@@ -500,8 +504,7 @@ discard block |
||
500 | 504 | return false; |
501 | 505 | } elseif ( is_home() ) { |
502 | 506 | return true; |
503 | - } |
|
504 | - elseif ( is_singular( apply_filters( 'alnp_customizer_posts_ready', array( 'post' ) ) ) ) { |
|
507 | + } elseif ( is_singular( apply_filters( 'alnp_customizer_posts_ready', array( 'post' ) ) ) ) { |
|
505 | 508 | return true; |
506 | 509 | } |
507 | 510 |
@@ -46,11 +46,9 @@ discard block |
||
46 | 46 | |
47 | 47 | if ( file_exists( $child_path . 'content-alnp.php' ) ) { |
48 | 48 | $template_redirect = $child_path . 'content-alnp.php'; |
49 | - } |
|
50 | - else if( file_exists( $template_path . 'content-alnp.php') ) { |
|
49 | + } else if( file_exists( $template_path . 'content-alnp.php') ) { |
|
51 | 50 | $template_redirect = $template_path . 'content-alnp.php'; |
52 | - } |
|
53 | - else if( file_exists( $default_path . '/template/content-alnp.php' ) ) { |
|
51 | + } else if( file_exists( $default_path . '/template/content-alnp.php' ) ) { |
|
54 | 52 | $template_redirect = $default_path . '/template/content-alnp.php'; |
55 | 53 | } |
56 | 54 | |
@@ -122,8 +120,7 @@ discard block |
||
122 | 120 | |
123 | 121 | return get_permalink( $id ); |
124 | 122 | endwhile; |
125 | - } |
|
126 | - else { |
|
123 | + } else { |
|
127 | 124 | return false; |
128 | 125 | } |
129 | 126 | } // END alnp_get_random_page_permalink() |