Passed
Push — development ( 65a7cc...764dda )
by
unknown
10:32
created

wrapper.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * The main wrapper.
4
 *
5
 * This is a meta file and not common in every WordPress theme.
6
 * It wraps around the page templates to remove repeated code and keep
7
 * the theme DRY.
8
 *
9
 * It's inspired by Scribu and the Roots/Sage project.
10
 *
11
 * @link http://scribu.net/wordpress/theme-wrappers.html
12
 *
13
 * @package spurs
14
 */
15
16
get_header( spurs_template_base() );
17
18
if (!is_front_page() && function_exists('yoast_breadcrumb')) {
19
	yoast_breadcrumb('<div id="breadcrumbs">', '</div>');
20
}
21
22
?>
23
24
	<div id="primary" class="<?php spurs_content_classes(); ?>">
25
26 View Code Duplication
		<?php if ( ( is_page_template( 'page-templates/sidebar-left.php' ) || is_page_template( 'page-templates/sidebar-right.php' ) || is_page_template( 'page-templates/both-sidebars.php' ) ) && ( is_active_sidebar( 'sidebar-left' ) || is_active_sidebar( 'sidebar-right' ) )  ) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
27
			echo '<div class="container"><div class=row>';
28
		} ?>
29
30
		<?php spurs_left_sidebar(); ?>
31
32
		<main class="site-main <?php spurs_column_classes() ?>" id="main">
33
			<?php include spurs_template_path(); ?>
34
		</main>
35
36
		<?php
37
		
38
			if( 'pagination' === get_theme_mod( 'spurs_pagination' ) ){
39
				spurs_pagination();
40
			} else {
41
				spurs_load_more();
42
			}
43
44
		?>
45
46
		<?php spurs_right_sidebar(); ?>
47
48 View Code Duplication
		<?php if ( ( is_page_template( 'page-templates/sidebar-left.php' ) || is_page_template( 'page-templates/sidebar-right.php' ) ) && ( is_active_sidebar( 'sidebar-left' ) || is_active_sidebar( 'sidebar-right' ) )  ) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
49
			echo '</div></div>';
50
		} ?>
51
52
	</div>
53
54
<?php
55
56
get_footer( spurs_template_base() );
57