Skip to content

Commit

Permalink
Fixes according WordPress coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Oliynyk committed Mar 25, 2017
1 parent d426dcc commit 722d120
Show file tree
Hide file tree
Showing 23 changed files with 755 additions and 349 deletions.
23 changes: 16 additions & 7 deletions 404.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
<?php get_header(); ?>
<div class="<?php echo vct_get_content_container_class(); ?>">
<?php
/**
* The template part for displaying 404 error page
*
* @package WordPress
* @subpackage Visual Composer Starter
* @since Visual Composer Starter 1.0
*/

get_header(); ?>
<div class="<?php echo esc_attr( vct_get_content_container_class() ); ?>">
<div class="content-wrapper">
<div class="row">
<div class="<?php echo vct_get_maincontent_block_class(); ?>">
<div class="<?php echo esc_html( vct_get_maincontent_block_class() ); ?>">
<div class="main-content">
<div class="entry-content error-404 not-found">
<h1><?php _e( 'Oops! That page can&rsquo;t be found.', 'visual-composer-starter' ); ?></h1>
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'visual-composer-starter' ); ?></p>
<h1><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'visual-composer-starter' ); ?></h1>
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'visual-composer-starter' ); ?></p>
<?php get_search_form(); ?>
</div><!--.entry-content-->
</div><!--.main-content-->
</div><!--.<?php echo vct_get_maincontent_block_class(); ?>-->
</div><!--.<?php echo esc_html( vct_get_maincontent_block_class() ); ?>-->

<?php if ( vct_get_sidebar_class() ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>

</div><!--.row-->
</div><!--.content-wrapper-->
</div><!--.<?php echo vct_get_content_container_class(); ?>-->
</div><!--.<?php echo esc_html( vct_get_content_container_class() ); ?>-->
<?php get_footer();
23 changes: 16 additions & 7 deletions archive.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<?php get_header(); ?>
<div class="<?php echo vct_get_content_container_class(); ?>">
<?php
/**
* The template part for displaying archive
*
* @package WordPress
* @subpackage Visual Composer Starter
* @since Visual Composer Starter 1.0
*/

get_header(); ?>
<div class="<?php echo esc_attr( vct_get_content_container_class() ); ?>">
<div class="content-wrapper">
<div class="row">
<div class="<?php echo vct_get_maincontent_block_class(); ?>">
<div class="<?php echo esc_attr( vct_get_maincontent_block_class() ); ?>">
<div class="main-content">
<div class="entry-content archive">
<?php
Expand All @@ -29,13 +38,13 @@

?>
<div class="pagination">
<h2 class="screen-reader-text"><?php __( 'Post navigation', 'visual-composer-starter' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html__( 'Post navigation', 'visual-composer-starter' ); ?></h2>
<div class="nav-links archive-navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'screen_reader_text' => '',
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'visual-composer-starter' ) . '</span>',
'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'visual-composer-starter' ) . '</span>',
) );
?>
</div><!--.nav-links archive-navigation-->
Expand All @@ -52,13 +61,13 @@

</div><!--.archive-->
</div><!--.main-content-->
</div><!--.<?php echo vct_get_maincontent_block_class(); ?>-->
</div><!--.<?php echo esc_html( vct_get_maincontent_block_class() ); ?>-->

