Merge pull request #856 from IanDelMar/wpcs
Fix formatting issues - wow...thx @IanDelMar !
This commit is contained in:
commit
b9fc5ef0e1
16
404.php
16
404.php
|
@ -28,15 +28,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
|
|
||||||
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can’t be found.',
|
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can’t be found.', 'understrap' ); ?></h1>
|
||||||
'understrap' ); ?></h1>
|
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?',
|
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'understrap' ); ?></p>
|
||||||
'understrap' ); ?></p>
|
|
||||||
|
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
|
|
||||||
|
@ -50,13 +48,15 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
wp_list_categories( array(
|
wp_list_categories(
|
||||||
|
array(
|
||||||
'orderby' => 'count',
|
'orderby' => 'count',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'show_count' => 1,
|
'show_count' => 1,
|
||||||
'title_li' => '',
|
'title_li' => '',
|
||||||
'number' => 10,
|
'number' => 10,
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #error-404-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -12,9 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -69,8 +67,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div> <!-- .row -->
|
</div> <!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #archive-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
37
author.php
37
author.php
|
@ -15,7 +15,6 @@ get_header();
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class="wrapper" id="author-wrapper">
|
<div class="wrapper" id="author-wrapper">
|
||||||
|
|
||||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||||
|
@ -30,16 +29,20 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<header class="page-header author-header">
|
<header class="page-header author-header">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$curauth = ( isset( $_GET['author_name'] ) ) ? get_user_by( 'slug',
|
if ( isset( $_GET['author_name'] ) ) {
|
||||||
$author_name ) : get_userdata( intval( $author ) );
|
$curauth = get_user_by( 'slug', $author_name );
|
||||||
|
} else {
|
||||||
|
$curauth = get_userdata( intval( $author ) );
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1><?php esc_html_e( 'About:', 'understrap' ); ?><?php echo esc_html( $curauth->nickname ); ?></h1>
|
<h1><?php echo esc_html__( 'About:', 'understrap' ) . ' ' . esc_html( $curauth->nickname ); ?></h1>
|
||||||
|
|
||||||
<?php if ( ! empty( $curauth->ID ) ) : ?>
|
<?php if ( ! empty( $curauth->ID ) ) : ?>
|
||||||
<?php echo get_avatar( $curauth->ID ); ?>
|
<?php echo get_avatar( $curauth->ID ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( ! empty( $curauth->user_url ) || ! empty( $curauth->user_description ) ) : ?>
|
||||||
<dl>
|
<dl>
|
||||||
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
||||||
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
||||||
|
@ -50,12 +53,12 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<?php if ( ! empty( $curauth->user_description ) ) : ?>
|
<?php if ( ! empty( $curauth->user_description ) ) : ?>
|
||||||
<dt><?php esc_html_e( 'Profile', 'understrap' ); ?></dt>
|
<dt><?php esc_html_e( 'Profile', 'understrap' ); ?></dt>
|
||||||
<dd><?php echo esc_html( $curauth->user_description ); ?></dd>
|
<dd><?php esc_html_e( $curauth->user_description ); ?></dd>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dl>
|
</dl>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<h2><?php esc_html_e( 'Posts by', 'understrap' ); ?> <?php echo esc_html( $curauth->nickname ); ?>
|
<h2><?php echo esc_html( 'Posts by', 'understrap' ) . ' ' . esc_html( $curauth->nickname ); ?>:</h2>
|
||||||
:</h2>
|
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
@ -65,11 +68,17 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
<li>
|
<li>
|
||||||
<a rel="bookmark" href="<?php the_permalink() ?>"
|
<?php
|
||||||
title="<?php esc_html_e( 'Permanent Link:', 'understrap' ); ?> <?php the_title(); ?>">
|
printf(
|
||||||
<?php the_title(); ?></a>,
|
'<a rel="bookmark" href="%1$s" title="%2$s %3$s">%3$s</a>',
|
||||||
<?php understrap_posted_on(); ?> <?php esc_html_e( 'in',
|
esc_url( apply_filters( 'the_permalink', get_permalink( $post ), $post ) ),
|
||||||
'understrap' ); ?> <?php the_category( '&' ); ?>
|
esc_attr( __( 'Permanent Link:', 'understrap' ) ),
|
||||||
|
the_title( '', '', false )
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php understrap_posted_on(); ?>
|
||||||
|
<?php esc_html_e( 'in', 'understrap' ); ?>
|
||||||
|
<?php the_category( '&' ); ?>
|
||||||
</li>
|
</li>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
@ -93,8 +102,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div> <!-- .row -->
|
</div> <!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #author-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
36
comments.php
36
comments.php
|
@ -63,12 +63,15 @@ if ( post_password_required() ) {
|
||||||
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'understrap' ); ?></h1>
|
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||||
|
|
||||||
<?php if ( get_previous_comments_link() ) { ?>
|
<?php if ( get_previous_comments_link() ) { ?>
|
||||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
<div class="nav-previous">
|
||||||
'understrap' ) ); ?></div>
|
<?php previous_comments_link( __( '← Older Comments', 'understrap' ) ); ?>
|
||||||
<?php }
|
</div>
|
||||||
if ( get_next_comments_link() ) { ?>
|
<?php } ?>
|
||||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
|
||||||
'understrap' ) ); ?></div>
|
<?php if ( get_next_comments_link() ) { ?>
|
||||||
|
<div class="nav-next">
|
||||||
|
<?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?>
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</nav><!-- #comment-nav-above -->
|
</nav><!-- #comment-nav-above -->
|
||||||
|
@ -78,10 +81,12 @@ if ( post_password_required() ) {
|
||||||
<ol class="comment-list">
|
<ol class="comment-list">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_list_comments( array(
|
wp_list_comments(
|
||||||
|
array(
|
||||||
'style' => 'ol',
|
'style' => 'ol',
|
||||||
'short_ping' => true,
|
'short_ping' => true,
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</ol><!-- .comment-list -->
|
</ol><!-- .comment-list -->
|
||||||
|
@ -93,12 +98,15 @@ if ( post_password_required() ) {
|
||||||
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'understrap' ); ?></h1>
|
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||||
|
|
||||||
<?php if ( get_previous_comments_link() ) { ?>
|
<?php if ( get_previous_comments_link() ) { ?>
|
||||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
<div class="nav-previous">
|
||||||
'understrap' ) ); ?></div>
|
<?php previous_comments_link( __( '← Older Comments', 'understrap' ) ); ?>
|
||||||
<?php }
|
</div>
|
||||||
if ( get_next_comments_link() ) { ?>
|
<?php } ?>
|
||||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
|
||||||
'understrap' ) ); ?></div>
|
<?php if ( get_next_comments_link() ) { ?>
|
||||||
|
<div class="nav-next">
|
||||||
|
<?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?>
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</nav><!-- #comment-nav-below -->
|
</nav><!-- #comment-nav-below -->
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly.
|
exit; // Exit if accessed directly.
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -31,19 +31,27 @@ if ( ! function_exists ( 'understrap_custom_header_setup' ) ) {
|
||||||
* @type string $flex-height Flex support for height of header.
|
* @type string $flex-height Flex support for height of header.
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
add_theme_support( 'custom-header', apply_filters( 'understrap_custom_header_args', array(
|
add_theme_support(
|
||||||
|
'custom-header',
|
||||||
|
apply_filters(
|
||||||
|
'understrap_custom_header_args',
|
||||||
|
array(
|
||||||
'default-image' => get_parent_theme_file_uri( '/img/header.jpg' ),
|
'default-image' => get_parent_theme_file_uri( '/img/header.jpg' ),
|
||||||
'width' => 2000,
|
'width' => 2000,
|
||||||
'height' => 1200,
|
'height' => 1200,
|
||||||
'flex-height' => true,
|
'flex-height' => true,
|
||||||
) ) );
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
register_default_headers( array(
|
register_default_headers(
|
||||||
|
array(
|
||||||
'default-image' => array(
|
'default-image' => array(
|
||||||
'url' => '%s/img/header.jpg',
|
'url' => '%s/img/header.jpg',
|
||||||
'thumbnail_url' => '%s/img/header.jpg',
|
'thumbnail_url' => '%s/img/header.jpg',
|
||||||
'description' => __( 'Default Header Image', 'understrap' ),
|
'description' => __( 'Default Header Image', 'understrap' ),
|
||||||
),
|
),
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -37,12 +37,15 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
function understrap_theme_customize_register( $wp_customize ) {
|
function understrap_theme_customize_register( $wp_customize ) {
|
||||||
|
|
||||||
// Theme layout settings.
|
// Theme layout settings.
|
||||||
$wp_customize->add_section( 'understrap_theme_layout_options', array(
|
$wp_customize->add_section(
|
||||||
|
'understrap_theme_layout_options',
|
||||||
|
array(
|
||||||
'title' => __( 'Theme Layout Settings', 'understrap' ),
|
'title' => __( 'Theme Layout Settings', 'understrap' ),
|
||||||
'capability' => 'edit_theme_options',
|
'capability' => 'edit_theme_options',
|
||||||
'description' => __( 'Container width and sidebar defaults', 'understrap' ),
|
'description' => __( 'Container width and sidebar defaults', 'understrap' ),
|
||||||
'priority' => 160,
|
'priority' => 160,
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select sanitization function
|
* Select sanitization function
|
||||||
|
@ -64,17 +67,21 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$wp_customize->add_setting( 'understrap_container_type', array(
|
$wp_customize->add_setting(
|
||||||
|
'understrap_container_type',
|
||||||
|
array(
|
||||||
'default' => 'container',
|
'default' => 'container',
|
||||||
'type' => 'theme_mod',
|
'type' => 'theme_mod',
|
||||||
'sanitize_callback' => 'understrap_theme_slug_sanitize_select',
|
'sanitize_callback' => 'understrap_theme_slug_sanitize_select',
|
||||||
'capability' => 'edit_theme_options',
|
'capability' => 'edit_theme_options',
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$wp_customize->add_control(
|
$wp_customize->add_control(
|
||||||
new WP_Customize_Control(
|
new WP_Customize_Control(
|
||||||
$wp_customize,
|
$wp_customize,
|
||||||
'understrap_container_type', array(
|
'understrap_container_type',
|
||||||
|
array(
|
||||||
'label' => __( 'Container Width', 'understrap' ),
|
'label' => __( 'Container Width', 'understrap' ),
|
||||||
'description' => __( 'Choose between Bootstrap\'s container and container-fluid', 'understrap' ),
|
'description' => __( 'Choose between Bootstrap\'s container and container-fluid', 'understrap' ),
|
||||||
'section' => 'understrap_theme_layout_options',
|
'section' => 'understrap_theme_layout_options',
|
||||||
|
@ -86,22 +93,29 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
),
|
),
|
||||||
'priority' => '10',
|
'priority' => '10',
|
||||||
)
|
)
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$wp_customize->add_setting( 'understrap_sidebar_position', array(
|
$wp_customize->add_setting(
|
||||||
|
'understrap_sidebar_position',
|
||||||
|
array(
|
||||||
'default' => 'right',
|
'default' => 'right',
|
||||||
'type' => 'theme_mod',
|
'type' => 'theme_mod',
|
||||||
'sanitize_callback' => 'sanitize_text_field',
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
'capability' => 'edit_theme_options',
|
'capability' => 'edit_theme_options',
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$wp_customize->add_control(
|
$wp_customize->add_control(
|
||||||
new WP_Customize_Control(
|
new WP_Customize_Control(
|
||||||
$wp_customize,
|
$wp_customize,
|
||||||
'understrap_sidebar_position', array(
|
'understrap_sidebar_position',
|
||||||
|
array(
|
||||||
'label' => __( 'Sidebar Positioning', 'understrap' ),
|
'label' => __( 'Sidebar Positioning', 'understrap' ),
|
||||||
'description' => __( 'Set sidebar\'s default position. Can either be: right, left, both or none. Note: this can be overridden on individual pages.',
|
'description' => __(
|
||||||
'understrap' ),
|
'Set sidebar\'s default position. Can either be: right, left, both or none. Note: this can be overridden on individual pages.',
|
||||||
|
'understrap'
|
||||||
|
),
|
||||||
'section' => 'understrap_theme_layout_options',
|
'section' => 'understrap_theme_layout_options',
|
||||||
'settings' => 'understrap_sidebar_position',
|
'settings' => 'understrap_sidebar_position',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
|
@ -114,7 +128,8 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
),
|
),
|
||||||
'priority' => '20',
|
'priority' => '20',
|
||||||
)
|
)
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} // endif function_exists( 'understrap_theme_customize_register' ).
|
} // endif function_exists( 'understrap_theme_customize_register' ).
|
||||||
add_action( 'customize_register', 'understrap_theme_customize_register' );
|
add_action( 'customize_register', 'understrap_theme_customize_register' );
|
||||||
|
@ -127,8 +142,12 @@ if ( ! function_exists( 'understrap_customize_preview_js' ) ) {
|
||||||
* Setup JS integration for live previewing.
|
* Setup JS integration for live previewing.
|
||||||
*/
|
*/
|
||||||
function understrap_customize_preview_js() {
|
function understrap_customize_preview_js() {
|
||||||
wp_enqueue_script( 'understrap_customizer', get_template_directory_uri() . '/js/customizer.js',
|
wp_enqueue_script(
|
||||||
array( 'customize-preview' ), '20130508', true
|
'understrap_customizer',
|
||||||
|
get_template_directory_uri() . '/js/customizer.js',
|
||||||
|
array( 'customize-preview' ),
|
||||||
|
'20130508',
|
||||||
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,28 +43,28 @@ if ( ! function_exists ( 'understrap_tiny_mce_before_init' ) ) {
|
||||||
'title' => 'Lead Paragraph',
|
'title' => 'Lead Paragraph',
|
||||||
'selector' => 'p',
|
'selector' => 'p',
|
||||||
'classes' => 'lead',
|
'classes' => 'lead',
|
||||||
'wrapper' => true
|
'wrapper' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Small',
|
'title' => 'Small',
|
||||||
'inline' => 'small'
|
'inline' => 'small',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Blockquote',
|
'title' => 'Blockquote',
|
||||||
'block' => 'blockquote',
|
'block' => 'blockquote',
|
||||||
'classes' => 'blockquote',
|
'classes' => 'blockquote',
|
||||||
'wrapper' => true
|
'wrapper' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Blockquote Footer',
|
'title' => 'Blockquote Footer',
|
||||||
'block' => 'footer',
|
'block' => 'footer',
|
||||||
'classes' => 'blockquote-footer',
|
'classes' => 'blockquote-footer',
|
||||||
'wrapper' => true
|
'wrapper' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Cite',
|
'title' => 'Cite',
|
||||||
'inline' => 'cite'
|
'inline' => 'cite',
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( isset( $settings['style_formats'] ) ) {
|
if ( isset( $settings['style_formats'] ) ) {
|
||||||
|
|
|
@ -32,15 +32,19 @@ if ( ! function_exists( 'understrap_add_site_info' ) ) {
|
||||||
esc_url( __( 'http://wordpress.org/', 'understrap' ) ),
|
esc_url( __( 'http://wordpress.org/', 'understrap' ) ),
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators:*/
|
/* translators:*/
|
||||||
esc_html__( 'Proudly powered by %s', 'understrap' ), 'WordPress'
|
esc_html__( 'Proudly powered by %s', 'understrap' ),
|
||||||
|
'WordPress'
|
||||||
),
|
),
|
||||||
sprintf( // WPCS: XSS ok.
|
sprintf( // WPCS: XSS ok.
|
||||||
/* translators:*/
|
/* translators:*/
|
||||||
esc_html__( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href="' . esc_url( __( 'http://understrap.com', 'understrap' ) ) . '">understrap.com</a>'
|
esc_html__( 'Theme: %1$s by %2$s.', 'understrap' ),
|
||||||
|
$the_theme->get( 'Name' ),
|
||||||
|
'<a href="' . esc_url( __( 'http://understrap.com', 'understrap' ) ) . '">understrap.com</a>'
|
||||||
),
|
),
|
||||||
sprintf( // WPCS: XSS ok.
|
sprintf( // WPCS: XSS ok.
|
||||||
/* translators:*/
|
/* translators:*/
|
||||||
esc_html__( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' )
|
esc_html__( 'Version: %1$s', 'understrap' ),
|
||||||
|
$the_theme->get( 'Version' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,14 @@ add_action( 'after_setup_theme', 'understrap_components_jetpack_setup' );
|
||||||
if ( ! function_exists( 'understrap_components_jetpack_setup' ) ) {
|
if ( ! function_exists( 'understrap_components_jetpack_setup' ) ) {
|
||||||
function understrap_components_jetpack_setup() {
|
function understrap_components_jetpack_setup() {
|
||||||
// Add theme support for Infinite Scroll.
|
// Add theme support for Infinite Scroll.
|
||||||
add_theme_support( 'infinite-scroll', array(
|
add_theme_support(
|
||||||
|
'infinite-scroll',
|
||||||
|
array(
|
||||||
'container' => 'main',
|
'container' => 'main',
|
||||||
'render' => 'understrap_components_infinite_scroll_render',
|
'render' => 'understrap_components_infinite_scroll_render',
|
||||||
'footer' => 'page',
|
'footer' => 'page',
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Add theme support for Responsive Videos.
|
// Add theme support for Responsive Videos.
|
||||||
add_theme_support( 'jetpack-responsive-videos' );
|
add_theme_support( 'jetpack-responsive-videos' );
|
||||||
|
|
|
@ -13,9 +13,13 @@ if ( ! function_exists ( 'understrap_pagination' ) ) {
|
||||||
|
|
||||||
function understrap_pagination( $args = array(), $class = 'pagination' ) {
|
function understrap_pagination( $args = array(), $class = 'pagination' ) {
|
||||||
|
|
||||||
if ($GLOBALS['wp_query']->max_num_pages <= 1) return;
|
if ( $GLOBALS['wp_query']->max_num_pages <= 1 ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$args = wp_parse_args( $args, array(
|
$args = wp_parse_args(
|
||||||
|
$args,
|
||||||
|
array(
|
||||||
'mid_size' => 2,
|
'mid_size' => 2,
|
||||||
'prev_next' => true,
|
'prev_next' => true,
|
||||||
'prev_text' => __( '«', 'understrap' ),
|
'prev_text' => __( '«', 'understrap' ),
|
||||||
|
@ -23,7 +27,8 @@ if ( ! function_exists ( 'understrap_pagination' ) ) {
|
||||||
'screen_reader_text' => __( 'Posts navigation', 'understrap' ),
|
'screen_reader_text' => __( 'Posts navigation', 'understrap' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'current' => max( 1, get_query_var( 'paged' ) ),
|
'current' => max( 1, get_query_var( 'paged' ) ),
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$links = paginate_links( $args );
|
$links = paginate_links( $args );
|
||||||
|
|
||||||
|
@ -34,16 +39,14 @@ if ( ! function_exists ( 'understrap_pagination' ) ) {
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
foreach ( $links as $key => $link ) {
|
||||||
foreach ( $links as $key => $link ) { ?>
|
?>
|
||||||
|
<li class="page-item <?php echo strpos( $link, 'current' ) ? 'active' : ''; ?>">
|
||||||
<li class="page-item <?php echo strpos( $link, 'current' ) ? 'active' : '' ?>">
|
|
||||||
|
|
||||||
<?php echo str_replace( 'page-numbers', 'page-link', $link ); ?>
|
<?php echo str_replace( 'page-numbers', 'page-link', $link ); ?>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
<?php
|
||||||
<?php } ?>
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
* Check and setup theme's default settings
|
* Check and setup theme's default settings
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ if ( ! function_exists( 'understrap_woocommerce_support' ) ) {
|
||||||
function understrap_woocommerce_support() {
|
function understrap_woocommerce_support() {
|
||||||
add_theme_support( 'woocommerce' );
|
add_theme_support( 'woocommerce' );
|
||||||
|
|
||||||
// Add New Woocommerce 3.0.0 Product Gallery support
|
// Add New Woocommerce 3.0.0 Product Gallery support.
|
||||||
add_theme_support( 'wc-product-gallery-lightbox' );
|
add_theme_support( 'wc-product-gallery-lightbox' );
|
||||||
add_theme_support( 'wc-product-gallery-zoom' );
|
add_theme_support( 'wc-product-gallery-zoom' );
|
||||||
add_theme_support( 'wc-product-gallery-slider' );
|
add_theme_support( 'wc-product-gallery-slider' );
|
||||||
|
|
|
@ -67,11 +67,10 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php get_template_part( 'global-templates/right-sidebar-check' ); ?>
|
<?php get_template_part( 'global-templates/right-sidebar-check' ); ?>
|
||||||
|
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #index-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -25,10 +25,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
<?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 -->
|
||||||
|
|
|
@ -14,8 +14,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<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() ) ),
|
<?php
|
||||||
'</a></h2>' ); ?>
|
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() ) : ?>
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
<?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 -->
|
||||||
|
|
|
@ -14,8 +14,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<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() ) ),
|
<?php
|
||||||
'</a></h2>' ); ?>
|
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() ) : ?>
|
||||||
|
|
||||||
|
@ -31,15 +35,15 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<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 -->
|
||||||
|
|
|
@ -54,8 +54,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- page-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -14,7 +14,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
while ( have_posts() ) : the_post();
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
get_template_part( 'loop-templates/content', 'empty' );
|
get_template_part( 'loop-templates/content', 'empty' );
|
||||||
endwhile;
|
endwhile;
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template.
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
if ( comments_open() || get_comments_number() ) :
|
if ( comments_open() || get_comments_number() ) :
|
||||||
|
|
||||||
comments_template();
|
comments_template();
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -46,8 +44,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- .row end -->
|
</div><!-- .row end -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #full-width-page-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
4
page.php
4
page.php
|
@ -51,8 +51,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #page-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
15
search.php
15
search.php
|
@ -30,10 +30,15 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
|
|
||||||
<h1 class="page-title"><?php printf(
|
<h1 class="page-title">
|
||||||
/* translators:*/
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: %s: query term */
|
||||||
esc_html__( 'Search Results for: %s', 'understrap' ),
|
esc_html__( 'Search Results for: %s', 'understrap' ),
|
||||||
'<span>' . get_search_query() . '</span>' ); ?></h1>
|
'<span>' . get_search_query() . '</span>'
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</h1>
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
@ -67,8 +72,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #search-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying search forms in Underscores.me
|
* The template for displaying search forms
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly.
|
exit; // Exit if accessed directly.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( is_active_sidebar( 'statichero' ) ) : ?>
|
<?php if ( is_active_sidebar( 'statichero' ) ) : ?>
|
||||||
|
|
|
@ -46,8 +46,8 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- #content -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- #single-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
Reference in New Issue