Improve code readability in no-results.php

It's difficult to get around php if () {} statements when mixed with markup, so using if () : endif; syntax instead.
This commit is contained in:
Konstantin Kovshenin 2012-08-14 10:30:50 +04:00
parent 7a4aa04261
commit 5bf85736bc
1 changed files with 4 additions and 4 deletions

View File

@ -15,20 +15,20 @@
</header><!-- .entry-header --> </header><!-- .entry-header -->
<div class="entry-content"> <div class="entry-content">
<?php if ( is_home() ) { ?> <?php if ( is_home() ) : ?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', '_s' ), admin_url( 'post-new.php' ) ); ?></p> <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', '_s' ), admin_url( 'post-new.php' ) ); ?></p>
<?php } elseif ( is_search() ) { ?> <?php elseif ( is_search() ) : ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', '_s' ); ?></p> <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', '_s' ); ?></p>
<?php get_search_form(); ?> <?php get_search_form(); ?>
<?php } else { ?> <?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', '_s' ); ?></p> <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', '_s' ); ?></p>
<?php get_search_form(); ?> <?php get_search_form(); ?>
<?php } ?> <?php endif; ?>
</div><!-- .entry-content --> </div><!-- .entry-content -->
</article><!-- #post-0 .post .no-results .not-found --> </article><!-- #post-0 .post .no-results .not-found -->