Issues (4138)

templates/archive-exercise.php (1 issue)

1
<?php
2
/**
3
 * The template for displaying Exercises Archive.
4
 *
5
 * @package lsx-health-plan
6
 */
7
8
get_header(); ?>
9
10
<?php lsx_content_wrap_before(); ?>
11
12
<?php
13
	$page_id  = get_the_ID();
14
	$redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
15
?>
16
17
	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
18
19
		<?php lsx_content_before(); ?>
20
21
		<!-- Begining restricted content -->
22
		<?php
23
		if ( ! function_exists( 'wc_memberships_view_restricted_post_content' ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) {
24
			?>
25
			<main id="main" role="main">
26
27
				<?php lsx_content_top(); ?>
28
29
				<div class="post-wrapper exercise-archive-plan archive-plan">
30
					<div class="row">
31
						<?php if ( have_posts() ) : ?>
32
							<?php
33
							while ( have_posts() ) :
34
								the_post();
35
								?>
36
37
								<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-exercise.php'; ?>
38
39
							<?php endwhile; ?>
40
41
						<?php else : ?>
42
43
							<?php get_template_part( 'partials/content', 'none' ); ?>
44
45
						<?php endif; ?>
46
					</div>
47
					<?php lsx_paging_nav(); ?>
48
				</div>
49
				<?php lsx_content_bottom(); ?>
50
51
			</main><!-- #main -->
52
53
			<?php
54
		} else {
55
			wp_redirect( $redirect );
56
			exit;
57
		}
58
		?>
59
60
<?php lsx_content_after(); ?>
61
62
</div><!-- #primary -->
63
64
<?php lsx_content_wrap_after(); ?>
65
66
<?php //get_sidebar(); ?>
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
67
68
<?php
69
get_footer();
70