Merge pull request #148 from stef-k/code-format-loop-templates - Thx again @stef-k
code formatting second batch - Thx again @stef-k
This commit is contained in:
commit
4e26144bcc
|
@ -1,9 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template used for displaying page content in page.php
|
* Blank content partial template.
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
<?php the_content(); ?>
|
the_content();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<?php the_title( sprintf( '<h2 class="entry-title card-title"><a href="%s" rel="bookmark">',
|
<?php the_title( sprintf( '<h2 class="entry-title card-title"><a href="%s" rel="bookmark">',
|
||||||
esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||||
|
|
||||||
<?php if ( 'post' === get_post_type() ) : ?>
|
<?php if ( 'post' === get_post_type() ) : ?>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template used for displaying page content in page.php
|
* Content empty partial template.
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
<?php the_content(); ?>
|
the_content();
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$col = get_theme_mod( 'understrap_grid_post_columns' );
|
$col = get_theme_mod( 'understrap_grid_post_columns' );
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">
|
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">
|
||||||
|
|
|
@ -8,34 +8,36 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article class="post no-results not-found" id="post-0">
|
<article class="post no-results not-found" id="post-0">
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
|
|
||||||
<h2 class="page-title"><?php _e( 'Nothing Found', 'understrap' ); ?></h2>
|
<h2 class="page-title"><?php _e( 'Nothing Found', 'understrap' ); ?></h2>
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||||
|
|
||||||
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'understrap' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.',
|
||||||
|
'understrap' ), esc_url( 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.', 'understrap' ); ?></p>
|
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.',
|
||||||
<?php get_search_form(); ?>
|
'understrap' ); ?></p>
|
||||||
|
<?php get_search_form(); ?>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'understrap' ); ?></p>
|
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.',
|
||||||
|
'understrap' ); ?></p>
|
||||||
|
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- .page-content -->
|
</div><!-- .page-content -->
|
||||||
|
|
||||||
</article><!-- .no-results -->
|
</article><!-- .no-results -->
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template used for displaying page content in page.php
|
* Partial template for content in page.php
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
|
?>
|
||||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
|
|
||||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||||
|
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_link_pages( array(
|
wp_link_pages( array(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
'after' => '</div>',
|
'after' => '</div>',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
|
|
||||||
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -1,37 +1,40 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
|
* Search results partial template.
|
||||||
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
|
?>
|
||||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
|
|
||||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ),
|
||||||
|
'</a></h2>' ); ?>
|
||||||
|
|
||||||
<?php if ( 'post' == get_post_type() ) : ?>
|
<?php if ( 'post' == get_post_type() ) : ?>
|
||||||
|
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
|
|
||||||
<?php understrap_posted_on(); ?>
|
<?php understrap_posted_on(); ?>
|
||||||
|
|
||||||
</div><!-- .entry-meta -->
|
</div><!-- .entry-meta -->
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
|
|
||||||
<?php the_excerpt(); ?>
|
<?php the_excerpt(); ?>
|
||||||
|
|
||||||
</div><!-- .entry-summary -->
|
</div><!-- .entry-summary -->
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
|
|
||||||
<?php understrap_entry_footer(); ?>
|
<?php understrap_entry_footer(); ?>
|
||||||
|
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -1,42 +1,44 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
|
* Single post partial template.
|
||||||
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
|
?>
|
||||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
|
|
||||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||||
|
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
|
|
||||||
<?php understrap_posted_on(); ?>
|
<?php understrap_posted_on(); ?>
|
||||||
|
|
||||||
</div><!-- .entry-meta -->
|
</div><!-- .entry-meta -->
|
||||||
|
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_link_pages( array(
|
wp_link_pages( array(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
'after' => '</div>',
|
'after' => '</div>',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
|
|
||||||
<?php understrap_entry_footer(); ?>
|
<?php understrap_entry_footer(); ?>
|
||||||
|
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -2,39 +2,40 @@
|
||||||
/**
|
/**
|
||||||
* The template used for displaying page content in a vertical layout
|
* The template used for displaying page content in a vertical layout
|
||||||
* The template modifies Article's ID by using post's slug to lower case as anchor point.
|
* The template modifies Article's ID by using post's slug to lower case as anchor point.
|
||||||
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
|
?>
|
||||||
<?php global $post ?>
|
<?php global $post ?>
|
||||||
|
|
||||||
<article <?php post_class(); ?> id="<?php echo strtolower( $post->post_title ); ?>">
|
<article <?php post_class(); ?> id="<?php echo esc_html( strtolower( $post->post_title ) ); ?>">
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
|
|
||||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||||
|
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_link_pages( array(
|
wp_link_pages( array(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
'after' => '</div>',
|
'after' => '</div>',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
|
|
||||||
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -1,46 +1,50 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
|
* Post rendering content according to caller of get_template_part.
|
||||||
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
|
|
||||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ),
|
||||||
|
'</a></h2>' ); ?>
|
||||||
|
|
||||||
<?php if ( 'post' == get_post_type() ) : ?>
|
<?php if ( 'post' == get_post_type() ) : ?>
|
||||||
|
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<?php understrap_posted_on(); ?>
|
<?php understrap_posted_on(); ?>
|
||||||
</div><!-- .entry-meta -->
|
</div><!-- .entry-meta -->
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
the_excerpt();
|
the_excerpt();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_link_pages( array(
|
wp_link_pages( array(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
'after' => '</div>',
|
'after' => '</div>',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
|
|
||||||
<?php understrap_entry_footer(); ?>
|
<?php understrap_entry_footer(); ?>
|
||||||
|
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
Reference in New Issue