Skip to content

Commit

Permalink
Merge branch 'release/1.3.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Oct 30, 2017
2 parents d6d5dd5 + 247befa commit f49da82
Show file tree
Hide file tree
Showing 18 changed files with 117 additions and 102 deletions.
2 changes: 1 addition & 1 deletion 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main">

<section class="error-404 not-found">
<header class="page-header">
Expand Down
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main">

<?php if ( have_posts() ) : ?>
<header class="page-header">
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
== Changelog ==

= 1.3.22 - 30 October 2017 =
* Added comment moderation notification.
* Minor code improvements.

= 1.3.21 - 18 October 2017 =
* Updated to the latest SiteOrigin Settings.
* Updated to the latest SiteOrigin Panels Lite.
Expand Down
60 changes: 25 additions & 35 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,29 @@

<div id="comments" class="comments-area">

<?php // You can start editing here -- including this comment! ?>

<?php if ( have_comments() ) : ?>
<?php
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
$comment_count = get_comments_number();
if ( 1 === $comment_count ) {
printf(
/* translators: 1: title. */
esc_html_e( 'One thought on &ldquo;%1$s&rdquo;', 'siteorigin-north' ),
'<span>' . get_the_title() . '</span>'
);
} else {
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'siteorigin-north' ) ),
number_format_i18n( get_comments_number() ),
/* translators: 1: comment count number, 2: title. */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $comment_count, 'comments title', 'siteorigin-north' ) ),
number_format_i18n( $comment_count ),
'<span>' . get_the_title() . '</span>'
);
}
?>
</h2>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h3 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'siteorigin-north' ); ?></h3>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'siteorigin-north' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'siteorigin-north' ) ); ?></div>
</h2><!-- .comments-title -->

</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
<?php endif; // Check for comment navigation. ?>
<?php the_comments_navigation(); ?>

<ol class="comment-list">
<?php
Expand All @@ -56,27 +55,18 @@
?>
</ol><!-- .comment-list -->

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h3 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'siteorigin-north' ); ?></h3>
<div class="nav-links">
<?php the_comments_navigation();

endif; // Check for have_comments().

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'siteorigin-north' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'siteorigin-north' ) ); ?></div>
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
<?php endif; // Check for comment navigation. ?>

<?php endif; // Check for have_comments(). ?>

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'siteorigin-north' ); ?></p>
<?php endif; ?>
<?php
endif;

<?php comment_form(); ?>
comment_form();
?>

</div><!-- #comments -->
4 changes: 2 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<?php do_action( 'siteorigin_north_footer_before' ); ?>

<footer id="colophon" class="site-footer <?php if ( ! siteorigin_setting( 'footer_constrained' ) ) echo 'unconstrained-footer'; if ( is_active_sidebar( 'footer-sidebar' ) ) echo ' footer-active-sidebar'; ?>" role="contentinfo">
<footer id="colophon" class="site-footer <?php if ( ! siteorigin_setting( 'footer_constrained' ) ) echo 'unconstrained-footer'; if ( is_active_sidebar( 'footer-sidebar' ) ) echo ' footer-active-sidebar'; ?>">

<?php do_action( 'siteorigin_north_footer_top' ); ?>

