Bläddra i källkod

Replace HTML comments by PHP comments

That way they don't appear in production sources.
Philippe Vaucher 12 år sedan
förälder
incheckning
7ce82157d2
15 ändrade filer med 95 tillägg och 95 borttagningar
  1. 8 8
      404.php
  2. 7 7
      archive-custom_type.php
  3. 7 7
      archive.php
  4. 3 3
      comments.php
  5. 5 5
      footer.php
  6. 3 3
      functions.php
  7. 12 12
      header.php
  8. 7 7
      index.php
  9. 7 7
      page-custom.php
  10. 7 7
      page.php
  11. 7 7
      search.php
  12. 1 1
      sidebar.php
  13. 7 7
      single-custom_type.php
  14. 7 7
      single.php
  15. 7 7
      taxonomy-custom_cat.php

+ 8 - 8
404.php

@@ -12,32 +12,32 @@
 
 								<h1><?php _e( 'Epic 404 - Article Not Found', 'bonestheme' ); ?></h1>
 
-							</header> <!-- end article header -->
+							</header> <?php // end article header ?>
 
 							<section class="entry-content">
 
 								<p><?php _e( 'The article you were looking for was not found, but maybe try looking again!', 'bonestheme' ); ?></p>
 
-							</section> <!-- end article section -->
+							</section> <?php // end article section ?>
 
 							<section class="search">
 
 									<p><?php get_search_form(); ?></p>
 
-							</section> <!-- end search section -->
+							</section> <?php // end search section ?>
 
 							<footer class="article-footer">
 
 									<p><?php _e( 'This is the 404.php template.', 'bonestheme' ); ?></p>
 
-							</footer> <!-- end article footer -->
+							</footer> <?php // end article footer ?>
 
-						</article> <!-- end article -->
+						</article> <?php // end article ?>
 
-					</div> <!-- end #main -->
+					</div> <?php // end #main ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
archive-custom_type.php

@@ -19,19 +19,19 @@
 										printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span>.', 'bonestheme' ), get_the_time( 'Y-m-j' ), get_the_time( __( 'F jS, Y', 'bonestheme' ) ), bones_get_the_author_posts_link());
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix">
 
 									<?php the_excerpt(); ?>
 
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; ?>
 
@@ -62,12 +62,12 @@
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-								</div> <!-- end #inner-content -->
+								</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
archive.php

@@ -52,7 +52,7 @@
 										printf(__( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time('Y-m-j'), get_the_time(__( 'F jS, Y', 'bonestheme' )), bones_get_the_author_posts_link(), get_the_category_list(', '));
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix">
 
@@ -60,13 +60,13 @@
 
 									<?php the_excerpt(); ?>
 
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; ?>
 
@@ -97,12 +97,12 @@
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-								</div> <!-- end #inner-content -->
+								</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 3 - 3
comments.php

@@ -16,7 +16,7 @@ The comments page for Bones
 	}
 ?>
 
-<!-- You can start editing here. -->
+<?php // You can start editing here. ?>
 
 <?php if ( have_comments() ) : ?>
 	<h3 id="comments" class="h2"><?php comments_number( __( '<span>No</span> Responses', 'bonestheme' ), __( '<span>One</span> Response', 'bonestheme' ), _n( '<span>%</span> Response', '<span>%</span> Responses', get_comments_number(), 'bonestheme' ) );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
@@ -42,11 +42,11 @@ The comments page for Bones
 	<?php else : // this is displayed if there are no comments so far ?>
 
 	<?php if ( comments_open() ) : ?>
-			<!-- If comments are open, but there are no comments. -->
+			<?php // If comments are open, but there are no comments. ?>
 
 	<?php else : // comments are closed ?>
 
-	<!-- If comments are closed. -->
+	<?php // If comments are closed. ?>
 	<!--p class="nocomments"><?php _e( 'Comments are closed.', 'bonestheme' ); ?></p-->
 
 	<?php endif; ?>

+ 5 - 5
footer.php

@@ -8,15 +8,15 @@
 
 					<p class="source-org copyright">&copy; <?php echo date('Y'); ?> <?php bloginfo( 'name' ); ?>.</p>
 
-				</div> <!-- end #inner-footer -->
+				</div> <?php // end #inner-footer ?>
 
-			</footer> <!-- end footer -->
+			</footer> <?php // end footer ?>
 
-		</div> <!-- end #container -->
+		</div> <?php // end #container ?>
 
-		<!-- all js scripts are loaded in library/bones.php -->
+		<?php // all js scripts are loaded in library/bones.php ?>
 		<?php wp_footer(); ?>
 
 	</body>
 
