Merge pull request #856 from IanDelMar/wpcs
Fix formatting issues - wow...thx @IanDelMar !
This commit is contained in:
commit
b9fc5ef0e1
28
404.php
28
404.php
|
@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper" id="error-404-wrapper">
|
<div class="wrapper" id="error-404-wrapper">
|
||||||
|
@ -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(
|
||||||
'orderby' => 'count',
|
array(
|
||||||
'order' => 'DESC',
|
'orderby' => 'count',
|
||||||
'show_count' => 1,
|
'order' => 'DESC',
|
||||||
'title_li' => '',
|
'show_count' => 1,
|
||||||
'number' => 10,
|
'title_li' => '',
|
||||||
) );
|
'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(); ?>
|
||||||
|
|
14
archive.php
14
archive.php
|
@ -12,10 +12,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper" id="archive-wrapper">
|
<div class="wrapper" id="archive-wrapper">
|
||||||
|
@ -64,13 +62,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<!-- The pagination component -->
|
<!-- The pagination component -->
|
||||||
<?php understrap_pagination(); ?>
|
<?php understrap_pagination(); ?>
|
||||||
|
|
||||||
<!-- 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><!-- #archive-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
67
author.php
67
author.php
|
@ -12,10 +12,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_header();
|
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,32 +29,36 @@ $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; ?>
|
||||||
|
|
||||||
<dl>
|
<?php if ( ! empty( $curauth->user_url ) || ! empty( $curauth->user_description ) ) : ?>
|
||||||
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
<dl>
|
||||||
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
||||||
<dd>
|
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
||||||
<a href="<?php echo esc_url( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
|
<dd>
|
||||||
</dd>
|
<a href="<?php echo esc_url( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
|
||||||
<?php endif; ?>
|
</dd>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?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; ?>
|
||||||
|
|
||||||
|
@ -88,13 +97,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<!-- The pagination component -->
|
<!-- The pagination component -->
|
||||||
<?php understrap_pagination(); ?>
|
<?php understrap_pagination(); ?>
|
||||||
|
|
||||||
<!-- 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><!-- #author-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
98
comments.php
98
comments.php
|
@ -29,46 +29,49 @@ if ( post_password_required() ) {
|
||||||
<?php if ( have_comments() ) : ?>
|
<?php if ( have_comments() ) : ?>
|
||||||
|
|
||||||
<h2 class="comments-title">
|
<h2 class="comments-title">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$comments_number = get_comments_number();
|
$comments_number = get_comments_number();
|
||||||
if ( 1 === (int)$comments_number ) {
|
if ( 1 === (int) $comments_number ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: post title */
|
/* translators: %s: post title */
|
||||||
esc_html_x( 'One thought on “%s”', 'comments title', 'understrap' ),
|
esc_html_x( 'One thought on “%s”', 'comments title', 'understrap' ),
|
||||||
'<span>' . get_the_title() . '</span>'
|
'<span>' . get_the_title() . '</span>'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf( // WPCS: XSS OK.
|
printf( // WPCS: XSS OK.
|
||||||
/* translators: 1: number of comments, 2: post title */
|
/* translators: 1: number of comments, 2: post title */
|
||||||
esc_html( _nx(
|
esc_html( _nx(
|
||||||
'%1$s thought on “%2$s”',
|
'%1$s thought on “%2$s”',
|
||||||
'%1$s thoughts on “%2$s”',
|
'%1$s thoughts on “%2$s”',
|
||||||
$comments_number,
|
$comments_number,
|
||||||
'comments title',
|
'comments title',
|
||||||
'understrap'
|
'understrap'
|
||||||
) ),
|
) ),
|
||||||
number_format_i18n( $comments_number ),
|
number_format_i18n( $comments_number ),
|
||||||
'<span>' . get_the_title() . '</span>'
|
'<span>' . get_the_title() . '</span>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</h2><!-- .comments-title -->
|
</h2><!-- .comments-title -->
|
||||||
|
|
||||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
|
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
|
||||||
|
|
||||||
<nav class="comment-navigation" id="comment-nav-above">
|
<nav class="comment-navigation" id="comment-nav-above">
|
||||||
|
|
||||||
<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,31 +81,36 @@ if ( post_password_required() ) {
|
||||||
<ol class="comment-list">
|
<ol class="comment-list">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_list_comments( array(
|
wp_list_comments(
|
||||||
'style' => 'ol',
|
array(
|
||||||
'short_ping' => true,
|
'style' => 'ol',
|
||||||
) );
|
'short_ping' => true,
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</ol><!-- .comment-list -->
|
</ol><!-- .comment-list -->
|
||||||
|
|
||||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
|
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
|
||||||
|
|
||||||
<nav class="comment-navigation" id="comment-nav-below">
|
<nav class="comment-navigation" id="comment-nav-below">
|
||||||
|
|
||||||
<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 -->
|
||||||
|
|
||||||
<?php endif; // check for comment navigation. ?>
|
<?php endif; // check for comment navigation. ?>
|
||||||
|
|
||||||
<?php endif; // endif have_comments(). ?>
|
<?php endif; // endif have_comments(). ?>
|
||||||
|
|
|
@ -13,9 +13,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
<?php if ( is_active_sidebar( 'hero' ) || is_active_sidebar( 'statichero' ) || is_active_sidebar( 'herocanvas' ) ) : ?>
|
<?php if ( is_active_sidebar( 'hero' ) || is_active_sidebar( 'statichero' ) || is_active_sidebar( 'herocanvas' ) ) : ?>
|
||||||
|
|
||||||
<div class="wrapper" id="wrapper-hero">
|
<div class="wrapper" id="wrapper-hero">
|
||||||
|
|
||||||
<?php get_template_part( 'sidebar-templates/sidebar', 'hero' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'hero' ); ?>
|
||||||
|
|
||||||
<?php get_template_part( 'sidebar-templates/sidebar', 'herocanvas' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'herocanvas' ); ?>
|
||||||
|
|
||||||
<?php get_template_part( 'sidebar-templates/sidebar', 'statichero' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'statichero' ); ?>
|
||||||
|
|
|
@ -8,14 +8,12 @@
|
||||||
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' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
<?php get_template_part( 'sidebar-templates/sidebar', 'left' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'left' ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="col-md content-area" id="primary">
|
<div class="col-md content-area" id="primary">
|
||||||
|
|
|
@ -16,6 +16,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
add_action( 'after_setup_theme', 'understrap_custom_header_setup' );
|
add_action( 'after_setup_theme', 'understrap_custom_header_setup' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_custom_header_setup' ) ) {
|
if ( ! function_exists( 'understrap_custom_header_setup' ) ) {
|
||||||
function understrap_custom_header_setup() {
|
function understrap_custom_header_setup() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,28 +22,36 @@ if ( ! function_exists ( 'understrap_custom_header_setup' ) ) {
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* An array of custom-header support arguments.
|
* An array of custom-header support arguments.
|
||||||
*
|
*
|
||||||
* @type string $default-image Default image of the header.
|
* @type string $default-image Default image of the header.
|
||||||
* @type string $default_text_color Default color of the header text.
|
* @type string $default_text_color Default color of the header text.
|
||||||
* @type int $width Width in pixels of the custom header image. Default 954.
|
* @type int $width Width in pixels of the custom header image. Default 954.
|
||||||
* @type int $height Height in pixels of the custom header image. Default 1300.
|
* @type int $height Height in pixels of the custom header image. Default 1300.
|
||||||
* @type string $wp-head-callback Callback function used to styles the header image and text
|
* @type string $wp-head-callback Callback function used to styles the header image and text
|
||||||
* displayed on the blog.
|
* displayed on the blog.
|
||||||
* @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(
|
||||||
'default-image' => get_parent_theme_file_uri( '/img/header.jpg' ),
|
'custom-header',
|
||||||
'width' => 2000,
|
apply_filters(
|
||||||
'height' => 1200,
|
'understrap_custom_header_args',
|
||||||
'flex-height' => true,
|
array(
|
||||||
) ) );
|
'default-image' => get_parent_theme_file_uri( '/img/header.jpg' ),
|
||||||
|
'width' => 2000,
|
||||||
|
'height' => 1200,
|
||||||
|
'flex-height' => true,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
register_default_headers( array(
|
register_default_headers(
|
||||||
'default-image' => array(
|
array(
|
||||||
'url' => '%s/img/header.jpg',
|
'default-image' => array(
|
||||||
'thumbnail_url' => '%s/img/header.jpg',
|
'url' => '%s/img/header.jpg',
|
||||||
'description' => __( 'Default Header Image', 'understrap' ),
|
'thumbnail_url' => '%s/img/header.jpg',
|
||||||
),
|
'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(
|
||||||
'title' => __( 'Theme Layout Settings', 'understrap' ),
|
'understrap_theme_layout_options',
|
||||||
'capability' => 'edit_theme_options',
|
array(
|
||||||
'description' => __( 'Container width and sidebar defaults', 'understrap' ),
|
'title' => __( 'Theme Layout Settings', 'understrap' ),
|
||||||
'priority' => 160,
|
'capability' => 'edit_theme_options',
|
||||||
) );
|
'description' => __( 'Container width and sidebar defaults', 'understrap' ),
|
||||||
|
'priority' => 160,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select sanitization function
|
* Select sanitization function
|
||||||
|
@ -51,30 +54,34 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
* @param WP_Customize_Setting $setting Setting instance.
|
* @param WP_Customize_Setting $setting Setting instance.
|
||||||
* @return string Sanitized slug if it is a valid choice; otherwise, the setting default.
|
* @return string Sanitized slug if it is a valid choice; otherwise, the setting default.
|
||||||
*/
|
*/
|
||||||
function understrap_theme_slug_sanitize_select( $input, $setting ){
|
function understrap_theme_slug_sanitize_select( $input, $setting ) {
|
||||||
|
|
||||||
// Ensure input is a slug (lowercase alphanumeric characters, dashes and underscores are allowed only).
|
// Ensure input is a slug (lowercase alphanumeric characters, dashes and underscores are allowed only).
|
||||||
$input = sanitize_key( $input );
|
$input = sanitize_key( $input );
|
||||||
|
|
||||||
// Get the list of possible select options.
|
// Get the list of possible select options.
|
||||||
$choices = $setting->manager->get_control( $setting->id )->choices;
|
$choices = $setting->manager->get_control( $setting->id )->choices;
|
||||||
|
|
||||||
// If the input is a valid key, return it; otherwise, return the default.
|
// If the input is a valid key, return it; otherwise, return the default.
|
||||||
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
|
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$wp_customize->add_setting( 'understrap_container_type', array(
|
$wp_customize->add_setting(
|
||||||
'default' => 'container',
|
'understrap_container_type',
|
||||||
'type' => 'theme_mod',
|
array(
|
||||||
'sanitize_callback' => 'understrap_theme_slug_sanitize_select',
|
'default' => 'container',
|
||||||
'capability' => 'edit_theme_options',
|
'type' => 'theme_mod',
|
||||||
) );
|
'sanitize_callback' => 'understrap_theme_slug_sanitize_select',
|
||||||
|
'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,35 +93,43 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
),
|
),
|
||||||
'priority' => '10',
|
'priority' => '10',
|
||||||
)
|
)
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$wp_customize->add_setting( 'understrap_sidebar_position', array(
|
$wp_customize->add_setting(
|
||||||
'default' => 'right',
|
'understrap_sidebar_position',
|
||||||
'type' => 'theme_mod',
|
array(
|
||||||
'sanitize_callback' => 'sanitize_text_field',
|
'default' => 'right',
|
||||||
'capability' => 'edit_theme_options',
|
'type' => 'theme_mod',
|
||||||
) );
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
'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',
|
||||||
'label' => __( 'Sidebar Positioning', 'understrap' ),
|
array(
|
||||||
'description' => __( 'Set sidebar\'s default position. Can either be: right, left, both or none. Note: this can be overridden on individual pages.',
|
'label' => __( 'Sidebar Positioning', 'understrap' ),
|
||||||
'understrap' ),
|
'description' => __(
|
||||||
'section' => 'understrap_theme_layout_options',
|
'Set sidebar\'s default position. Can either be: right, left, both or none. Note: this can be overridden on individual pages.',
|
||||||
'settings' => 'understrap_sidebar_position',
|
'understrap'
|
||||||
'type' => 'select',
|
),
|
||||||
|
'section' => 'understrap_theme_layout_options',
|
||||||
|
'settings' => 'understrap_sidebar_position',
|
||||||
|
'type' => 'select',
|
||||||
'sanitize_callback' => 'understrap_theme_slug_sanitize_select',
|
'sanitize_callback' => 'understrap_theme_slug_sanitize_select',
|
||||||
'choices' => array(
|
'choices' => array(
|
||||||
'right' => __( 'Right sidebar', 'understrap' ),
|
'right' => __( 'Right sidebar', 'understrap' ),
|
||||||
'left' => __( 'Left sidebar', 'understrap' ),
|
'left' => __( 'Left sidebar', 'understrap' ),
|
||||||
'both' => __( 'Left & Right sidebars', 'understrap' ),
|
'both' => __( 'Left & Right sidebars', 'understrap' ),
|
||||||
'none' => __( 'No sidebar', 'understrap' ),
|
'none' => __( 'No sidebar', 'understrap' ),
|
||||||
),
|
),
|
||||||
'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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,64 +15,64 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
add_action( 'admin_init', 'understrap_wpdocs_theme_add_editor_styles' );
|
add_action( 'admin_init', 'understrap_wpdocs_theme_add_editor_styles' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_wpdocs_theme_add_editor_styles' ) ) {
|
if ( ! function_exists( 'understrap_wpdocs_theme_add_editor_styles' ) ) {
|
||||||
function understrap_wpdocs_theme_add_editor_styles() {
|
function understrap_wpdocs_theme_add_editor_styles() {
|
||||||
add_editor_style( 'css/custom-editor-style.min.css' );
|
add_editor_style( 'css/custom-editor-style.min.css' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add TinyMCE style formats.
|
// Add TinyMCE style formats.
|
||||||
add_filter( 'mce_buttons_2', 'understrap_tiny_mce_style_formats' );
|
add_filter( 'mce_buttons_2', 'understrap_tiny_mce_style_formats' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_tiny_mce_style_formats' ) ) {
|
if ( ! function_exists( 'understrap_tiny_mce_style_formats' ) ) {
|
||||||
function understrap_tiny_mce_style_formats( $styles ) {
|
function understrap_tiny_mce_style_formats( $styles ) {
|
||||||
|
|
||||||
array_unshift( $styles, 'styleselect' );
|
array_unshift( $styles, 'styleselect' );
|
||||||
return $styles;
|
return $styles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_filter( 'tiny_mce_before_init', 'understrap_tiny_mce_before_init' );
|
add_filter( 'tiny_mce_before_init', 'understrap_tiny_mce_before_init' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_tiny_mce_before_init' ) ) {
|
if ( ! function_exists( 'understrap_tiny_mce_before_init' ) ) {
|
||||||
function understrap_tiny_mce_before_init( $settings ) {
|
function understrap_tiny_mce_before_init( $settings ) {
|
||||||
|
|
||||||
$style_formats = array(
|
$style_formats = array(
|
||||||
array(
|
array(
|
||||||
'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'] ) ) {
|
|
||||||
$orig_style_formats = json_decode($settings['style_formats'],true);
|
|
||||||
$style_formats = array_merge($orig_style_formats,$style_formats);
|
|
||||||
}
|
|
||||||
|
|
||||||
$settings['style_formats'] = json_encode( $style_formats );
|
if ( isset( $settings['style_formats'] ) ) {
|
||||||
return $settings;
|
$orig_style_formats = json_decode( $settings['style_formats'], true );
|
||||||
}
|
$style_formats = array_merge( $orig_style_formats, $style_formats );
|
||||||
|
}
|
||||||
|
|
||||||
|
$settings['style_formats'] = json_encode( $style_formats );
|
||||||
|
return $settings;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,15 +15,15 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
|
||||||
*/
|
*/
|
||||||
function understrap_scripts() {
|
function understrap_scripts() {
|
||||||
// Get the theme data.
|
// Get the theme data.
|
||||||
$the_theme = wp_get_theme();
|
$the_theme = wp_get_theme();
|
||||||
$theme_version = $the_theme->get( 'Version' );
|
$theme_version = $the_theme->get( 'Version' );
|
||||||
|
|
||||||
$css_version = $theme_version . '.' . filemtime(get_template_directory() . '/css/theme.min.css');
|
$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );
|
||||||
wp_enqueue_style( 'understrap-styles', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), $css_version );
|
wp_enqueue_style( 'understrap-styles', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), $css_version );
|
||||||
|
|
||||||
wp_enqueue_script( 'jquery');
|
wp_enqueue_script( 'jquery' );
|
||||||
|
|
||||||
$js_version = $theme_version . '.' . filemtime(get_template_directory() . '/js/theme.min.js');
|
$js_version = $theme_version . '.' . filemtime( get_template_directory() . '/js/theme.min.js' );
|
||||||
wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . '/js/theme.min.js', array(), $js_version, true );
|
wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . '/js/theme.min.js', array(), $js_version, true );
|
||||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
wp_enqueue_script( 'comment-reply' );
|
wp_enqueue_script( 'comment-reply' );
|
||||||
|
@ -31,4 +31,4 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
|
||||||
}
|
}
|
||||||
} // endif function_exists( 'understrap_scripts' ).
|
} // endif function_exists( 'understrap_scripts' ).
|
||||||
|
|
||||||
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
||||||
|
|
|
@ -10,40 +10,44 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! function_exists( 'understrap_site_info' ) ) {
|
if ( ! function_exists( 'understrap_site_info' ) ) {
|
||||||
/**
|
/**
|
||||||
* Add site info hook to WP hook library.
|
* Add site info hook to WP hook library.
|
||||||
*/
|
*/
|
||||||
function understrap_site_info() {
|
function understrap_site_info() {
|
||||||
do_action( 'understrap_site_info' );
|
do_action( 'understrap_site_info' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! function_exists( 'understrap_add_site_info' ) ) {
|
if ( ! function_exists( 'understrap_add_site_info' ) ) {
|
||||||
add_action( 'understrap_site_info', 'understrap_add_site_info' );
|
add_action( 'understrap_site_info', 'understrap_add_site_info' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add site info content.
|
* Add site info content.
|
||||||
*/
|
*/
|
||||||
function understrap_add_site_info() {
|
function understrap_add_site_info() {
|
||||||
$the_theme = wp_get_theme();
|
$the_theme = wp_get_theme();
|
||||||
|
|
||||||
$site_info = sprintf(
|
|
||||||
'<a href="%1$s">%2$s</a><span class="sep"> | </span>%3$s(%4$s)',
|
|
||||||
esc_url( __( 'http://wordpress.org/', 'understrap' ) ),
|
|
||||||
sprintf(
|
|
||||||
/* translators:*/
|
|
||||||
esc_html__( 'Proudly powered by %s', 'understrap' ), 'WordPress'
|
|
||||||
),
|
|
||||||
sprintf( // WPCS: XSS ok.
|
|
||||||
/* 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>'
|
|
||||||
),
|
|
||||||
sprintf( // WPCS: XSS ok.
|
|
||||||
/* translators:*/
|
|
||||||
esc_html__( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' )
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
echo apply_filters( 'understrap_site_info_content', $site_info ); // WPCS: XSS ok.
|
$site_info = sprintf(
|
||||||
}
|
'<a href="%1$s">%2$s</a><span class="sep"> | </span>%3$s(%4$s)',
|
||||||
|
esc_url( __( 'http://wordpress.org/', 'understrap' ) ),
|
||||||
|
sprintf(
|
||||||
|
/* translators:*/
|
||||||
|
esc_html__( 'Proudly powered by %s', 'understrap' ),
|
||||||
|
'WordPress'
|
||||||
|
),
|
||||||
|
sprintf( // WPCS: XSS ok.
|
||||||
|
/* 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>'
|
||||||
|
),
|
||||||
|
sprintf( // WPCS: XSS ok.
|
||||||
|
/* translators:*/
|
||||||
|
esc_html__( 'Version: %1$s', 'understrap' ),
|
||||||
|
$the_theme->get( 'Version' )
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
echo apply_filters( 'understrap_site_info_content', $site_info ); // WPCS: XSS ok.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,14 +20,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
add_action( 'after_setup_theme', 'understrap_components_jetpack_setup' );
|
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(
|
||||||
'container' => 'main',
|
'infinite-scroll',
|
||||||
'render' => 'understrap_components_infinite_scroll_render',
|
array(
|
||||||
'footer' => 'page',
|
'container' => 'main',
|
||||||
) );
|
'render' => 'understrap_components_infinite_scroll_render',
|
||||||
|
'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' );
|
||||||
|
@ -43,7 +46,7 @@ if ( ! function_exists ( 'understrap_components_jetpack_setup' ) ) {
|
||||||
* Custom render function for Infinite Scroll.
|
* Custom render function for Infinite Scroll.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_components_infinite_scroll_render' ) ) {
|
if ( ! function_exists( 'understrap_components_infinite_scroll_render' ) ) {
|
||||||
function understrap_components_infinite_scroll_render() {
|
function understrap_components_infinite_scroll_render() {
|
||||||
while ( have_posts() ) {
|
while ( have_posts() ) {
|
||||||
the_post();
|
the_post();
|
||||||
|
@ -56,7 +59,7 @@ if ( ! function_exists ( 'understrap_components_infinite_scroll_render' ) ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_components_social_menu' ) ) {
|
if ( ! function_exists( 'understrap_components_social_menu' ) ) {
|
||||||
function understrap_components_social_menu() {
|
function understrap_components_social_menu() {
|
||||||
if ( ! function_exists( 'jetpack_social_menu' ) ) {
|
if ( ! function_exists( 'jetpack_social_menu' ) ) {
|
||||||
return;
|
return;
|
||||||
|
@ -64,4 +67,4 @@ if ( ! function_exists ( 'understrap_components_social_menu' ) ) {
|
||||||
jetpack_social_menu();
|
jetpack_social_menu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,48 +9,51 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly.
|
exit; // Exit if accessed directly.
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_pagination' ) ) {
|
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(
|
||||||
'mid_size' => 2,
|
$args,
|
||||||
'prev_next' => true,
|
array(
|
||||||
'prev_text' => __('«', 'understrap'),
|
'mid_size' => 2,
|
||||||
'next_text' => __('»', 'understrap'),
|
'prev_next' => true,
|
||||||
'screen_reader_text' => __('Posts navigation', 'understrap'),
|
'prev_text' => __( '«', 'understrap' ),
|
||||||
'type' => 'array',
|
'next_text' => __( '»', 'understrap' ),
|
||||||
'current' => max( 1, get_query_var('paged') ),
|
'screen_reader_text' => __( 'Posts navigation', 'understrap' ),
|
||||||
) );
|
'type' => 'array',
|
||||||
|
'current' => max( 1, get_query_var( 'paged' ) ),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$links = paginate_links($args);
|
$links = paginate_links( $args );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<nav aria-label="<?php echo $args['screen_reader_text']; ?>">
|
<nav aria-label="<?php echo $args['screen_reader_text']; ?>">
|
||||||
|
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
foreach ( $links as $key => $link ) {
|
||||||
|
?>
|
||||||
|
<li class="page-item <?php echo strpos( $link, 'current' ) ? 'active' : ''; ?>">
|
||||||
|
<?php echo str_replace( 'page-numbers', 'page-link', $link ); ?>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
foreach ( $links as $key => $link ) { ?>
|
</ul>
|
||||||
|
|
||||||
<li class="page-item <?php echo strpos( $link, 'current' ) ? 'active' : '' ?>">
|
</nav>
|
||||||
|
|
||||||
<?php echo str_replace( 'page-numbers', 'page-link', $link ); ?>
|
<?php
|
||||||
|
}
|
||||||
</li>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -3,14 +3,13 @@
|
||||||
* Check and setup theme's default settings
|
* Check and setup theme's default settings
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly.
|
exit; // Exit if accessed directly.
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_setup_theme_default_settings' ) ) {
|
if ( ! function_exists( 'understrap_setup_theme_default_settings' ) ) {
|
||||||
function understrap_setup_theme_default_settings() {
|
function understrap_setup_theme_default_settings() {
|
||||||
|
|
||||||
// check if settings are set, if not set defaults.
|
// check if settings are set, if not set defaults.
|
||||||
|
@ -33,4 +32,4 @@ if ( ! function_exists ( 'understrap_setup_theme_default_settings' ) ) {
|
||||||
set_theme_mod( 'understrap_container_type', 'container' );
|
set_theme_mod( 'understrap_container_type', 'container' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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' );
|
||||||
|
@ -30,31 +30,31 @@ if ( ! function_exists( 'understrap_woocommerce_support' ) ) {
|
||||||
/**
|
/**
|
||||||
* First unhook the WooCommerce wrappers
|
* First unhook the WooCommerce wrappers
|
||||||
*/
|
*/
|
||||||
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
|
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
|
||||||
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
|
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Then hook in your own functions to display the wrappers your theme requires
|
* Then hook in your own functions to display the wrappers your theme requires
|
||||||
*/
|
*/
|
||||||
add_action('woocommerce_before_main_content', 'understrap_woocommerce_wrapper_start', 10);
|
add_action( 'woocommerce_before_main_content', 'understrap_woocommerce_wrapper_start', 10 );
|
||||||
add_action('woocommerce_after_main_content', 'understrap_woocommerce_wrapper_end', 10);
|
add_action( 'woocommerce_after_main_content', 'understrap_woocommerce_wrapper_end', 10 );
|
||||||
if ( ! function_exists( 'understrap_woocommerce_wrapper_start' ) ) {
|
if ( ! function_exists( 'understrap_woocommerce_wrapper_start' ) ) {
|
||||||
function understrap_woocommerce_wrapper_start() {
|
function understrap_woocommerce_wrapper_start() {
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
echo '<div class="wrapper" id="woocommerce-wrapper">';
|
echo '<div class="wrapper" id="woocommerce-wrapper">';
|
||||||
echo '<div class="' . esc_attr( $container ) . '" id="content" tabindex="-1">';
|
echo '<div class="' . esc_attr( $container ) . '" id="content" tabindex="-1">';
|
||||||
echo '<div class="row">';
|
echo '<div class="row">';
|
||||||
get_template_part( 'global-templates/left-sidebar-check' );
|
get_template_part( 'global-templates/left-sidebar-check' );
|
||||||
echo '<main class="site-main" id="main">';
|
echo '<main class="site-main" id="main">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! function_exists( 'understrap_woocommerce_wrapper_end' ) ) {
|
if ( ! function_exists( 'understrap_woocommerce_wrapper_end' ) ) {
|
||||||
function understrap_woocommerce_wrapper_end() {
|
function understrap_woocommerce_wrapper_end() {
|
||||||
echo '</main><!-- #main -->';
|
echo '</main><!-- #main -->';
|
||||||
get_template_part( 'global-templates/right-sidebar-check' );
|
get_template_part( 'global-templates/right-sidebar-check' );
|
||||||
echo '</div><!-- .row -->';
|
echo '</div><!-- .row -->';
|
||||||
echo '</div><!-- Container end -->';
|
echo '</div><!-- Container end -->';
|
||||||
echo '</div><!-- Wrapper end -->';
|
echo '</div><!-- Wrapper end -->';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,12 +69,12 @@ function understrap_woocommerce_wrapper_end() {
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
if ( ! function_exists( 'understrap_wc_form_field_args' ) ) {
|
||||||
function understrap_wc_form_field_args( $args, $key, $value = null ) {
|
function understrap_wc_form_field_args( $args, $key, $value = null ) {
|
||||||
// Start field type switch case.
|
// Start field type switch case.
|
||||||
switch ( $args['type'] ) {
|
switch ( $args['type'] ) {
|
||||||
/* Targets all select input type elements, except the country and state select input types */
|
/* Targets all select input type elements, except the country and state select input types */
|
||||||
case 'select' :
|
case 'select':
|
||||||
// Add a class to the field's html element wrapper - woocommerce
|
// Add a class to the field's html element wrapper - woocommerce
|
||||||
// input types (fields) are often wrapped within a <p></p> tag.
|
// input types (fields) are often wrapped within a <p></p> tag.
|
||||||
$args['class'][] = 'form-group';
|
$args['class'][] = 'form-group';
|
||||||
|
@ -90,13 +90,13 @@ if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
||||||
break;
|
break;
|
||||||
// By default WooCommerce will populate a select with the country names - $args
|
// By default WooCommerce will populate a select with the country names - $args
|
||||||
// defined for this specific input type targets only the country select element.
|
// defined for this specific input type targets only the country select element.
|
||||||
case 'country' :
|
case 'country':
|
||||||
$args['class'][] = 'form-group single-country';
|
$args['class'][] = 'form-group single-country';
|
||||||
$args['label_class'] = array( 'control-label' );
|
$args['label_class'] = array( 'control-label' );
|
||||||
break;
|
break;
|
||||||
// By default WooCommerce will populate a select with state names - $args defined
|
// By default WooCommerce will populate a select with state names - $args defined
|
||||||
// for this specific input type targets only the country select element.
|
// for this specific input type targets only the country select element.
|
||||||
case 'state' :
|
case 'state':
|
||||||
// Add class to the field's html element wrapper.
|
// Add class to the field's html element wrapper.
|
||||||
$args['class'][] = 'form-group';
|
$args['class'][] = 'form-group';
|
||||||
// add class to the form input itself.
|
// add class to the form input itself.
|
||||||
|
@ -108,28 +108,28 @@ if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
||||||
'aria-hidden' => 'true',
|
'aria-hidden' => 'true',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'password' :
|
case 'password':
|
||||||
case 'text' :
|
case 'text':
|
||||||
case 'email' :
|
case 'email':
|
||||||
case 'tel' :
|
case 'tel':
|
||||||
case 'number' :
|
case 'number':
|
||||||
$args['class'][] = 'form-group';
|
$args['class'][] = 'form-group';
|
||||||
$args['input_class'] = array( 'form-control', 'input-lg' );
|
$args['input_class'] = array( 'form-control', 'input-lg' );
|
||||||
$args['label_class'] = array( 'control-label' );
|
$args['label_class'] = array( 'control-label' );
|
||||||
break;
|
break;
|
||||||
case 'textarea' :
|
case 'textarea':
|
||||||
$args['input_class'] = array( 'form-control', 'input-lg' );
|
$args['input_class'] = array( 'form-control', 'input-lg' );
|
||||||
$args['label_class'] = array( 'control-label' );
|
$args['label_class'] = array( 'control-label' );
|
||||||
break;
|
break;
|
||||||
case 'checkbox' :
|
case 'checkbox':
|
||||||
$args['label_class'] = array( 'custom-control custom-checkbox' );
|
$args['label_class'] = array( 'custom-control custom-checkbox' );
|
||||||
$args['input_class'] = array( 'custom-control-input', 'input-lg' );
|
$args['input_class'] = array( 'custom-control-input', 'input-lg' );
|
||||||
break;
|
break;
|
||||||
case 'radio' :
|
case 'radio':
|
||||||
$args['label_class'] = array( 'custom-control custom-radio' );
|
$args['label_class'] = array( 'custom-control custom-radio' );
|
||||||
$args['input_class'] = array( 'custom-control-input', 'input-lg' );
|
$args['input_class'] = array( 'custom-control-input', 'input-lg' );
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
$args['class'][] = 'form-group';
|
$args['class'][] = 'form-group';
|
||||||
$args['input_class'] = array( 'form-control', 'input-lg' );
|
$args['input_class'] = array( 'form-control', 'input-lg' );
|
||||||
$args['label_class'] = array( 'control-label' );
|
$args['label_class'] = array( 'control-label' );
|
||||||
|
@ -137,4 +137,4 @@ if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
||||||
} // end switch ($args).
|
} // end switch ($args).
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
*/
|
*/
|
||||||
add_action( 'after_setup_theme', 'understrap_wpcom_setup' );
|
add_action( 'after_setup_theme', 'understrap_wpcom_setup' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_wpcom_setup' ) ) {
|
if ( ! function_exists( 'understrap_wpcom_setup' ) ) {
|
||||||
function understrap_wpcom_setup() {
|
function understrap_wpcom_setup() {
|
||||||
global $themecolors;
|
global $themecolors;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ if ( ! function_exists ( 'understrap_wpcom_setup' ) ) {
|
||||||
*/
|
*/
|
||||||
add_action( 'wp_enqueue_scripts', 'understrap_wpcom_styles' );
|
add_action( 'wp_enqueue_scripts', 'understrap_wpcom_styles' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_wpcom_styles' ) ) {
|
if ( ! function_exists( 'understrap_wpcom_styles' ) ) {
|
||||||
function understrap_wpcom_styles() {
|
function understrap_wpcom_styles() {
|
||||||
wp_enqueue_style( 'understrap-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', array(), '20160411' );
|
wp_enqueue_style( 'understrap-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', array(), '20160411' );
|
||||||
}
|
}
|
||||||
|
|
13
index.php
13
index.php
|
@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( is_front_page() && is_home() ) : ?>
|
<?php if ( is_front_page() && is_home() ) : ?>
|
||||||
|
@ -64,14 +64,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<!-- The pagination component -->
|
<!-- The pagination component -->
|
||||||
<?php understrap_pagination(); ?>
|
<?php understrap_pagination(); ?>
|
||||||
|
|
||||||
<!-- 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(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
array(
|
||||||
'after' => '</div>',
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
) );
|
'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(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
array(
|
||||||
'after' => '</div>',
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
) );
|
'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(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
array(
|
||||||
'after' => '</div>',
|
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||||
) );
|
'after' => '</div>',
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
|
@ -51,11 +51,11 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
||||||
|
|
||||||
</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(); ?>
|
||||||
|
|
12
page.php
12
page.php
|
@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -46,13 +46,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</main><!-- #main -->
|
</main><!-- #main -->
|
||||||
|
|
||||||
<!-- 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><!-- #page-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
27
search.php
27
search.php
|
@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -29,11 +29,16 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
|
|
||||||
<h1 class="page-title"><?php printf(
|
<h1 class="page-title">
|
||||||
/* translators:*/
|
<?php
|
||||||
esc_html__( 'Search Results for: %s', 'understrap' ),
|
printf(
|
||||||
'<span>' . get_search_query() . '</span>' ); ?></h1>
|
/* translators: %s: query term */
|
||||||
|
esc_html__( 'Search Results for: %s', 'understrap' ),
|
||||||
|
'<span>' . get_search_query() . '</span>'
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</h1>
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
@ -62,13 +67,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<!-- The pagination component -->
|
<!-- The pagination component -->
|
||||||
<?php understrap_pagination(); ?>
|
<?php understrap_pagination(); ?>
|
||||||
|
|
||||||
<!-- 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><!-- #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
|
||||||
*/
|
*/
|
||||||
|
@ -18,6 +18,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<input class="submit btn btn-primary" id="searchsubmit" name="submit" type="submit"
|
<input class="submit btn btn-primary" id="searchsubmit" name="submit" type="submit"
|
||||||
value="<?php esc_attr_e( 'Search', 'understrap' ); ?>">
|
value="<?php esc_attr_e( 'Search', 'understrap' ); ?>">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -14,34 +14,34 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<!-- ******************* The Hero Widget Area ******************* -->
|
<!-- ******************* The Hero Widget Area ******************* -->
|
||||||
|
|
||||||
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
|
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
|
||||||
|
|
||||||
<div class="carousel-inner" role="listbox">
|
<div class="carousel-inner" role="listbox">
|
||||||
|
|
||||||
<?php dynamic_sidebar( 'hero' ); ?>
|
<?php dynamic_sidebar( 'hero' ); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
|
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
|
||||||
|
|
||||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
|
||||||
|
|
||||||
<span class="sr-only"><?php esc_html_e( 'Previous', 'understrap' ); ?></span>
|
|
||||||
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
|
|
||||||
|
|
||||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
|
||||||
|
|
||||||
<span class="sr-only"><?php esc_html_e( 'Next', 'understrap' ); ?></span>
|
|
||||||
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div><!-- .carousel -->
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||||
|
|
||||||
<script>
|
<span class="sr-only"><?php esc_html_e( 'Previous', 'understrap' ); ?></span>
|
||||||
jQuery( ".carousel-item" ).first().addClass( "active" );
|
|
||||||
</script>
|
</a>
|
||||||
|
|
||||||
|
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
|
||||||
|
|
||||||
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||||
|
|
||||||
|
<span class="sr-only"><?php esc_html_e( 'Next', 'understrap' ); ?></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div><!-- .carousel -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
jQuery( ".carousel-item" ).first().addClass( "active" );
|
||||||
|
</script>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -16,4 +16,4 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
<?php dynamic_sidebar( 'herocanvas' ); ?>
|
<?php dynamic_sidebar( 'herocanvas' ); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -18,10 +18,10 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'both' === $sidebar_pos ) : ?>
|
||||||
<div class="col-md-3 widget-area" id="left-sidebar" role="complementary">
|
<div class="col-md-3 widget-area" id="left-sidebar" role="complementary">
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div class="col-md-4 widget-area" id="left-sidebar" role="complementary">
|
<div class="col-md-4 widget-area" id="left-sidebar" role="complementary">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php dynamic_sidebar( 'left-sidebar' ); ?>
|
<?php dynamic_sidebar( 'left-sidebar' ); ?>
|
||||||
|
|
||||||
</div><!-- #left-sidebar -->
|
</div><!-- #left-sidebar -->
|
||||||
|
|
|
@ -18,10 +18,10 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'both' === $sidebar_pos ) : ?>
|
||||||
<div class="col-md-3 widget-area" id="right-sidebar" role="complementary">
|
<div class="col-md-3 widget-area" id="right-sidebar" role="complementary">
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div class="col-md-4 widget-area" id="right-sidebar" role="complementary">
|
<div class="col-md-4 widget-area" id="right-sidebar" role="complementary">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php dynamic_sidebar( 'right-sidebar' ); ?>
|
<?php dynamic_sidebar( 'right-sidebar' ); ?>
|
||||||
|
|
||||||
</div><!-- #right-sidebar -->
|
</div><!-- #right-sidebar -->
|
||||||
|
|
|
@ -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' ) ) : ?>
|
||||||
|
|
14
single.php
14
single.php
|
@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper" id="single-wrapper">
|
<div class="wrapper" id="single-wrapper">
|
||||||
|
@ -28,7 +28,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<?php get_template_part( 'loop-templates/content', 'single' ); ?>
|
<?php get_template_part( 'loop-templates/content', 'single' ); ?>
|
||||||
|
|
||||||
<?php understrap_post_nav(); ?>
|
<?php understrap_post_nav(); ?>
|
||||||
|
|
||||||
<?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.
|
||||||
|
@ -41,13 +41,13 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</main><!-- #main -->
|
</main><!-- #main -->
|
||||||
|
|
||||||
<!-- 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><!-- #single-wrapper -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
Reference in New Issue