@@ -16,72 +16,72 @@ |
||
| 16 | 16 | * @version 1.5.12 |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | -if ( have_posts() ) : |
|
| 19 | +if (have_posts()) : |
|
| 20 | 20 | |
| 21 | 21 | // Load content before the loop. |
| 22 | - do_action( 'alnp_load_before_loop' ); |
|
| 22 | + do_action('alnp_load_before_loop'); |
|
| 23 | 23 | |
| 24 | 24 | // Check that there are posts to load. |
| 25 | - while ( have_posts() ) : the_post(); |
|
| 25 | + while (have_posts()) : the_post(); |
|
| 26 | 26 | |
| 27 | 27 | $post_format = get_post_format(); // Post Format e.g. video |
| 28 | 28 | |
| 29 | 29 | $post_type = alnp_get_post_type(); // Post Type e.g. single |
| 30 | 30 | |
| 31 | 31 | // Load content before the post content. |
| 32 | - do_action( 'alnp_load_before_content' ); |
|
| 32 | + do_action('alnp_load_before_content'); |
|
| 33 | 33 | |
| 34 | 34 | // Load content before the post content for a specific post format. |
| 35 | - do_action( 'alnp_load_before_content_post_format_' . $post_format ); |
|
| 35 | + do_action('alnp_load_before_content_post_format_'.$post_format); |
|
| 36 | 36 | |
| 37 | 37 | // Load content before the post content for a specific post type. |
| 38 | - do_action( 'alnp_load_before_content_post_type_' . $post_type ); |
|
| 38 | + do_action('alnp_load_before_content_post_type_'.$post_type); |
|
| 39 | 39 | |
| 40 | - if ( false === $post_format ) { |
|
| 40 | + if (false === $post_format) { |
|
| 41 | 41 | /* |
| 42 | 42 | * Include the Post-Type-specific template for the content. |
| 43 | 43 | * content-___.php (where ___ is the Post Type name). |
| 44 | 44 | */ |
| 45 | - if ( locate_template( alnp_template_location() . 'content-' . $post_type . '.php') != '' ) { |
|
| 46 | - get_template_part( alnp_template_location() . 'content', $post_type ); |
|
| 47 | - } else if ( locate_template( alnp_template_location() . 'content-post.php') != '' ) { |
|
| 45 | + if (locate_template(alnp_template_location().'content-'.$post_type.'.php') != '') { |
|
| 46 | + get_template_part(alnp_template_location().'content', $post_type); |
|
| 47 | + } else if (locate_template(alnp_template_location().'content-post.php') != '') { |
|
| 48 | 48 | // If not looking for other post types and content-post.php is found. |
| 49 | - get_template_part( alnp_template_location() . 'content', 'post' ); |
|
| 49 | + get_template_part(alnp_template_location().'content', 'post'); |
|
| 50 | 50 | } else { |
| 51 | 51 | // If no specific post type found then fallback to standard content.php file. |
| 52 | - get_template_part( alnp_template_location() . 'content' ); |
|
| 52 | + get_template_part(alnp_template_location().'content'); |
|
| 53 | 53 | } |
| 54 | 54 | } else { |
| 55 | 55 | /* |
| 56 | 56 | * Include the Post-Format-specific template for the content. |
| 57 | 57 | * called format-___.php (where ___ is the Post Format name). |
| 58 | 58 | */ |
| 59 | - if ( locate_template( alnp_template_location() . 'format-' . $post_format . '.php' ) != '' ) { |
|
| 60 | - get_template_part( alnp_template_location() . 'format', $post_format ); |
|
| 59 | + if (locate_template(alnp_template_location().'format-'.$post_format.'.php') != '') { |
|
| 60 | + get_template_part(alnp_template_location().'format', $post_format); |
|
| 61 | 61 | } else { |
| 62 | 62 | // If no format-{post-format}.php file found then fallback to content-{post-format}.php |
| 63 | - get_template_part( alnp_template_location() . 'content', $post_format ); |
|
| 63 | + get_template_part(alnp_template_location().'content', $post_format); |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | // Load content after the post content for a specific post type. |
| 68 | - do_action( 'alnp_load_after_content_post_type_' . $post_type ); |
|
| 68 | + do_action('alnp_load_after_content_post_type_'.$post_type); |
|
| 69 | 69 | |
| 70 | 70 | // Load content after the post content for a specific post format. |
| 71 | - do_action( 'alnp_load_after_content_post_format_' . $post_format ); |
|
| 71 | + do_action('alnp_load_after_content_post_format_'.$post_format); |
|
| 72 | 72 | |
| 73 | 73 | // Load content after the post content. |
| 74 | - do_action( 'alnp_load_after_content' ); |
|
| 74 | + do_action('alnp_load_after_content'); |
|
| 75 | 75 | |
| 76 | 76 | // End the loop. |
| 77 | 77 | endwhile; |
| 78 | 78 | |
| 79 | 79 | // Load content after the loop. |
| 80 | - do_action( 'alnp_load_after_loop' ); |
|
| 80 | + do_action('alnp_load_after_loop'); |
|
| 81 | 81 | |
| 82 | 82 | else : |
| 83 | 83 | |
| 84 | 84 | // Load content if there are no more posts. |
| 85 | - do_action( 'alnp_no_more_posts' ); |
|
| 85 | + do_action('alnp_no_more_posts'); |
|
| 86 | 86 | |
| 87 | 87 | endif; // END if have_posts() |