Skip to content

Commit ecd92fe

Browse files
Merge pull request #98 from MachoThemes/master
Bug-fixing round #3
2 parents 3f03c0e + 18d3e53 commit ecd92fe

File tree

10 files changed

+392
-454
lines changed

10 files changed

+392
-454
lines changed

archive.php

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,19 @@
66
*
77
* @package Shapely
88
*/
9-
109
get_header(); ?>
10+
<?php $layout_class = ( function_exists( 'shapely_get_layout_class' ) ) ? shapely_get_layout_class() : ''; ?>
11+
<div id="primary" class="col-md-9 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>"><?php
12+
if ( have_posts() ) :
1113

12-
<div id="primary" class="content-area col-md-9 mb-xs-24">
13-
<main id="main" class="site-main" role="main">
14+
if ( is_home() && ! is_front_page() ) : ?>
15+
<header>
16+
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
17+
</header>
1418

15-
<?php
16-
if ( have_posts() ) : ?>
17-
18-
<?php if( !get_theme_mod('top_callout', true ) ) { ?>
19-
<header class="page-header">
2019
<?php
21-
the_archive_title( '<h1 class="page-title">', '</h1>' );
22-
the_archive_description( '<div class="taxonomy-description">', '</div>' );
23-
?>
24-
</header><!-- .page-header --><?php
25-
} ?>
20+
endif;
2621

27-
<?php
2822
/* Start the Loop */
2923
while ( have_posts() ) : the_post();
3024

@@ -37,17 +31,16 @@
3731

3832
endwhile;
3933

40-
the_posts_navigation();
34+
if ( function_exists( "shapely_pagination" ) ):
35+
shapely_pagination();
36+
endif;
4137

4238
else :
4339

4440
get_template_part( 'template-parts/content', 'none' );
4541

4642
endif; ?>
47-
48-
</main><!-- #main -->
4943
</div><!-- #primary -->
50-
5144
<?php
5245
get_sidebar();
5346
get_footer();

changelog.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
### 1.7.0
2+
<a href="https://github.com/puikinsh/shapely/issues">Issues</a>
3+
#79 - restyled <q> a little bit ( added a bg, set font style to italic )
4+
#66 - woo-setup.php was not deleted from the theme files, fixed
5+
#63 - escaped echoes
6+
#52 - changed esc_html to wp_kses_post to allow some html tags
7+
#51 - related to #66, deleted woo-setup.php
8+
#47 - added support for Post thumb in page as well
9+
#35 - fixed in the first update
10+
#46 - reworked script that fixes the navbar top ( listen event, wait for a specific offset, animate it )
11+
#48 - added prev / next for content
12+
#29 - this does not happen in the current version of the theme
13+
#50 - Content is escaped with wp_kses_post where appropriate
14+
#49 - seems to be fixed in the current theme version ( also, added a clearfix after the section - just in case )
15+
#39 - sticky navigation removed for hamburger menus ( larger menus could not be used, you can't scroll in a fixed element )
16+
#30 - archive page did not implement layout styles
17+
#45 - added border-bottom checkbox toggle for widget
18+
#79 - added epsilon toggles for widgets
19+
120
### 1.0.7
221
<a href="https://github.com/puikinsh/shapely/issues">Issues</a>
322
#23 - html was missing a closing tag

footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<div class="row">
2727
<div class="site-info col-sm-6">
28-
<div class="copyright-text"><?php echo esc_html(get_theme_mod( 'shapely_footer_copyright' )); ?></div>
28+
<div class="copyright-text"><?php echo wp_kses_post(get_theme_mod( 'shapely_footer_copyright' )); ?></div>
2929
<div class="footer-credits"><?php shapely_footer_info(); ?></div>
3030
</div><!-- .site-info -->
3131
<div class="col-sm-6 text-right">

inc/admin/welcome-screen/img/macho-themes-logo.svg

Lines changed: 0 additions & 40 deletions
This file was deleted.