Expand All @@ -28,7 +28,7 @@
if ( is_active_sidebar( 'footer-sidebar' ) ) {
$siteorigin_north_sidebars = wp_get_sidebars_widgets();
?>
<div class="widgets widget-area widgets-<?php echo count( $siteorigin_north_sidebars['footer-sidebar'] ) ?>" role="complementary" aria-label="<?php esc_attr_e( 'Footer Sidebar', 'siteorigin-north' ); ?>">
<div class="widgets widget-area widgets-<?php echo count( $siteorigin_north_sidebars['footer-sidebar'] ) ?>" aria-label="<?php esc_attr_e( 'Footer Sidebar', 'siteorigin-north' ); ?>">
<?php dynamic_sidebar( 'footer-sidebar' ); ?>
</div>
<?php
Expand Down
1 change: 0 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function siteorigin_north_setup() {
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
Expand Down
7 changes: 3 additions & 4 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
} ?>
<div id="topbar-widgets" class="container">
<?php $siteorigin_north_masthead_sidebar = wp_get_sidebars_widgets(); ?>
<div class="widgets widgets-<?php echo count( $siteorigin_north_masthead_sidebar['topbar-sidebar'] ) ?>" role="complementary" aria-label="<?php esc_attr_e( 'Top Bar Sidebar', 'siteorigin-north' ); ?>">
<div class="widgets widgets-<?php echo count( $siteorigin_north_masthead_sidebar['topbar-sidebar'] ) ?>" aria-label="<?php esc_attr_e( 'Top Bar Sidebar', 'siteorigin-north' ); ?>">
<?php dynamic_sidebar( 'topbar-sidebar' ); ?>
</div>
</div><!-- #topbar-widgets -->
Expand All @@ -50,8 +50,7 @@
<?php endif; ?>

<?php if ( ! siteorigin_page_setting( 'hide_masthead', false ) ) : ?>
<header id="masthead" class="site-header layout-<?php echo sanitize_html_class( str_replace('_', '-', siteorigin_setting( 'masthead_layout' ) ) ) ?> <?php if( siteorigin_setting( 'navigation_sticky' ) ) echo 'sticky-menu'; ?>" role="banner"
<?php if ( siteorigin_setting( 'navigation_sticky_scale' ) ) echo 'data-scale-logo="true"' ?> >
<header id="masthead" class="site-header layout-<?php echo sanitize_html_class( str_replace('_', '-', siteorigin_setting( 'masthead_layout' ) ) ) ?> <?php if( siteorigin_setting( 'navigation_sticky' ) ) echo 'sticky-menu'; ?>" <?php if ( siteorigin_setting( 'navigation_sticky_scale' ) ) echo 'data-scale-logo="true"' ?> >
<div class="container">

<div class="container-inner">
Expand All @@ -63,7 +62,7 @@
<?php endif ?>
</div><!-- .site-branding -->

<nav id="site-navigation" class="main-navigation" role="navigation">
<nav id="site-navigation" class="main-navigation">

<?php if ( siteorigin_page_setting( 'layout' ) !== 'stripped' ) : ?>

Expand Down
11 changes: 8 additions & 3 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function siteorigin_north_the_post_navigation() {
return;
}
?>
<nav class="navigation post-navigation" role="navigation">
<nav class="navigation post-navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'siteorigin-north' ); ?></h2>
<div class="nav-links">
<?php
Expand Down Expand Up @@ -305,8 +305,8 @@ function siteorigin_north_comment( $comment, $args, $depth ) {
<?php endif; ?>

<div class="comment-container">
<?php if($depth <= $args['max_depth']) : ?>
<?php comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'])) ?>
<?php if( $depth <= $args['max_depth'] ) : ?>
<?php comment_reply_link( array('depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>
<?php endif; ?>

<div class="info">
Expand All @@ -322,6 +322,11 @@ function siteorigin_north_comment( $comment, $args, $depth ) {
</div>

<div class="comment-content content">
<?php if ( ! $comment->comment_approved ) : ?>
<p class="comment-awaiting-moderation">
<?php esc_html_e( 'Your comment is awaiting moderation.', 'siteorigin-north' ); ?>
</p>
<?php endif; ?>
<?php comment_text(); ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main">

<?php if ( have_posts() ) : ?>

Expand Down
2 changes: 1 addition & 1 deletion page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main">

<?php while ( have_posts() ) : the_post(); ?>

Expand Down
15 changes: 9 additions & 6 deletions sass/navigation/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -499,24 +499,27 @@
overflow: hidden;
}

& .nav-previous {
float: left;
.nav-previous,
.nav-next {
width: 50%;
}

.nav-previous {
float: left;

.north-icon-previous {
float: left;
margin: 0.25em 5px;
margin: .25em 5px;
}
}

& .nav-next {
.nav-next {
float: right;
text-align: right;
width: 50%;

.north-icon-next {
float: right;
margin: 0.25em 0 0 5px;
margin: .25em 0 0 5px;
}
}

Expand Down
39 changes: 22 additions & 17 deletions sass/site/primary/_comments.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@
padding: 0;

li.comment {
color: $color__text_light;
display: block;
margin: 0 0 50px 0;
padding: 0;
width: auto;
display: block;
color: $color__text_light;

.comment-container {
margin-left: 120px;

.comment-awaiting-moderation {
font-style: italic;
}
}

&.pingback {

.comment-container {
margin-left: 0;
}
Expand All @@ -36,10 +41,10 @@
}

.comment-reply-link {
float: right;
color: $comments__reply_link_color;
float: right;
font-size: .8em;
text-decoration: none;
font-size: 0.8em;
line-height: 1em;
padding: 8px 12px;
background: $comments__reply_background_color;
Expand All @@ -54,13 +59,13 @@
}

.author {
font-weight: bold;
color: $color__text_dark;
font-weight: bold;
}

.children {
margin-left: 70px;
margin-top: 50px;
margin-left: 70px;
padding: 0;
}

Expand All @@ -69,8 +74,8 @@
}

.comments-title, .comment-reply-title {
text-transform: uppercase;
font-size: 1.2em;
text-transform: uppercase;
}


Expand Down Expand Up @@ -131,21 +136,20 @@

input {
background: transparent;
border-radius: 0px;
font-size: 0.85em;
float: right;
border: 1px solid $color__border-button;
padding: 10px 30px;
line-height: 1em;
border-radius: 0;
box-shadow: inset 0 0 1px rgba(0,0,0,0.25);
text-decoration: none;
color: $color__text_dark;
float: right;
font-family: $font__headings;
text-transform: uppercase;
font-size: 0.85em;
line-height: 1em;
padding: 10px 30px;
text-decoration: none;
text-shadow: none;

text-transform: uppercase;
@include transition(0.085s);

&:hover{
background: $color__primary_accent_dark;
border-color: $color__primary_accent_dark;
Expand All @@ -155,7 +159,8 @@
}
}

input, textarea {
input,
textarea {
background-color: $comments__form_background_color;

&:focus {
Expand Down
2 changes: 1 addition & 1 deletion search.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_header(); ?>

<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main">

<?php if ( have_posts() ) : ?>

Expand Down
2 changes: 1 addition & 1 deletion searchform.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form method="get" action="<?php echo esc_url( site_url() ) ?>" role="search">
<form method="get" action="<?php echo esc_url( site_url() ) ?>">
<label for='s' class='screen-reader-text'><?php esc_html_e( 'Search for:', 'siteorigin-north' ); ?></label>
<input type="search" name="s" placeholder="<?php esc_attr_e('Search', 'siteorigin-north') ?>" value="<?php echo get_search_query() ?>" />
<button type="submit">
Expand Down
2 changes: 1 addition & 1 deletion sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
if ( ! in_array( siteorigin_page_setting( 'layout', 'default' ), array( 'default', 'full-width-sidebar' ), true ) ) return;
?>

<div id="secondary" class="widget-area" role="complementary" aria-label="<?php esc_attr_e( 'Main Sidebar', 'siteorigin-north' ); ?>">
<div id="secondary" class="widget-area" aria-label="<?php esc_attr_e( 'Main Sidebar', 'siteorigin-north' ); ?>">
<?php dynamic_sidebar( 'main-sidebar' ); ?>
</div><!-- #secondary -->
2 changes: 1 addition & 1 deletion single.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main">

<?php while ( have_posts() ) : the_post(); ?>

Expand Down
Loading

0 comments on commit f49da82

Please sign in to comment.