<?php if ( vct_get_sidebar_class() ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>

</div><!--.row-->
</div><!--.content-wrapper-->
</div><!--.<?php echo vct_get_content_container_class(); ?>-->
</div><!--.<?php echo esc_html( vct_get_content_container_class() ); ?>-->
<?php get_footer();
21 changes: 15 additions & 6 deletions comments.php
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
<?php
/**
* Comments wrapper
*
* @package WordPress
* @subpackage Visual Composer Starter
* @since Visual Composer Starter 1.0
*/

if ( post_password_required() ) {
return;
}
?>

<div id="comments" class="comments-area">
<div class="<?php echo vct_get_content_container_class(); ?>">
<div class="<?php echo esc_attr( vct_get_content_container_class() ); ?>">
<div class="row">
<div class="col-md-12">
<?php if ( have_comments() ) : ?>
<h3 class="comments-title">
<?php
$comments_number = get_comments_number();
if ( 1 === $comments_number ) {
printf( _x( 'One comment' ), 'Comments' );
printf( esc_html_x( 'One comment', 'One comment', 'visual-composer-starter' ), 'Comments' );
} else {
printf(
_nx(
/* translators: %1$s: One comment, %1$s: Count of comments */
esc_html( _nx(
'%1$s Comment',
'%1$s Comments',
$comments_number,
'comments title',
'visual-composer-starter'
),
number_format_i18n( $comments_number )
);
) );
}
?>
</h3>
<p class="comments-subtitle"><?php echo __( 'Join the discussion and tell us your opinion.', 'visual-composer-starter' ); ?></p>
<p class="comments-subtitle"><?php echo esc_html__( 'Join the discussion and tell us your opinion.', 'visual-composer-starter' ); ?></p>

<?php the_comments_navigation(); ?>

Expand All @@ -51,7 +60,7 @@
// 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' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'twentysixteen' ); ?></p>
<?php endif; ?>

<?php
Expand Down
183 changes: 96 additions & 87 deletions footer.php
Original file line number Diff line number Diff line change
@@ -1,92 +1,101 @@
<?php if ( vct_is_the_footer_displayed() ) : ?>
<?php vct_hook_before_footer(); ?>
<footer id="footer">
<?php
if ( get_theme_mod( 'vct_footer_area_widget_area', false ) ) :
$footer_columns = get_theme_mod( 'vct_footer_area_widgetized_columns', 1 );
$footer_columns_width = 12 / $footer_columns;
?>
<div class="footer-widget-area">
<div class="<?php echo vct_get_content_container_class(); ?>">
<div class="row">
<div class="col-md-<?php echo $footer_columns_width; ?>">
<?php if ( is_active_sidebar( 'footer' ) ) : ?>
<?php dynamic_sidebar( 'footer' ); ?>
<?php endif; ?>
</div>
<?php for ( $i = 2; $i <= $footer_columns; $i++ ) : ?>
<div class="col-md-<?php echo $footer_columns_width; ?>">
<?php if ( is_active_sidebar( 'footer-' . $i ) ) : ?>
<?php dynamic_sidebar( 'footer-' . $i ); ?>
<?php endif; ?>
</div>
<?php endfor; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="footer-bottom">
<div class="<?php echo vct_get_content_container_class(); ?>">
<?php if ( get_theme_mod( 'vct_footer_area_social_icons', false ) ) : ?>
<div class="footer-right-block">
<div class="footer-socials">
<ul>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_facebook', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_facebook', '' ); ?>"><span class="vct-icon-facebook-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_twitter', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_twitter', '' ); ?>"><span class="vct-icon-twitter-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_linkedin', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_linkedin', '' ); ?>"><span class="vct-icon-linkedin-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_instagram', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_instagram', '' ); ?>"><span class="vct-icon-instagram-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_pinterest', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_pinterest', '' ); ?>"><span class="vct-icon-pinterest-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_youtube', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_youtube', '' ); ?>"><span class="vct-icon-youtube-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_vimeo', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_vimeo', '' ); ?>"><span class="vct-icon-vimeo-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_flickr', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_flickr', '' ); ?>"><span class="vct-icon-flickr-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_github', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo get_theme_mod( 'vct_footer_area_social_link_github', '' ); ?>"><span class="vct-icon-github-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_email', '' ) ) ) : ?>
<li><a href="mailto:<?php echo get_theme_mod( 'vct_footer_area_social_link_email', '' ); ?>"><span class="vct-icon-mail-circle"></span></a></li>
<?php endif; ?>
<?php
/**
* Footer
*
* @package WordPress
* @subpackage Visual Composer Starter
* @since Visual Composer Starter 1.0
*/