inc/extras.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,31 +133,31 @@ function get_shapely_theme_options() {
133133
echo '<style type="text/css">';
134134

135135
if ( get_theme_mod( 'link_color' ) ) {
136-
echo 'a {color:' . esc_html( get_theme_mod( 'link_color' ) ) . '}';
136+
echo 'a {color:' . esc_attr( get_theme_mod( 'link_color' ) ) . '}';
137137
}
138138
if ( get_theme_mod( 'link_hover_color' ) ) {
139139
echo 'a:hover, a:active, .post-title a:hover,
140140
.woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce nav.woocommerce-pagination ul li a:hover,
141-
.woocommerce nav.woocommerce-pagination ul li span.current { color: ' . esc_html( get_theme_mod( 'link_hover_color' ) ) . ';}';
141+
.woocommerce nav.woocommerce-pagination ul li span.current { color: ' . esc_attr( get_theme_mod( 'link_hover_color' ) ) . ';}';
142142
}
143143

144144
if ( get_theme_mod( 'button_color' ) ) {
145145
echo '.btn-filled, .btn-filled:visited, .woocommerce #respond input#submit.alt,
146146
.woocommerce a.button.alt, .woocommerce button.button.alt,
147147
.woocommerce input.button.alt, .woocommerce #respond input#submit,
148148
.woocommerce a.button, .woocommerce button.button,
149-
.woocommerce input.button { background:' . esc_html( get_theme_mod( 'button_color' ) ) . ' !important; border: 2px solid' . esc_html( get_theme_mod( 'button_color' ) ) . ' !important;}';
149+
.woocommerce input.button { background:' . esc_attr( get_theme_mod( 'button_color' ) ) . ' !important; border: 2px solid' . esc_attr( get_theme_mod( 'button_color' ) ) . ' !important;}';
150150
}
151151
if ( get_theme_mod( 'button_hover_color' ) ) {
152152
echo '.btn-filled:hover, .woocommerce #respond input#submit.alt:hover,
153153
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
154154
.woocommerce input.button.alt:hover, .woocommerce #respond input#submit:hover,
155155
.woocommerce a.button:hover, .woocommerce button.button:hover,
156-
.woocommerce input.button:hover { background: ' . esc_html( get_theme_mod( 'button_hover_color' ) ) . ' !important; border: 2px solid' . esc_html( get_theme_mod( 'button_hover_color' ) ) . ' !important;}';
156+
.woocommerce input.button:hover { background: ' . esc_attr( get_theme_mod( 'button_hover_color' ) ) . ' !important; border: 2px solid' . esc_attr( get_theme_mod( 'button_hover_color' ) ) . ' !important;}';
157157
}
158158

159159
if ( get_theme_mod( 'social_color' ) ) {
160-
echo '.social-icons li a {color: ' . esc_html( get_theme_mod( 'social_color' ) ) . ' !important ;}';
160+
echo '.social-icons li a {color: ' . esc_attr( get_theme_mod( 'social_color' ) ) . ' !important ;}';
161161
}
162162

163163
echo '</style>';
@@ -481,9 +481,9 @@ function shapely_get_header_logo() {
481481

482482
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php
483483
if ( $logo[0] != '' ) { ?>
484-
<img src="<?php echo $logo[0]; ?>" class="logo" alt="<?php echo esc_html( get_bloginfo( 'name' ) ); ?>"><?php
484+
<img src="<?php echo esc_url($logo[0]); ?>" class="logo" alt="<?php echo esc_html( get_bloginfo( 'name' ) ); ?>"><?php
485485
} else { ?>
486-
<h1 class="site-title"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></h1><?php
486+
<span class="site-title"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></span><?php
487487
} ?>
488488
</a><?php
489489
}
@@ -586,12 +586,12 @@ function shapely_footer_callout() {
586586
<div class="col-sm-12 text-center p0">
587587
<div class="overflow-hidden">
588588
<div class="col-sm-9">
589-
<h3 class="cfa-text"><?php echo esc_html( get_theme_mod( 'footer_callout_text' ) ); ?></h3>
589+
<h3 class="cfa-text"><?php echo wp_kses_post( get_theme_mod( 'footer_callout_text' ) ); ?></h3>
590590
</div>
591591
<div class="col-sm-3">
592592
<a href='<?php echo esc_url( get_theme_mod( 'footer_callout_link' ) ); ?>'
593593
class="mb0 btn btn-lg btn-filled cfa-button">
594-
<?php echo esc_html( get_theme_mod( 'footer_callout_btntext' ) ); ?>
594+
<?php echo wp_kses_post( get_theme_mod( 'footer_callout_btntext' ) ); ?>
595595
</a>
596596
</div>
597597
</div>
@@ -612,7 +612,7 @@ function shapely_get_attachment_image() {
612612
$src = wp_get_attachment_image_src( $id, 'full', false );
613613

614614
if ( ! empty( $src[0] ) ) {
615-
echo $src[0];
615+
echo esc_url($src[0]);
616616
}
617617

618618
die();

inc/woo-setup.php

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)