@@ 190-212 (lines=23) @@ | ||
187 | } // END alnp_scan_directories() |
|
188 | } |
|
189 | ||
190 | if ( ! function_exists( 'alnp_get_template_directory' ) ) { |
|
191 | /** |
|
192 | * Returns the template directory saved. |
|
193 | * |
|
194 | * @since 1.6.0 |
|
195 | * @param string $post_type |
|
196 | * @param string $post_format |
|
197 | * @return string $template |
|
198 | */ |
|
199 | function alnp_get_template_directory( $post_type = 'post', $post_format = '' ) { |
|
200 | if ( ! empty( $post_format ) ) { |
|
201 | $template = get_option( 'auto_load_next_post_directory_post_' . $post_format ); |
|
202 | } else { |
|
203 | $template = get_option( 'auto_load_next_post_directory_' . $post_type ); |
|
204 | } |
|
205 | ||
206 | if ( !$template ) { |
|
207 | return ''; |
|
208 | } |
|
209 | ||
210 | return $template; |
|
211 | } // END alnp_get_template_directory() |
|
212 | } |
|
213 | ||
214 | if ( ! function_exists( 'alnp_get_template' ) ) { |
|
215 | /** |
|
@@ 214-236 (lines=23) @@ | ||
211 | } // END alnp_get_template_directory() |
|
212 | } |
|
213 | ||
214 | if ( ! function_exists( 'alnp_get_template' ) ) { |
|
215 | /** |
|
216 | * Returns the template file saved. |
|
217 | * |
|
218 | * @since 1.6.0 |
|
219 | * @param string $post_type |
|
220 | * @param string $post_format |
|
221 | * @return string $template |
|
222 | */ |
|
223 | function alnp_get_template( $post_type = 'post', $post_format = '' ) { |
|
224 | if ( ! empty( $post_format ) ) { |
|
225 | $template = get_option( 'auto_load_next_post_template_post_' . strtolower( $post_format ) ); |
|
226 | } else { |
|
227 | $template = get_option( 'auto_load_next_post_template_' . strtolower( $post_type ) ); |
|
228 | } |
|
229 | ||
230 | if ( !$template ) { |
|
231 | return ''; |
|
232 | } |
|
233 | ||
234 | return $template; |
|
235 | } // END alnp_get_template() |
|
236 | } |
|
237 | ||
238 | if ( ! function_exists( 'alnp_find_template' ) ) { |
|
239 | /** |