</ul>
</div>
</div>
<?php endif; ?>
<div class="footer-left-block">
<p class="copyright">
<span>Copyright &copy; <?php echo date( 'Y' ) ?> <?php bloginfo( 'name' ) ?>. All Rights Reserved.</span>
<span>Proudly powered by <a href="http://visualcomposer.io/?utm_campaign=vc-theme&utm_source=vc-theme-front&utm_medium=vc-theme-footer">Visual Composer</a> and <a href="https://wordpress.org">WordPress</a></span>
</p>
<?php if ( has_nav_menu( 'secondary' ) ) : ?>
<div class="footer-menu">
<?php
wp_nav_menu( array(
'theme_location' => 'secondary',
) );
?>
</div>
<?php endif; ?>
if ( vct_is_the_footer_displayed() ) : ?>
<?php vct_hook_before_footer(); ?>
<footer id="footer">
<?php
if ( get_theme_mod( 'vct_footer_area_widget_area', false ) ) :
$footer_columns = get_theme_mod( 'vct_footer_area_widgetized_columns', 1 );
$footer_columns_width = 12 / $footer_columns;
?>
<div class="footer-widget-area">
<div class="<?php echo esc_attr( vct_get_content_container_class() ); ?>">
<div class="row">
<div class="col-md-<?php echo esc_attr( $footer_columns_width ); ?>">
<?php if ( is_active_sidebar( 'footer' ) ) : ?>
<?php dynamic_sidebar( 'footer' ); ?>
<?php endif; ?>
</div>
<?php for ( $i = 2; $i <= $footer_columns; $i++ ) : ?>
<div class="col-md-<?php echo esc_attr( $footer_columns_width ); ?>">
<?php if ( is_active_sidebar( 'footer-' . $i ) ) : ?>
<?php dynamic_sidebar( 'footer-' . $i ); ?>
<?php endif; ?>
</div>
<?php endfor; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="footer-bottom">
<div class="<?php echo esc_attr( vct_get_content_container_class() ); ?>">
<?php if ( get_theme_mod( 'vct_footer_area_social_icons', false ) ) : ?>
<div class="footer-right-block">
<div class="footer-socials">
<ul>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_facebook', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_facebook', '' ) ); ?>"><span class="vct-icon-facebook-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_twitter', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_twitter', '' ) ); ?>"><span class="vct-icon-twitter-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_linkedin', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_linkedin', '' ) ); ?>"><span class="vct-icon-linkedin-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_instagram', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_instagram', '' ) ); ?>"><span class="vct-icon-instagram-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_pinterest', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_pinterest', '' ) ); ?>"><span class="vct-icon-pinterest-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_youtube', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_youtube', '' ) ); ?>"><span class="vct-icon-youtube-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_vimeo', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_vimeo', '' ) ); ?>"><span class="vct-icon-vimeo-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_flickr', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_flickr', '' ) ); ?>"><span class="vct-icon-flickr-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_github', '' ) ) ) : ?>
<li><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_github', '' ) ); ?>"><span class="vct-icon-github-with-circle"></span></a></li>
<?php endif; ?>
<?php if ( strlen( get_theme_mod( 'vct_footer_area_social_link_email', '' ) ) ) : ?>
<li><a href="mailto:<?php echo esc_url( get_theme_mod( 'vct_footer_area_social_link_email', '' ) ); ?>"><span class="vct-icon-mail-circle"></span></a></li>
<?php endif; ?>

</div>
</div>
</div>
<?php echo get_theme_mod( 'vct_scripts_footer', '' );?>
</footer>
<?php vct_hook_after_footer(); ?>
</ul>
</div>
</div>
<?php endif; ?>
<div class="footer-left-block">
<p class="copyright">
<span>Copyright &copy; <?php echo esc_html( date( 'Y' ) ) ?> <?php bloginfo( 'name' ) ?>. All Rights Reserved.</span>
<span>Proudly powered by <a href="http://visualcomposer.io/?utm_campaign=vc-theme&utm_source=vc-theme-front&utm_medium=vc-theme-footer">Visual Composer</a> and <a href="https://wordpress.org">WordPress</a></span>
</p>
<?php if ( has_nav_menu( 'secondary' ) ) : ?>
<div class="footer-menu">
<?php
wp_nav_menu( array(
'theme_location' => 'secondary',
) );
?>
</div>
<?php endif; ?>

</div>
</div>
</div>
<?php echo esc_html( get_theme_mod( 'vct_scripts_footer', '' ) );?>
</footer>
<?php vct_hook_after_footer(); ?>
<?php endif; ?>
<?php wp_footer(); ?>
</body>
Expand Down
Loading

0 comments on commit 722d120

Please sign in to comment.