Cleanup, setting right escaping, sidebar image size limits

This commit is contained in:
koenemann 2016-06-23 11:21:57 +02:00
parent db76c5a8ff
commit c9023ac501
7 changed files with 5378 additions and 59 deletions

View File

@ -4595,7 +4595,7 @@ a.bg-danger:focus, a.bg-danger:hover {
.entry-footer span {
padding-right: 10px; }
img.wp-post-image, article img, figure, img {
img.wp-post-image, article img, figure, img, #secondary img {
max-width: 100%;
height: auto; }

2
css/theme.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -98,6 +98,20 @@ gulp.task('scripts', function() {
.pipe(concat('theme.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./js/'));
gulp.src([
basePaths.dev + 'js/owl.carousel.min.js', // Must be loaded before BS4
basePaths.dev + 'js/tether.js', // Must be loaded before BS4
// Start - All BS4 stuff
basePaths.dev + 'js/bootstrap4/bootstrap.js',
// End - All BS4 stuff
basePaths.dev + 'js/skip-link-focus-fix.js'
])
.pipe(concat('theme.js'))
.pipe(gulp.dest('./js/'));
});
// Run:

View File

@ -27,8 +27,8 @@ add_action("wp_enqueue_scripts","understrap_slider");
function understrap_slider(){
if ( is_front_page() ) {
$data = array(
"timeout"=> esc_attr( get_theme_mod( 'understrap_theme_slider_time_setting', 5000 )),
"items"=> esc_attr( get_theme_mod( 'understrap_theme_slider_count_setting', 1 ))
"timeout"=> intval( get_theme_mod( 'understrap_theme_slider_time_setting', 5000 )),
"items"=> intval( get_theme_mod( 'understrap_theme_slider_count_setting', 1 ))
);
wp_enqueue_script("understrap-slider-script", get_stylesheet_directory_uri() . '/js/slider_settings.js', array(), '0.4.4');

View File

@ -7,59 +7,6 @@
* @package understrap
*/
if ( ! function_exists( 'understrap_paging_nav' ) ) :
/**
* Display navigation to next/previous set of posts when applicable.
*/
function understrap_paging_nav() {
// Don't print empty markup if there's only one page.
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
return;
}
?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'understrap' ); ?></h1>
<div class="nav-links">
<?php if ( get_next_posts_link() ) : ?>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'understrap' ) ); ?></div>
<?php endif; ?>
<?php if ( get_previous_posts_link() ) : ?>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'understrap' ) ); ?></div>
<?php endif; ?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
endif;
if ( ! function_exists( 'understrap_post_nav' ) ) :
/**
* Display navigation to next/previous post when applicable.
*/
function understrap_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous ) {
return;
}
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'understrap' ); ?></h1>
<div class="nav-links">
<?php
previous_post_link( '<div class="nav-previous">%link</div>', _x( '<span class="meta-nav">&larr;</span>&nbsp;%title', 'Previous post link', 'understrap' ) );
next_post_link( '<div class="nav-next">%link</div>', _x( '%title&nbsp;<span class="meta-nav">&rarr;</span>', 'Next post link', 'understrap' ) );
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
endif;
if ( ! function_exists( 'understrap_posted_on' ) ) :
/**

5358
js/theme.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,7 @@ font-size:inherit;
}
//Limit featured image size to 100%
img.wp-post-image, article img, figure, img {
img.wp-post-image, article img, figure, img, #secondary img {
max-width: 100%;
height: auto;
}