-</html> <!-- end page. what a ride! -->
+</html> <?php // end page. what a ride! ?>

+ 3 - 3
functions.php

@@ -124,13 +124,13 @@ function bones_comments( $comment, $args, $depth ) {
 					echo get_avatar($comment,$size='32',$default='<path_to_url>' );
 				*/
 				?>
-				<!-- custom gravatar call -->
+				<?php // custom gravatar call ?>
 				<?php
 					// create variable
 					$bgauthemail = get_comment_author_email();
 				?>
 				<img data-gravatar="http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32" class="load-gravatar avatar avatar-48 photo" height="32" width="32" src="<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif" />
-				<!-- end custom gravatar call -->
+				<?php // end custom gravatar call ?>
 				<?php printf(__( '<cite class="fn">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>
 				<time datetime="<?php echo comment_time('Y-m-j'); ?>"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>
 				<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),'  ','') ?>
@@ -145,7 +145,7 @@ function bones_comments( $comment, $args, $depth ) {
 			</section>
 			<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
 		</article>
-	<!-- </li> is added by WordPress automatically -->
+	<?php // </li> is added by WordPress automatically ?>
 <?php
 } // don't remove this bracket!
 

+ 12 - 12
header.php

@@ -8,34 +8,34 @@
 	<head>
 		<meta charset="utf-8">
 
-		<!-- Google Chrome Frame for IE -->
+		<?php // Google Chrome Frame for IE ?>
 		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 
 		<title><?php wp_title(''); ?></title>
 
-		<!-- mobile meta (hooray!) -->
+		<?php // mobile meta (hooray!) ?>
 		<meta name="HandheldFriendly" content="True">
 		<meta name="MobileOptimized" content="320">
 		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 
-		<!-- icons & favicons (for more: http://www.jonathantneal.com/blog/understand-the-favicon/) -->
+		<?php // icons & favicons (for more: http://www.jonathantneal.com/blog/understand-the-favicon/) ?>
 		<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/library/images/apple-icon-touch.png">
 		<link rel="icon" href="<?php echo get_template_directory_uri(); ?>/favicon.png">
 		<!--[if IE]>
 			<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico">
 		<![endif]-->
-		<!-- or, set /favicon.ico for IE10 win -->
+		<?php // or, set /favicon.ico for IE10 win ?>
 		<meta name="msapplication-TileColor" content="#f01d4f">
 		<meta name="msapplication-TileImage" content="<?php echo get_template_directory_uri(); ?>/library/images/win8-tile-icon.png">
 
 		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
 
-		<!-- wordpress head functions -->
+		<?php // wordpress head functions ?>
 		<?php wp_head(); ?>
-		<!-- end of wordpress head -->
+		<?php // end of wordpress head ?>
 
-		<!-- drop Google Analytics Here -->
-		<!-- end analytics -->
+		<?php // drop Google Analytics Here ?>
+		<?php // end analytics ?>
 
 	</head>
 
@@ -47,10 +47,10 @@
 
 				<div id="inner-header" class="wrap clearfix">
 
-					<!-- to use a image just replace the bloginfo('name') with your img src and remove the surrounding <p> -->
+					<?php // to use a image just replace the bloginfo('name') with your img src and remove the surrounding <p> ?>
 					<p id="logo" class="h1"><a href="<?php echo home_url(); ?>" rel="nofollow"><?php bloginfo('name'); ?></a></p>
 
-					<!-- if you'd like to use the site description you can un-comment it below -->
+					<?php // if you'd like to use the site description you can un-comment it below ?>
 					<?php // bloginfo('description'); ?>
 
 
@@ -58,6 +58,6 @@
 						<?php bones_main_nav(); ?>
 					</nav>
 
-				</div> <!-- end #inner-header -->
+				</div> <?php // end #inner-header ?>
 
-			</header> <!-- end header -->
+			</header> <?php // end header ?>

+ 7 - 7
index.php

@@ -17,20 +17,20 @@
 										printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), bones_get_the_author_posts_link(), get_the_category_list(', '));
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix">
 									<?php the_content(); ?>
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 									<p class="tags"><?php the_tags( '<span class="tags-title">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '' ); ?></p>
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
 								<?php // comments_template(); // uncomment if you want to use them ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; ?>
 
@@ -61,12 +61,12 @@
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
page-custom.php

@@ -24,20 +24,20 @@ Template Name: Custom Page Example
 									?></p>
 
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix" itemprop="articleBody">
 									<?php the_content(); ?>
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 									<p class="clearfix"><?php the_tags( '<span class="tags">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '' ); ?></p>
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
 								<?php comments_template(); ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; else : ?>
 
@@ -55,12 +55,12 @@ Template Name: Custom Page Example
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
page.php

@@ -18,20 +18,20 @@
 									?></p>
 
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix" itemprop="articleBody">
 									<?php the_content(); ?>
-							</section> <!-- end article section -->
+							</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 									<?php the_tags( '<span class="tags">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '' ); ?>
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
 								<?php comments_template(); ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; else : ?>
 
@@ -49,12 +49,12 @@
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
search.php

@@ -18,18 +18,18 @@
 										printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time( 'Y-m-j' ), get_the_time( __( 'F jS, Y', 'bonestheme' ) ), bones_get_the_author_posts_link(), get_the_category_list(', ') );
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content">
 										<?php the_excerpt( '<span class="read-more">' . __( 'Read more &raquo;', 'bonestheme' ) . '</span>' ); ?>
 
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 						<?php endwhile; ?>
 
@@ -60,12 +60,12 @@
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 							<?php get_sidebar(); ?>
 
-					</div> <!-- end #inner-content -->
+					</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 1 - 1
sidebar.php

@@ -6,7 +6,7 @@
 
 					<?php else : ?>
 
-						<!-- This content shows up if there are no widgets defined in the backend. -->
+						<?php // This content shows up if there are no widgets defined in the backend. ?>
 
 						<div class="alert alert-help">
 							<p><?php _e( 'Please activate some Widgets.', 'bonestheme' );  ?></p>

+ 7 - 7
single-custom_type.php

@@ -32,22 +32,22 @@ single-bookmarks.php
 										printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time( 'Y-m-j' ), get_the_time( __( 'F jS, Y', 'bonestheme' ) ), bones_get_the_author_posts_link(), get_the_term_list( $post->ID, 'custom_cat', ' ', ', ', '' ) );
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix">
 
 									<?php the_content(); ?>
 
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-header">
 									<p class="tags"><?php echo get_the_term_list( get_the_ID(), 'custom_tag', '<span class="tags-title">' . __( 'Custom Tags:', 'bonestheme' ) . '</span> ', ', ' ) ?></p>
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
 								<?php comments_template(); ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; ?>
 
@@ -67,12 +67,12 @@ single-bookmarks.php
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
single.php

@@ -17,20 +17,20 @@
 										printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&amp;</span> filed under %4$s.', 'bonestheme' ), get_the_time( 'Y-m-j' ), get_the_time( get_option('date_format')), bones_get_the_author_posts_link(), get_the_category_list(', ') );
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content clearfix" itemprop="articleBody">
 									<?php the_content(); ?>
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 									<?php the_tags( '<p class="tags"><span class="tags-title">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '</p>' ); ?>
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
 								<?php comments_template(); ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 						<?php endwhile; ?>
 
@@ -50,12 +50,12 @@
 
 						<?php endif; ?>
 
-					</div> <!-- end #main -->
+					</div> <?php // end #main ?>
 
 					<?php get_sidebar(); ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>

+ 7 - 7
taxonomy-custom_cat.php

@@ -34,18 +34,18 @@ taxonomy-shoes.php
 										printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time( 'Y-m-j' ), get_the_time( __( 'F jS, Y', 'bonestheme' )), bones_get_the_author_posts_link(), get_the_term_list( get_the_ID(), 'custom_cat', "" ) );
 									?></p>
 
-								</header> <!-- end article header -->
+								</header> <?php // end article header ?>
 
 								<section class="entry-content">
 									<?php the_excerpt( '<span class="read-more">' . __( 'Read More &raquo;', 'bonestheme' ) . '</span>' ); ?>
 
-								</section> <!-- end article section -->
+								</section> <?php // end article section ?>
 
 								<footer class="article-footer">
 
-								</footer> <!-- end article footer -->
+								</footer> <?php // end article footer ?>
 
-							</article> <!-- end article -->
+							</article> <?php // end article ?>
 
 							<?php endwhile; ?>
 
@@ -76,12 +76,12 @@ taxonomy-shoes.php
 
 							<?php endif; ?>
 
-						</div> <!-- end #main -->
+						</div> <?php // end #main ?>
 
 						<?php get_sidebar(); ?>
 
-				</div> <!-- end #inner-content -->
+				</div> <?php // end #inner-content ?>
 
-			</div> <!-- end #content -->
+			</div> <?php // end #content ?>
 
 <?php get_footer(); ?>