Browse Source

first commit

master
humorwang 4 years ago
commit
7e9be1c12f
  1. 20
      404.php
  2. 74
      archive.php
  3. 78
      comments.php
  4. 36
      content-front-page.php
  5. 36
      content-no-title.php
  6. 31
      content-none.php
  7. 40
      content-page.php
  8. 114
      content-related.php
  9. 65
      content-search.php
  10. 43
      content-single-no-title.php
  11. 50
      content-single.php
  12. 85
      content.php
  13. 1647
      css/block-editor-style.css
  14. 352
      css/editor-style.css
  15. 157
      css/theme-help.css
  16. 107
      footer.php
  17. 44
      front-page.php
  18. 597
      functions.php
  19. 1429
      functions/block-patterns.php
  20. 431
      functions/block-styles.php
  21. 3763
      functions/class-tgm-plugin-activation.php
  22. 96
      functions/css/customizer-style.css
  23. 178
      functions/customizer-controls.php
  24. 1156
      functions/customizer.php
  25. 682
      functions/extras.php
  26. 65
      functions/fonts.php
  27. 130
      functions/hooks.php
  28. 215
      functions/js/customizer-preview.js
  29. 17
      functions/js/customizer-script.js
  30. 148
      functions/schema.php
  31. 329
      functions/style-output.php
  32. 369
      functions/template-tags.php
  33. 219
      functions/theme-help.php
  34. 86
      header-transparent.php
  35. 100
      header.php
  36. 53
      home.php
  37. BIN
      images/column-bg-01.jpg
  38. BIN
      images/column-bg-02.jpg
  39. BIN
      images/column-bg-03.jpg
  40. BIN
      images/column-bg-04.jpg
  41. BIN
      images/cover-01.jpg
  42. BIN
      images/cover-02.jpg
  43. BIN
      images/cover-background.jpg
  44. 44
      images/down-arrow.svg
  45. BIN
      images/food-item-01.jpg
  46. BIN
      images/food-item-02.jpg
  47. BIN
      images/food-item-03.jpg
  48. BIN
      images/food-item-04.jpg
  49. BIN
      images/footer-centered-info-below.png
  50. BIN
      images/footer-centered.png
  51. BIN
      images/footer-info-right.png
  52. BIN
      images/footer-standard.png
  53. BIN
      images/header-logo-below.png
  54. BIN
      images/header-logo-left.png
  55. BIN
      images/header-logo-right.png
  56. BIN
      images/header-masthead-left.png
  57. BIN
      images/header-standard.png
  58. BIN
      images/help-block-pattern-inserted.jpg
  59. BIN
      images/help-block-patterns.jpg
  60. BIN
      images/icon-camera-dark.png
  61. BIN
      images/icon-camera-light.png
  62. BIN
      images/icon-rocket-dark.png
  63. BIN
      images/icon-rocket-light.png
  64. BIN
      images/icon-settings-dark.png
  65. BIN
      images/icon-settings-light.png
  66. BIN
      images/media-text-image-02.jpg
  67. BIN
      images/media-text-image-03.jpg
  68. BIN
      images/media-text-image-04.jpg
  69. BIN
      images/media-text-image.jpg
  70. BIN
      images/square-image-01.jpg
  71. BIN
      images/square-image-02.jpg
  72. 44
      images/up-arrow.svg
  73. BIN
      images/woocommerce-placeholder.png
  74. 49
      index.php
  75. 252
      js/custom.js
  76. 2107
      js/jquery.touchSwipe.js
  77. 15
      js/jquery.touchSwipe.min.js
  78. 31
      js/skip-link-focus-fix.js
  79. 2086
      languages/cordero.pot
  80. 281
      license.txt
  81. 42
      page.php
  82. 200
      readme.txt
  83. BIN
      screenshot.png
  84. 62
      search.php
  85. 15
      sidebar-page.php
  86. 24
      sidebar-shop-filters.php
  87. 15
      sidebar-shop.php
  88. 15
      sidebar.php
  89. 53
      single.php
  90. 5886
      style.css
  91. 44
      template-no-title.php
  92. 51
      template-single-reading-paragraph.php
  93. 51
      template-single-reading.php
  94. 52
      template-single-transparent-header.php
  95. 41
      template-transparent-header.php
  96. 76
      woocommerce/content-single-product-tabs-inline.php
  97. 74
      woocommerce/content-single-product-wide-image-after.php
  98. 68
      woocommerce/single-product-image-after-tabs-inline.php
  99. 68
      woocommerce/single-product-image-after.php
  100. 68
      woocommerce/single-product-tabs-inline.php

20
404.php

@ -0,0 +1,20 @@
<?php
/**
* The template for displaying 404 page
*
* @package Cordero
*/
get_header();
?>
<p><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'cordero' ); ?></p>
<p><?php esc_html_e( 'Maybe try a search?', 'cordero' ); ?> <?php get_search_form(); ?></p>
<p><?php esc_html_e( 'Browse our pages.', 'cordero' ); ?></p>
<ul>
<?php wp_list_pages( array( 'title_li' => '' ) ); ?>
</ul>
<?php get_footer(); ?>

74
archive.php

@ -0,0 +1,74 @@
<?php
/**
* The template for displaying archive pages
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main post-columns-<?php echo esc_attr( get_theme_mod( 'blog_columns', '2' ) );?>" role="main">
<?php if ( have_posts() ) : ?>
<header class="archive-header">
<?php
the_archive_title( '<h1 class="archive-title"' . cordero_schema_prop( 'headline', 'false' ) . '>', '</h1>' );
the_archive_description( '<div class="archive-description"' . cordero_schema_prop( 'desc', 'false' ) . '>', '</div>' );
?>
</header><!-- .archive-header -->
<ul class="archive-sub-cats">
<?php
if ( get_queried_object_id() ) {
wp_list_categories( array(
'child_of' => get_queried_object_id(),
'depth' => 1,
'orderby' => 'name',
'title_li' => '',
'show_option_none' => ''
) );
}
?>
</ul>
<div id="grid-loop">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content' ); ?>
<?php endwhile; ?>
</div><!-- #grid-loop -->
<?php the_posts_pagination( array(
'prev_text' => '<i class="dashicons dashicons-arrow-left-alt2"></i>',
'next_text' => '<i class="dashicons dashicons-arrow-right-alt2"></i>',
) ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

78
comments.php

@ -0,0 +1,78 @@
<?php
/**
* The template for displaying comments
*
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Cordero
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
if ( '1' === $comments_number ) {
/* translators: %s: post title */
printf( esc_html_x( 'One Reply to &ldquo;%s&rdquo;', 'comments title', 'cordero' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
esc_html( _nx(
'%1$s Reply to &ldquo;%2$s&rdquo;',
'%1$s Replies to &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'cordero'
) ),
number_format_i18n( $comments_number ),
get_the_title()
);
}
?>
</h2>
<ul class="comment-list">
<?php
wp_list_comments( array(
'avatar_size' => 48,
'style' => 'ul',
'short_ping' => true,
) );
?>
</ul>
<?php the_comments_pagination( array(
'prev_text' => '<span class="screen-reader-text">' . esc_html__( 'Previous', 'cordero' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . esc_html__( 'Next', 'cordero' ) . '</span>',
) );
endif; // Check for have_comments().
// 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 esc_html_e( 'Comments are closed.', 'cordero' ); ?></p>
<?php
endif;
comment_form();
?>
</div><!-- #comments -->

36
content-front-page.php

@ -0,0 +1,36 @@
<?php
/**
* Template part for displaying page content in page.php
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<div class="entry-content single-entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'cordero' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link"><span class="cordero-icon-edit-2"></span>',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

36
content-no-title.php

@ -0,0 +1,36 @@
<?php
/**
* Template part for displaying page content in template-no-title.php and template-transparent-header.php
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<div class="entry-content single-entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'cordero' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link"><span class="cordero-icon-edit-2"></span>',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

31
content-none.php

@ -0,0 +1,31 @@
<?php
/**
* Template part for displaying a message that posts cannot be found
*
* @package Cordero
*/
?>
<section class="no-results not-found">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'cordero' ); ?></h1>
<div class="page-content">
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php
/* translators: %1$s: link to create new post */
printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'cordero' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<?php elseif ( is_search() ) : ?>
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'cordero' ); ?></p>
<?php get_search_form(); ?>
<?php else : ?>
<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'cordero' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .page-content -->
</section><!-- .no-results -->

40
content-page.php

@ -0,0 +1,40 @@
<?php
/**
* Template part for displaying page content in page.php
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<header class="page-header">
<?php the_title( '<h1 class="page-title"' . cordero_schema_prop( 'headline', 'false' ) . '>', '</h1>' ); ?>
</header><!-- .page-header -->
<div class="entry-content single-entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'cordero' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link"><span class="cordero-icon-edit-2"></span>',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

114
content-related.php

@ -0,0 +1,114 @@
<?php
/**
* Template part for displaying related posts
*
* @package Cordero
*/
$categories = wp_get_post_categories( get_the_id() );
$related_posts = get_posts( array(
'posts_per_page' => get_theme_mod( 'related_posts', '4' ),
'category' => $categories,
'exclude' => get_the_id()
) );
if ( count( $related_posts ) > 0 ) {
?>
<div class="related-posts post-columns-<?php echo esc_attr( get_theme_mod( 'blog_columns', '3' ) );?>">
<h3><?php esc_html_e( 'Related', 'cordero' ) ;?></h3>
<div id="grid-loop">
<?php foreach ( $related_posts as $related_post ) {
$related_id = $related_post->ID;
?>
<article id="post-<?php echo $related_id; ?>" <?php post_class('', $related_id); ?><?php cordero_schema_item( 'article' ); ?>>
<?php
if ( get_post_format($related_id) == 'video' ) {
$video_content = apply_filters( 'the_content', get_post($related_id)->post_content );
$video = false;
// Only get video from the content if a playlist isn't present.
if ( false === strpos( $video_content, 'wp-playlist-script' ) ) {
$video = get_media_embedded_in_content( $video_content, array( 'video', 'object', 'embed', 'iframe' ) );
}
if ( ! empty( $video ) ) {
$first_video = true;
foreach ( $video as $video_html ) {
if ( $first_video ) {
echo '<div class="entry-video">';
echo $video_html;
echo '</div>';
$first_video = false;
}
}
} else {
cordero_related_post_thumbnail($related_id);
}
} else {
cordero_related_post_thumbnail($related_id);
}
?>
<header class="entry-header related">
<?php
if ( !get_the_title($related_id) ) {
?>
<h2 class="entry-title"<?php cordero_schema_prop( 'headline' ); ?>><a href="<?php echo esc_url( get_permalink($related_id) ); ?>" rel="bookmark"><?php esc_html_e( 'No Title', 'cordero' ); ?></a></h2>
<?php
} else {
echo '<h2 class="entry-title"' . cordero_schema_prop( 'headline', 'false' ) . '><a href="' . esc_url( get_permalink($related_id) ) . '" rel="bookmark">' . wp_kses_post( get_the_title($related_id) ) . '</a></h2>';
}
?>
</header><!-- .entry-header -->
<div class="entry-meta">
<?php
if ( !get_theme_mod( 'disable_author' ) ) {
cordero_posted_by_related( $related_id );
}
if ( !get_theme_mod( 'disable_date' ) ) {
cordero_posted_on_related( $related_id );
}
if ( !get_theme_mod( 'disable_cats' ) ) {
cordero_entry_cats_related( $related_id );
}
?>
</div><!-- .entry-meta -->
<div class="entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php $related_excerpt = wp_kses_post( wpautop( get_post_field( 'post_excerpt', $related_id ) ) );
if ( $related_excerpt == '' ) {
$related_excerpt = wp_kses_post( wpautop( wp_trim_words( get_post_field( 'post_content', $related_id ), get_theme_mod( 'excerpt_length', '20' ) ) ) );
}
if ( $related_excerpt != '' ) {
echo $related_excerpt;
}
if ( 'post' === get_post_type($related_id) && !get_theme_mod( 'disable_readmore' ) ) {
$readmore_text = get_theme_mod( 'readmore_text' );
if ( $readmore_text == '' ) {
$readmore_text = esc_html__( 'Read More', 'cordero' );
} else {
$readmore_text = esc_html( $readmore_text );
}
?>
<a class="more-tag" href="<?php echo esc_url( get_the_permalink($related_id) ); ?>" title="<?php echo esc_attr( get_the_title($related_id) ); ?>"><?php echo $readmore_text; ?></a>
<?php
} ?>
</div><!-- .entry-content -->
<div class="entry-footer">
<?php
cordero_entry_tags_related( $related_id );
?>
</div><!-- .entry-footer -->
</article><!-- #post-<?php echo $related_id; ?> -->
<?php } ?>
</div><!-- #grid-loop -->
</div>
<?php
}
wp_reset_postdata();

65
content-search.php

@ -0,0 +1,65 @@
<?php
/**
* Template part for displaying results in search pages
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<?php
if ( get_post_format() == 'video' ) {
$video_content = apply_filters( 'the_content', get_the_content() );
$video = false;
// Only get video from the content if a playlist isn't present.
if ( false === strpos( $video_content, 'wp-playlist-script' ) ) {
$video = get_media_embedded_in_content( $video_content, array( 'video', 'object', 'embed', 'iframe' ) );
}
if ( ! empty( $video ) ) {
$first_video = true;
foreach ( $video as $video_html ) {
if ( $first_video ) {
echo '<div class="entry-video">';
echo $video_html;
echo '</div>';
$first_video = false;
}
}
} else {
cordero_post_thumbnail();
}
} else {
cordero_post_thumbnail();
}
?>
<header class="entry-header">
<?php
if ( !get_the_title() ) {
?>
<h2 class="entry-title"<?php cordero_schema_prop( 'headline' ); ?>><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php esc_html_e( 'No Title', 'cordero' ); ?></a></h2>
<?php
} else {
the_title( '<h2 class="entry-title"' . cordero_schema_prop( 'headline', 'false' ) . '><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
?>
</header><!-- .entry-header -->
<div class="entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php
if ( get_theme_mod( 'blog_post_excerpt' ) === 'full' ) {
the_content();
} else {
the_excerpt();
}
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
cordero_read_more();
?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->

43
content-single-no-title.php

@ -0,0 +1,43 @@
<?php
/**
* Template part for displaying single posts with template-single-transparent-header.php
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<div class="entry-content single-entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
if ( !get_theme_mod( 'disable_author_single' ) ) {
cordero_posted_by();
}
if ( !get_theme_mod( 'disable_date_single' ) ) {
cordero_posted_on();
}
if ( !get_theme_mod( 'disable_cats_single' ) ) {
cordero_entry_cats();
}
cordero_entry_footer();
?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

50
content-single.php

@ -0,0 +1,50 @@
<?php
/**
* Template part for displaying single posts
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<header class="entry-header single">
<?php the_title( '<h1 class="entry-title"' . cordero_schema_prop( 'headline', 'false' ) . '>', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content single-entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php
if ( !get_theme_mod( 'disable_img_single' ) ) {
cordero_post_thumbnail();
}
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
if ( !get_theme_mod( 'disable_author_single' ) ) {
cordero_posted_by();
}
if ( !get_theme_mod( 'disable_date_single' ) ) {
cordero_posted_on();
}
if ( !get_theme_mod( 'disable_cats_single' ) ) {
cordero_entry_cats();
}
cordero_entry_footer();
?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

85
content.php

@ -0,0 +1,85 @@
<?php
/**
* Template part for displaying posts
*
* @package Cordero
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php cordero_schema_item( 'article' ); ?>>
<?php
if ( get_post_format() == 'video' ) {
$video_content = apply_filters( 'the_content', get_the_content() );
$video = false;
// Only get video from the content if a playlist isn't present.
if ( false === strpos( $video_content, 'wp-playlist-script' ) ) {
$video = get_media_embedded_in_content( $video_content, array( 'video', 'object', 'embed', 'iframe' ) );
}
if ( ! empty( $video ) ) {
$first_video = true;
foreach ( $video as $video_html ) {
if ( $first_video ) {
echo '<div class="entry-video">';
echo $video_html;
echo '</div>';
$first_video = false;
}
}
} else {
cordero_post_thumbnail();
}
} else {
cordero_post_thumbnail();
}
?>
<header class="entry-header">
<?php
if ( !get_the_title() ) {
?>
<h2 class="entry-title"<?php cordero_schema_prop( 'headline' ); ?>><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php esc_html_e( 'No Title', 'cordero' ); ?></a></h2>
<?php
} else {
the_title( '<h2 class="entry-title"' . cordero_schema_prop( 'headline', 'false' ) . '><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
?>
</header><!-- .entry-header -->
<div class="entry-meta">
<?php
if ( !get_theme_mod( 'disable_author' ) ) {
cordero_posted_by();
}
if ( !get_theme_mod( 'disable_date' ) ) {
cordero_posted_on();
}
if ( !get_theme_mod( 'disable_cats' ) ) {
cordero_entry_cats();
}
?>
</div><!-- .entry-meta -->
<div class="entry-content"<?php cordero_schema_prop( 'text' ); ?>>
<?php
if ( get_theme_mod( 'blog_post_excerpt' ) === 'full' ) {
the_content();
} else {
the_excerpt();
}
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cordero' ),
'after' => '</div>',
) );
cordero_read_more();
?>
</div><!-- .entry-content -->
<div class="entry-footer">
<?php
cordero_entry_tags();
?>
</div><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

1647
css/block-editor-style.css

File diff suppressed because it is too large

352
css/editor-style.css

@ -0,0 +1,352 @@
/*
Theme Name: Cordero
Description: Used to style the TinyMCE editor.
*/
/**
* Body
*/
body {
background-color: #fff;
color: #313131;
}
/**
* Typography
*/
body,
button,
input,
select,
textarea {
color: #313131;
font-family: 'Work Sans';
font-size: 16px;
font-weight: 300;
line-height: 1.68;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #313131;
font-weight: 600;
line-height: 1.2;
font-family: 'Montserrat';
margin: 0 0 20px;
}
h1{
font-size: 32px;
}
h2{
font-size: 30px;
}
h3{
font-size: 28px;
}
h4{
font-size: 26px;
}
h5{
font-size: 24px;
}
h6{
font-size: 22px;
}
p{
margin: 0 0 15px;
}
dfn,
cite,
em,
i{
font-style: italic;
}
blockquote{
margin: 0 15px;
}
address{
margin: 0 0 15px;
}
pre{
background: #eee;
font-family: "Courier 10 Pitch", Courier, monospace;
font-size: 15px;
font-size: 0.9375rem;
line-height: 1.6;
margin-bottom: 1.6em;
max-width: 100%;
overflow: auto;
padding: 1.6em;
}
code{
background-color: #f2f2f2;
padding: 0.125em 0.25em;
}
code,
kbd,
tt,
var{
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
font-size: 15px;
font-size: 0.9375rem;
}
abbr,
acronym{
border-bottom: 1px dotted #666;
cursor: help;
}
mark,
ins{
background: #fff9c0;
text-decoration: none;
}
big {
font-size: 125%;
}
blockquote:before,
blockquote:after{
content: "\"";
position: absolute;
top: 0;
font-size: 200%;
text-align: center;
width: 30px;
height: 100%;
background: #f2f2f2;
}
blockquote:before{
left: 0;
}
blockquote:after{
right: 0;
}
q:before{
content: "\"";
position: absolute;
top: -.5em;
left: 0;
font-size: 2em;
}
q:after{
content: "\"";
position: absolute;
top: -.5em;
right: 0;
font-size: 2em;
}
blockquote{
quotes: "" "";
position: relative;
font-style: italic;
font-size: 105%;
font-weight: 500;
padding: 10px 40px 10px 40px;
background: #f8f8f8;
border-radius: 2px;
}
q{
quotes: "" "";
position: relative;
padding: 0 17px;
}
/**
* Elements
*/
hr {
background-color: rgba(0,0,0,0.2);
border: 0;
height: 1px;
margin-bottom: 15px;
}
ul,
ol {
margin: 0 0 15px 20px;
padding: 0;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li > ul,
li > ol{
margin-bottom: 0;
margin-left: 15px;
}
dt{
font-weight: bold;
}
dd{
margin: 0 15px 15px;
}
table{
margin: 0 0 15px;
width: 100%;
border: 1px solid #f2f3f5;
}
a{
color: #d82978;
text-decoration: underline;
}
a:hover,
a:focus,
a:active{
color: #d82978;
}
a:focus{
outline: 0;
}
a:hover,
a:active{
outline: 0;
}
button,
.button,
a.button{
display: inline-block;
background: #d82978;
padding: .5em 1em;
color: #fff;
text-decoration: none;
border: 0;
border-radius: 0;
line-height: 1.6;
height: auto;
}
/**
* Alignment
*/
img {
border: 0;
height: auto; /* Make sure images are scaled correctly. */
max-width: 100%; /* Adhere to container width. */
vertical-align: middle;
}
embed,
iframe,
object {
max-width: 100%;
}
/**
* Captions
*/
.wp-caption{
margin-bottom: 15px;
max-width: 100%;
}
.wp-caption img[class*="wp-image-"]{
display: block;
margin-left: auto;
margin-right: auto;
}
.wp-caption .wp-caption-text{
margin: 0.8075em 0;
}
.wp-caption-text{
background: #f9f9f9;
border: 1px solid #f2f3f5;
text-align: center;
font-size: 16px;
}
/**
* Gallery
*/
.gallery{
margin-bottom: 15px;
}
.gallery-item{
display: inline-block;
text-align: center;
vertical-align: top;
width: 100%;
}
.gallery-columns-2 .gallery-item{
max-width: 50%;
}
.gallery-columns-3 .gallery-item{
max-width: 33.33%;
}
.gallery-columns-4 .gallery-item{
max-width: 25%;
}
.gallery-columns-5 .gallery-item{
max-width: 20%;
}
.gallery-columns-6 .gallery-item{
max-width: 16.66%;
}
.gallery-columns-7 .gallery-item{
max-width: 14.28%;
}
.gallery-columns-8 .gallery-item{
max-width: 12.5%;
}
.gallery-columns-9 .gallery-item{
max-width: 11.11%;
}
.gallery-caption{
display: block;
margin: 0 10px 10px 10px;
}

157
css/theme-help.css

@ -0,0 +1,157 @@
/*
* Theme admin help css
*/
.theme-help-wrap {
margin: 25px 40px 0 20px;
max-width: 1050px;
position: relative;
}
.theme-help-wrap img {
max-width: 100%;
}
.theme-help-wrap img.pattern-img {
margin-bottom: 5em;
}
/* Clearing Floats */
.theme-help-wrap .clearfix:before, .theme-help-wrap .clearfix:after {
content: " ";
display: table;
}
.theme-help-wrap .clearfix:after {
clear: both;
}
.theme-help-wrap .clearfix {
*zoom: 1; /* For IE 6/7 only */
}
/* Columns */
.theme-help-wrap .columns-wrapper {
margin-right: -4em;
}
.theme-help-wrap .columns-wrapper .column {
float: left;
padding-right: 4em;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.theme-help-wrap .columns-wrapper .column-half {
width: 50%;
}
.theme-help-wrap .columns-wrapper .column-third {
width: 33.3333333333333%;
}
.theme-help-wrap .columns-wrapper .column-quarter {
width: 25%;
}
/* Font Styles */
.theme-help-wrap h3 {
font-size: 1.6em;
font-weight: 400;
line-height: 1.5em;
margin: 1em 0 0.6em;
}
.theme-help-wrap h4 {
font-size: 1.3em;
font-weight: 400;
margin: 0.2em 0;
}
/* Theme help Header */
.theme-help-wrap h1 {
color: #23282d;
font-size: 2.25em;
line-height: 1.2em;
margin: 0.2em 0 0 0;
}
.theme-help-wrap h1 .theme-version {
display: inline-block;
font-size: 0.5em;
line-height: 1;
padding: 0.2em 0.3em;
background: #fbfbfb;
border-radius: 2px;
transform: translateY(-0.2em);
}
.theme-help-wrap .theme-description {
color: #444;
font-size: 1.25em;
margin: 1em 0;
min-height: 60px;
line-height: 1.6em;
}
/* Getting Started */
#getting-started {
margin: 1em 0;
}
#getting-started .section {
margin: 0.5em 0 2.5em;
}
#getting-started .section .about {
color: #444;
font-size: 1.15em;
line-height: 1.6em;
}
#getting-started img {
margin-top: 1em;
}
#getting-started .section ul {
padding-left: 25px;
}
#getting-started .section li {
list-style-type: disc;
}
/* Screenshot image */
.screenshot {
position: relative;
}
.screenshot img {
transition: all .3s ease;
}
.screenshot .button {
position: absolute;
top: 40%;
left: 50%;
transform: translateX(-50%);
font-size: 1.25em;
padding: 20px 40px;
visibility: hidden;
opacity: 0;
transition: all .3s ease;
}
.screenshot:hover img {
opacity: .3;
transition: all .3s ease;
}
.screenshot:hover .button {
visibility: visible;
opacity: 1;
transition: all .3s ease;
}
/* Theme Author */
#theme-author {
margin: 1em 0;
}
#theme-author p {
color: #444;
font-size: 1.2em;
line-height: 1.6em;
}
/* Buttons */
.button-pro {
background: #d9595c !important;
border-color: #d03337 #d03337 #d03337 !important;
-webkit-box-shadow: 0 1px 0 #d03337 !important;
box-shadow: 0 1px 0 #d03337 !important;
color: #fff !important;
text-decoration: none !important;
text-shadow: 0 -1px 1px #d03337,1px 0 1px #d03337,0 1px 1px #d03337,-1px 0 1px #d03337 !important;
}

107
footer.php

@ -0,0 +1,107 @@
<?php
/**
* The template for displaying the footer
*
* @package Cordero
*/
?>
</div><!-- .container -->
</div><!-- #content -->
<?php
if ( get_theme_mod( 'sticky_footer' ) ) {
$footer_class = ' sticky-footer';
} else {
$footer_class = '';
}
?>
<?php cordero_before_footer(); ?>
<footer id="colophon" class="site-footer<?php echo $footer_class; ?>"<?php cordero_schema_item( 'footer' ); ?>>
<?php if(is_active_sidebar( 'cordero-top-footer' )): ?>
<?php cordero_before_top_footer(); ?>
<div id="top-footer">
<div class="container">
<?php dynamic_sidebar( 'cordero-top-footer' ); ?>
</div>
</div>
<?php cordero_after_top_footer(); ?>
<?php endif; ?>
<?php if(is_active_sidebar( 'cordero-footer1' ) || is_active_sidebar( 'cordero-footer2' ) || is_active_sidebar( 'cordero-footer3' ) ): ?>
<?php cordero_before_middle_footer(); ?>
<div id="middle-footer">
<div class="container">
<div class="middle-footer clearfix">
<div class="footer footer1">
<?php if(is_active_sidebar( 'cordero-footer1' )):
dynamic_sidebar( 'cordero-footer1' );
endif;
?>
</div>
<div class="footer footer2">
<?php if(is_active_sidebar( 'cordero-footer2' )):
dynamic_sidebar( 'cordero-footer2' );
endif;
?>
</div>
<div class="footer footer3">
<?php if(is_active_sidebar( 'cordero-footer3' )):
dynamic_sidebar( 'cordero-footer3' );
endif;
?>
</div>
</div>
</div>
</div>
<?php cordero_after_middle_footer(); ?>
<?php endif; ?>
<?php cordero_before_bottom_footer(); ?>
<?php $footer_layout = get_theme_mod( 'footer_layout', '' ); ?>
<div id="bottom-footer" class="<?php echo esc_attr( $footer_layout ) ?>">
<div class="container">
<?php
if ( $footer_layout === '' || $footer_layout === 'centered' ) {
cordero_powered_by();
}
?>
<?php wp_nav_menu( array(
'theme_location' => 'footer',
'container_id' => 'footer-menu',
'menu_id' => 'footer-menu',
'menu_class' => 'cordero-footer-nav',
'depth' => 1,
'fallback_cb' => 'cordero_footer_menu_fallback',
) ); ?>
<?php
$footer_layout = get_theme_mod( 'footer_layout', '' );
if ( $footer_layout === 'info-right' || $footer_layout === 'centered-info-below' ) {
cordero_powered_by();
}
?>
</div>
</div>
<?php cordero_after_bottom_footer(); ?>
</footer><!-- #colophon -->
<?php cordero_after_footer(); ?>
</div><!-- #page -->
<?php cordero_after_page(); ?>
<?php wp_footer(); ?>
</body>
</html>

44
front-page.php

@ -0,0 +1,44 @@
<?php
if ( is_page_template( 'template-transparent-header.php' ) && get_theme_mod( 'header_layout') !== 'masthead-left' ) {
get_header( 'transparent' );
} else {
get_header();
}
if ( 'page' == get_option( 'show_on_front' ) ) {
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area full-width">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
get_template_part( 'content', 'front-page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_footer(); ?>
<?php
} else {
get_template_part( 'home' );
}
?>

597
functions.php

@ -0,0 +1,597 @@
<?php
/**
* Cordero functions and definitions
*
* @package Cordero
*/
if ( ! function_exists( 'cordero_setup' ) ) :
//Sets up theme defaults and registers support for various WordPress features
function cordero_setup() {
// Make theme available for translation
load_theme_textdomain( 'cordero', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
// Let WordPress manage the document title
add_theme_support( 'title-tag' );
// Support for WooCommerce
add_theme_support( 'woocommerce', array(
'product_grid' => array(
'min_columns' => 2,
'max_columns' => 8,
),
) );
// Enable support for Post Thumbnails on posts and pages.
add_theme_support( 'post-thumbnails' );
// Add custom image size(s)
add_image_size( 'cordero-featured-service', 60, 60, true );
// Make custom image size(s) available to editor
add_filter( 'image_size_names_choose', 'cordero_custom_image_sizes' );
function cordero_custom_image_sizes( $sizes ) {
return array_merge( $sizes, array(
'cordero-featured-service' => __( 'Featured Service', 'cordero' ),
));
}
// This theme uses wp_nav_menu() in two locations
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'cordero' ),
'footer' => esc_html__( 'Footer Menu', 'cordero' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
// Enable support for post formats
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat',
) );
// Set up the WordPress core custom background feature
add_theme_support( 'custom-background', apply_filters( 'cordero_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
// Enable support for Custom Logo
add_theme_support( 'custom-logo', array(
'width' => '',
'height' => '',
'flex-height' => true,
'flex-width' => true,
) );
// Enable support for widgets selective refresh
add_theme_support( 'customize-selective-refresh-widgets' );
// Style the visual editor to resemble the theme style
add_editor_style( array( 'css/editor-style.css', cordero_editor_fonts_url() ) );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
// Support for Gutenberg (5.0+ block editor)
add_theme_support( 'align-wide' );
add_theme_support( 'editor-color-palette', cordero_custom_color_palette() );
add_theme_support( 'editor-font-sizes', cordero_custom_font_sizes() );
add_theme_support( 'custom-line-height' );
// https://jetpack.com/support/infinite-scroll/
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'footer' => false,
) );
}
endif; // cordero_setup
add_action( 'after_setup_theme', 'cordero_setup' );
function cordero_content_width() {
$GLOBALS['content_width'] = apply_filters( 'cordero_content_width', 1160 );
}
add_action( 'after_setup_theme', 'cordero_content_width', 0 );
// Set up the WordPress core custom header feature
function cordero_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'cordero_custom_header_args', array(
'default-image' => '',
'default-text-color' => 'ffffff',
'header-text' => false,
'width' => '1920',
'height' => '180',
'flex-height' => false,
'flex-width' => false,
'wp-head-callback' => '',
) ) );
}
add_action( 'after_setup_theme', 'cordero_custom_header_setup' );
// Enables the Excerpt meta box in Page edit screen
function cordero_add_excerpt_support_for_pages() {
add_post_type_support( 'page', 'excerpt' );
}
add_action( 'init', 'cordero_add_excerpt_support_for_pages' );
// Register widget area
function cordero_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Blog Sidebar', 'cordero' ),
'id' => 'cordero-sidebar',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h4 class="sidebar-widget-title">',
'after_title' => '</h4>',
) );
register_sidebar( array(
'name' => esc_html__( 'Page Sidebar', 'cordero' ),
'id' => 'cordero-sidebar-page',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h4 class="page-sidebar-widget-title">',
'after_title' => '</h4>',
) );
register_sidebar( array(
'name' => esc_html__( 'Shop Sidebar', 'cordero' ),
'id' => 'cordero-sidebar-shop',
'description' => esc_html__( 'Requires WooCommerce plugin.', 'cordero' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h4 class="shop-sidebar-widget-title">',
'after_title' => '</h4>',
) );
register_sidebar( array(
'name' => esc_html__( 'Shop Filters', 'cordero' ),
'id' => 'cordero-sidebar-shop-filters',
'description' => esc_html__( 'Horizontal widget area for product archives. Requires WooCommerce plugin.', 'cordero' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h4 class="shop-filters-widget-title">',
'after_title' => '</h4>',
) );
register_sidebar( array(
'name' => esc_html__( 'Top Bar', 'cordero' ),
'id' => 'cordero-top-bar',
'description' => esc_html__( 'Add your own content above the header.', 'cordero' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="top-bar-widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => esc_html__( 'Top Footer', 'cordero' ),
'description' => esc_html__( 'Full width area above the footer columns.', 'cordero' ),
'id' => 'cordero-top-footer',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="top-footer-widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Column 1', 'cordero' ),
'id' => 'cordero-footer1',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="footer-column-widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Column 2', 'cordero' ),
'id' => 'cordero-footer2',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="footer-column-widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Column 3', 'cordero' ),
'id' => 'cordero-footer3',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="footer-column-widget-title">',
'after_title' => '</h5>',
) );
}
add_action( 'widgets_init', 'cordero_widgets_init' );
if ( ! function_exists( 'cordero_fonts_url' ) ) :
/**
* Register Google fonts for Cordero
* @return string Google fonts URL for the theme
*/
function cordero_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = 'latin,latin-ext';
/*
* Translators: If there are characters in your language that are not supported
* translate this to 'off'. Do not translate into your own language.
*/
if ( 'off' !== _x( 'on', 'Google fonts: on or off', 'cordero' ) ) {
$fonts[] = get_theme_mod( 'font_site_title', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts[] = get_theme_mod( 'font_nav', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts[] = get_theme_mod( 'font_content', 'Work Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts[] = get_theme_mod( 'font_headings', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts = str_replace('Arial, Helvetica, sans-serif', '', $fonts);
$fonts = str_replace('Impact, Charcoal, sans-serif', '', $fonts);
$fonts = str_replace('"Lucida Sans Unicode", "Lucida Grande", sans-serif', '', $fonts);
$fonts = str_replace('Tahoma, Geneva, sans-serif', '', $fonts);
$fonts = str_replace('"Trebuchet MS", Helvetica, sans-serif', '', $fonts);
$fonts = str_replace('Verdana, Geneva, sans-serif', '', $fonts);
$fonts = str_replace('Georgia, serif', '', $fonts);
$fonts = str_replace('"Palatino Linotype", "Book Antiqua", Palatino, serif', '', $fonts);
$fonts = str_replace('"Times New Roman", Times, serif', '', $fonts);
}
$fonts = array_filter( $fonts );
if ( empty( $fonts ) ) {
$google_fonts_empty = 1;
} else {
$google_fonts_empty = 0;
}
/*
* Translators: To add an additional character subset specific to your language,
* translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
*/
$subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'cordero' );
if ( 'cyrillic' == $subset ) {
$subsets .= ',cyrillic,cyrillic-ext';
} elseif ( 'greek' == $subset ) {
$subsets .= ',greek,greek-ext';
} elseif ( 'devanagari' == $subset ) {
$subsets .= ',devanagari';
} elseif ( 'vietnamese' == $subset ) {
$subsets .= ',vietnamese';
}
if ( $google_fonts_empty == 0 ) {
$fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', array_unique($fonts) ) ),
'subset' => urlencode( $subsets ),
), '//fonts.googleapis.com/css' );
return esc_url_raw($fonts_url);
} else {
return;
}
}
endif;
if ( ! function_exists( 'cordero_editor_fonts_url' ) ) :
/**
* Register Google fonts for Cordero
* @return string Google fonts URL for the tinyMCE editor
*/
function cordero_editor_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = 'latin,latin-ext';
/*
* Translators: If there are characters in your language that are not supported
* translate this to 'off'. Do not translate into your own language.
*/
if ( 'off' !== _x( 'on', 'Google fonts: on or off', 'cordero' ) ) {
$fonts[] = get_theme_mod( 'font_site_title', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts[] = get_theme_mod( 'font_nav', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts[] = get_theme_mod( 'font_content', 'Work Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts[] = get_theme_mod( 'font_headings', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
$fonts = str_replace('Arial, Helvetica, sans-serif', '', $fonts);
$fonts = str_replace('Impact, Charcoal, sans-serif', '', $fonts);
$fonts = str_replace('"Lucida Sans Unicode", "Lucida Grande", sans-serif', '', $fonts);
$fonts = str_replace('Tahoma, Geneva, sans-serif', '', $fonts);
$fonts = str_replace('"Trebuchet MS", Helvetica, sans-serif', '', $fonts);
$fonts = str_replace('Verdana, Geneva, sans-serif', '', $fonts);
$fonts = str_replace('Georgia, serif', '', $fonts);
$fonts = str_replace('"Palatino Linotype", "Book Antiqua", Palatino, serif', '', $fonts);
$fonts = str_replace('"Times New Roman", Times, serif', '', $fonts);
}
$fonts = array_filter( $fonts );
if ( empty( $fonts ) ) {
$google_fonts_empty = 1;
} else {
$google_fonts_empty = 0;
}
/*
* Translators: To add an additional character subset specific to your language,
* translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
*/
$subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'cordero' );
if ( 'cyrillic' == $subset ) {
$subsets .= ',cyrillic,cyrillic-ext';
} elseif ( 'greek' == $subset ) {
$subsets .= ',greek,greek-ext';
} elseif ( 'devanagari' == $subset ) {
$subsets .= ',devanagari';
} elseif ( 'vietnamese' == $subset ) {
$subsets .= ',vietnamese';
}
if ( $google_fonts_empty == 0 ) {
$fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', array_unique($fonts) ) ),
'subset' => urlencode( $subsets ),
), '//fonts.googleapis.com/css' );
return esc_url_raw($fonts_url);
} else {
return;
}
}
endif;
/**
* Enqueue scripts and styles.
*/
function cordero_scripts() {
wp_enqueue_style( 'dashicons' );
wp_enqueue_script( 'touchswipe', get_template_directory_uri() . '/js/jquery.touchSwipe.min.js', array( 'jquery' ), '1.6.18', true );
wp_enqueue_script( 'cordero-custom', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0', true );
wp_enqueue_script( 'cordero-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '1.0', true );
wp_enqueue_style( 'cordero-fonts', cordero_fonts_url(), array(), null );
wp_enqueue_style( 'cordero-style', get_stylesheet_uri() );
wp_add_inline_style( 'cordero-style', cordero_dynamic_style() );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'cordero_scripts' );
/**
* Enqueue scripts and styles for Block Editor.
*/
function cordero_block_editor_assets() {
wp_enqueue_style( 'cordero-block-editor-fonts', cordero_editor_fonts_url() );
wp_enqueue_style( 'cordero-block-editor-style', get_template_directory_uri() . '/css/block-editor-style.css' );
wp_add_inline_style( 'cordero-block-editor-style', cordero_block_editor_dynamic_style() );
}
add_action( 'enqueue_block_editor_assets', 'cordero_block_editor_assets' );
/**
* Custom block editor color palette.
*/
if ( !function_exists( 'cordero_custom_color_palette' ) ) {
function cordero_custom_color_palette() {
return array(
array(
'name' => esc_html__( 'Cordero - Accent color', 'cordero' ),
'slug' => 'accent-color',
'color' => get_theme_mod( 'accent_color', '#d82978' ),
),
array(
'name' => esc_html__( 'Cordero - Color 2', 'cordero' ),
'slug' => 'accent-color2',
'color' => get_theme_mod( 'accent_color2', '#2d2354' ),
),
array(
'name' => esc_html__( 'Cordero - Color 3', 'cordero' ),
'slug' => 'accent-color3',
'color' => get_theme_mod( 'accent_color3', '#fbfbfb' ),
),
array(
'name' => esc_html__( 'Black', 'cordero' ),
'slug' => 'black',
'color' => '#000000'
),
array(
'name' => esc_html__( 'White', 'cordero' ),
'slug' => 'white',
'color' => '#ffffff'
),
array(
'name' => esc_html__( 'Pale pink', 'cordero' ),
'slug' => 'pale-pink',
'color' => '#f78da7'
),
array(
'name' => esc_html__( 'Vivid red', 'cordero' ),
'slug' => 'vivid-red',
'color' => '#cf2e2e',
),
array(
'name' => esc_html__( 'Luminous vivid orange', 'cordero' ),
'slug' => 'luminous-vivid-orange',
'color' => '#ff6900',
),
array(
'name' => esc_html__( 'Luminous vivid amber', 'cordero' ),
'slug' => 'luminous-vivid-amber',
'color' => '#fcb900',
),
array(
'name' => esc_html__( 'Light green cyan', 'cordero' ),
'slug' => 'light-green-cyan',
'color' => '#7bdcb5',
),
array(
'name' => esc_html__( 'Vivid green cyan', 'cordero' ),
'slug' => 'vivid-green-cyan',
'color' => '#00d084',
),
array(
'name' => esc_html__( 'Pale cyan blue', 'cordero' ),
'slug' => 'pale-cyan-blue',
'color' => '#8ed1fc',
),
array(
'name' => esc_html__( 'Vivid cyan blue', 'cordero' ),
'slug' => 'vivid-cyan-blue',
'color' => '#0693e3',
),
array(
'name' => esc_html__( 'Vivid purple', 'cordero' ),
'slug' => 'vivid-purple',
'color' => '#9b51e0',
),
array(
'name' => esc_html__( 'Very light gray', 'cordero' ),
'slug' => 'very-light-gray',
'color' => '#eeeeee',
),
array(
'name' => esc_html__( 'Cyan bluish gray', 'cordero' ),
'slug' => 'cyan-bluish-gray',
'color' => '#abb8c3',
),
array(
'name' => esc_html__( 'Very dark gray', 'cordero' ),
'slug' => 'very-dark-gray',
'color' => '#313131',
),
);
}
}
/**
* Custom block editor font sizes.
*/
if ( !function_exists( 'cordero_custom_font_sizes' ) ) {
function cordero_custom_font_sizes() {
return array(
array(
'name' => __( 'Tiny', 'cordero' ),
'size' => 10,
'slug' => 'tiny'
),
array(
'name' => __( 'Small', 'cordero' ),
'size' => 13,
'slug' => 'small'
),
array(
'name' => __( 'Normal', 'cordero' ),
'size' => 16,
'slug' => 'normal'
),
array(
'name' => __( 'Medium', 'cordero' ),
'size' => 24,
'slug' => 'medium'
),
array(
'name' => __( 'Large', 'cordero' ),
'size' => 36,
'slug' => 'large'
),
array(
'name' => __( 'Huge', 'cordero' ),
'size' => 48,
'slug' => 'huge'
),
array(
'name' => __( 'Gigantic', 'cordero' ),
'size' => 60,
'slug' => 'gigantic'
),
array(
'name' => __( 'Massive', 'cordero' ),
'size' => 72,
'slug' => 'massive'
),
);
}
}
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/functions/template-tags.php';
/**
* Custom functions.
*/
require get_template_directory() . '/functions/extras.php';
require get_template_directory() . '/functions/hooks.php';
require get_template_directory() . '/functions/schema.php';
require get_template_directory() . '/functions/style-output.php';
require get_template_directory() . '/functions/fonts.php';
/**
* Block patterns.
*/
if ( function_exists( 'register_block_pattern' ) ) {
require get_template_directory() . '/functions/block-patterns.php';
}
/**
* Block styles.
*/
if ( function_exists( 'register_block_style' ) ) {
require get_template_directory() . '/functions/block-styles.php';
}
/**
* Customizer additions.
*/
require get_template_directory() . '/functions/customizer-controls.php';
require get_template_directory() . '/functions/customizer.php';
/**
* Theme help page.
*/
if ( is_admin() ) {
require get_template_directory() . '/functions/theme-help.php';
}
if ( !function_exists( 'wp_body_open' ) ) {
function wp_body_open() {
do_action( 'wp_body_open' );
}
}
/**
* TGM Plugin activation.
*/
require_once get_template_directory() . '/functions/class-tgm-plugin-activation.php';
function cordero_reg_plugin() {
$plugins[] = array(
'name' => esc_html__( 'Starter Sites', 'cordero' ),
'slug' => 'starter-sites',
'required' => false,
);
tgmpa( $plugins);
}
add_action( 'tgmpa_register', 'cordero_reg_plugin' );

1429
functions/block-patterns.php

File diff suppressed because it is too large

431
functions/block-styles.php

@ -0,0 +1,431 @@
<?php
/**
*
* Adds custom Block Styles to the post/page editor.
*
* @link https://developer.wordpress.org/block-editor/developers/filters/block-filters/
*
* @package Cordero
*/
register_block_style(
'core/group',
array(
'name' => 'translucent',
'label' => __( 'Translucent', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/group',
array(
'name' => 'box-shadow',
'label' => __( 'Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/group',
array(
'name' => 'quote',
'label' => __( 'Quote', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/group',
array(
'name' => 'point-down',
'label' => __( 'Point - down', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/group',
array(
'name' => 'point-up',
'label' => __( 'Point - up', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/heading',
array(
'name' => 'box-shadow',
'label' => __( 'Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/heading',
array(
'name' => 'with-separator',
'label' => __( 'With Separator (style 1)', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/heading',
array(
'name' => 'with-separator-2',
'label' => __( 'With Separator (style 2)', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/heading',
array(
'name' => 'zero-margin',
'label' => __( 'Without Bottom Margin', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/heading',
array(
'name' => 'content-width',
'label' => __( 'Content Width', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/heading',
array(
'name' => 'rc-10',
'label' => __( 'Rounded Corners', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'box-shadow',
'label' => __( 'Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'with-separator',
'label' => __( 'With Separator (style 1)', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'with-separator-2',
'label' => __( 'With Separator (style 2)', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'zero-margin',
'label' => __( 'Without Bottom Margin', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'content-width',
'label' => __( 'Content Width', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'rc-10',
'label' => __( 'Rounded Corners', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/image',
array(
'name' => 'chevron-left',
'label' => __( 'Chevron - left', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/image',
array(
'name' => 'chevron-right',
'label' => __( 'Chevron - right', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/image',
array(
'name' => 'point-down',
'label' => __( 'Point - down', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/image',
array(
'name' => 'point-up',
'label' => __( 'Point - up', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/image',
array(
'name' => 'box-shadow',
'label' => __( 'Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/columns',
array(
'name' => 'no-spacing',
'label' => __( 'No Spacing', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/columns',
array(
'name' => 'not-stacked-on-mobile',
'label' => __( 'Not Stacked on Mobile', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/columns',
array(
'name' => 'no-spacing-not-stacked-on-mobile',
'label' => __( 'No Spacing + Not Stacked on Mobile', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/gallery',
array(
'name' => 'no-spacing',
'label' => __( 'No Spacing', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/gallery',
array(
'name' => 'box-shadow',
'label' => __( 'Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/gallery',
array(
'name' => 'bordered',
'label' => __( 'Bordered', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/gallery',
array(
'name' => 'framed',
'label' => __( 'Framed', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/gallery',
array(
'name' => 'inset-frame',
'label' => __( 'Inset Frame', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/cover',
array(
'name' => 'no-padding',
'label' => __( 'No Padding', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/cover',
array(
'name' => 'point-down',
'label' => __( 'Point - down', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/cover',
array(
'name' => 'point-up',
'label' => __( 'Point - up', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/cover',
array(
'name' => 'inset-frame',
'label' => __( 'Inset Frame', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/column',
array(
'name' => 'offset',
'label' => __( 'Offset', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/column',
array(
'name' => 'box-shadow',
'label' => __( 'Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/column',
array(
'name' => 'offset-box-shadow',
'label' => __( 'Offset and Box Shadow', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/separator',
array(
'name' => 'extra-small',
'label' => __( 'Extra Small', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/separator',
array(
'name' => 'small',
'label' => __( 'Small', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/separator',
array(
'name' => 'medium',
'label' => __( 'Medium', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/separator',
array(
'name' => 'large',
'label' => __( 'Large', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/separator',
array(
'name' => 'extra-large',
'label' => __( 'Extra Large', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/separator',
array(
'name' => 'huge',
'label' => __( 'Huge', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/media-text',
array(
'name' => 'inset-frame',
'label' => __( 'Inset Frame', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/media-text',
array(
'name' => 'angled-divider',
'label' => __( 'Angled Divider', 'cordero' ),
'style_handle' => 'cordero-style',
)
);
register_block_style(
'core/media-text',
array(
'name' => 'media-text-overlap',
'label' => __( 'Overlapping Content (requires image fill)', 'cordero' ),
'style_handle' => 'cordero-style',
)
);

3763
functions/class-tgm-plugin-activation.php

File diff suppressed because it is too large

96
functions/css/customizer-style.css

@ -0,0 +1,96 @@
.customize-control select{
width: 98%;
}
#customize-theme-controls .control-section.control-panel-nav_menus{
margin-top: 25px;
border-top: 1px solid #ddd;
}
#customize-theme-controls #accordion-section-custom_css.control-section{
margin-top: 25px;
border-top: 1px solid #ddd;
}
#customize-theme-controls .accordion-section-content{
background: #FFF;
}
h3.cordero-accordion-section-title{
color: #fff;
font-size: 125%;
padding: 10px 10px 11px 14px;
line-height: 21px;
background: #0073aa;
margin: 0 -12px 0;
}
h5.cordero-accordion-section-title{
font-size: 110%;
padding: 10px 10px 11px 14px;
line-height: 21px;
background: #f2f3f5;
margin: 0 -12px 0;
}
.cordero-accordion-section-paragraph{
padding: 0px 10px 11px 14px;
line-height: 16px;
margin: 0 -12px 0;
}
[id*="customize-control-fs_"].customize-control,
[id*="customize-control-ft_"].customize-control{
width: 46%;
margin-right: 3%;
}
[id*="customize-control-fw_"].customize-control,
[id*="customize-control-fl_"].customize-control{
width: 46%;
margin-left: 3%;
clear: none;
}
.cordero-img-container .cordero-radio-img-img{
border: 2px solid #f2f3f5;
cursor: pointer;
margin: 0 4px 4px 0;
}
.cordero-img-container .cordero-radio-img-selected{
border: 2px solid #0085BA;
margin: 0 4px 4px 0;
}
.cordero-img-container input[type=checkbox]:before{
content: '';
margin: -3px 0 0 -4px;
}
.cordero-img-container li{
display: inline-block;
width: 46%;
margin-right: 3%;
}
/*Theme Info*/
.cordero-info{
margin-top: 10px;
}
.cordero-info a{
background: #0073aa;
padding: 5px 10px;
color: #FFF;
text-align: center;
display: block;
margin-top: 5px;
line-height: 1.2;
box-shadow: none;
opacity: 1;
}
.cordero-info a:hover{
opacity: 0.8;
}

178
functions/customizer-controls.php

@ -0,0 +1,178 @@
<?php
/**
* Array of customizer settings, controls and outputs
*
* @package Cordero
*/
if ( !function_exists( 'cordero_customizer_array' ) ) {
function cordero_customizer_array() {
return array(
'accent_color' => array(
'type' => 'setting',
'default' => '#d82978',
'transport' => 'postMessage',
'sanitize' => 'sanitize_hex_color',
'control' => 'color',
'label' => __( 'Accent Color', 'cordero' ),
'description' => __( 'Links, buttons', 'cordero' ),
'section' => 'colors',
'priority' => '',
),
'accent_color2' => array(
'type' => 'setting',
'default' => '#2d2354',
'transport' => 'postMessage',
'sanitize' => 'sanitize_hex_color',
'control' => 'color',
'label' => __( 'Color 2', 'cordero' ),
'description' => __( 'Background: transparent header on scrolling, footer', 'cordero' ),
'section' => 'colors',
'priority' => '',
),
'accent_color3' => array(
'type' => 'setting',
'default' => '#fbfbfb',
'transport' => 'postMessage',
'sanitize' => 'sanitize_hex_color',
'control' => 'color',
'label' => __( 'Color 3', 'cordero' ),
'description' => __( 'Background: blog posts (not plain style), sidebar, page numbers, forms, tables', 'cordero' ),
'section' => 'colors',
'priority' => '',
),
'layout_options' => array(
'type' => 'section',
'label' => __( 'Layout Options', 'cordero' ),
'description' => '',
'priority' => 26,
),
'blog_options' => array(
'type' => 'section',
'label' => __( 'Blog Options', 'cordero' ),
'description' => '',
'priority' => 28,
),
'container_width' => array(
'type' => 'setting',
'default' => '1240',
'transport' => 'postMessage',
'sanitize' => 'absint',
'control' => 'number',
'label' => __( 'Container Width', 'cordero' ),
'description' => '',
'section' => 'layout_options',
'attrs' => array(
'min' => 1120,
'max' => 2560,
'step' => 1,
),
),
'header_search_off' => array(
'type' => 'setting',
'default' => 0,
'transport' => 'postMessage',
'sanitize' => 'cordero_sanitize_checkbox',
'control' => 'checkbox',
'label' => __( 'Disable Search Form in Header', 'cordero' ),
'description' => '',
'section' => 'layout_options',
'priority' => 23,
),
);
}
}
/**
* Return customizer settings and controls
*/
if ( !function_exists( 'cordero_customizer_controls' ) ) {
function cordero_customizer_controls() {
global $wp_customize;
$controls = cordero_customizer_array();
foreach ( $controls as $control => $value ) {
if ( $value['type'] == 'section' ) {
$wp_customize->add_section(
$control,
array(
'title' => $value['label'],
'description'=> $value['description'],
'priority' => $value['priority'],
)
);
} elseif ( $value['type'] == 'setting' ) {
$wp_customize->add_setting(
$control,
array(
'default' => $value['default'],
'transport' => $value['transport'],
'sanitize_callback' => $value['sanitize'],
)
);
if ( $value['control'] == 'color' ) {
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
$control,
array(
'settings' => $control,
'section' => $value['section'],
'label' => $value['label'],
'description'=> $value['description'],
)
)
);
} elseif ( $value['control'] == 'number' ) {
$wp_customize->add_control(
$control,
array(
'settings' => $control,
'section' => $value['section'],
'label' => $value['label'],
'description'=> $value['description'],
'type' => 'number',
'input_attrs' => $value['attrs'],
)
);
} elseif ( $value['control'] == 'checkbox' ) {
$wp_customize->add_control(
$control,
array(
'settings' => $control,
'section' => $value['section'],
'label' => $value['label'],
'description'=> $value['description'],
'type' => 'checkbox',
'priority' => $value['priority'],
)
);
}
}
}
}
}

1156
functions/customizer.php

File diff suppressed because it is too large

682
functions/extras.php

@ -0,0 +1,682 @@
<?php
/**
* Custom functions that act independently of the theme templates
*
* Eventually, some of the functionality here could be replaced by core features
*
* @package Cordero
*/
/**
* Adds custom classes to the array of body classes
*
* @param array $classes Classes for the body element
* @return array
*/
if ( !function_exists( 'cordero_body_classes' ) ) {
function cordero_body_classes( $classes ) {
// Adds a class of group-blog to blogs with more than 1 published author
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
if ( get_theme_mod( 'hide_tagline' ) ) {
$classes[] = 'tagline-hidden';
}
if ( post_password_required() ) {
$classes[] = 'post-password-required';
}
$sidebar_position = get_theme_mod( 'sidebar_position' );
if ( $sidebar_position === 'left' ) {
$classes[] = 'sidebar-left';
} elseif ( $sidebar_position === 'below' ) {
$classes[] = 'sidebar-below';
}
if ( get_theme_mod( 'header_layout' ) === 'masthead-left' ) {
$classes[] = 'masthead-left';
}
return $classes;
}
}
add_filter( 'body_class', 'cordero_body_classes' );
if ( !function_exists( 'cordero_primary_menu_sub_trigger' ) ) {
function cordero_primary_menu_sub_trigger( $args, $item ) {
if ( 'primary' === $args->theme_location ) {
if ( in_array( 'menu-item-has-children', $item->classes, true ) ) {
$args->after = '<button class="sub-trigger"></button>';
} else {
$args->after = '';
}
}
return $args;
}
}
add_filter( 'nav_menu_item_args', 'cordero_primary_menu_sub_trigger', 10, 2 );
if ( !function_exists( 'cordero_primary_menu_fallback' ) ) {
function cordero_primary_menu_fallback() {
echo '<ul id="primary-menu" class="demo-menu">';
if ( is_user_logged_in() && current_user_can( 'edit_theme_options' ) ) {
echo '<li class="menu-item"><a href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Create your Primary Menu here', 'cordero' ) . '</a></li>';
} else {
wp_list_pages( array( 'depth' => 1, 'sort_column' => 'post_name', 'title_li' => '' ) );
}
echo '</ul>';
}
}
if ( !function_exists( 'cordero_footer_menu_fallback' ) ) {
function cordero_footer_menu_fallback() {
if ( function_exists( 'the_privacy_policy_link' ) ) {
echo '<div class="site-info-right">';
the_privacy_policy_link( '', '' );
echo '</div>';
}
}
}
if ( !function_exists( 'cordero_custom_excerpt_length' ) ) {
function cordero_custom_excerpt_length( $length ) {
if ( is_admin() ) {
return $length;
} else {
return get_theme_mod( 'excerpt_length', '20' );
}
}
}
add_filter( 'excerpt_length', 'cordero_custom_excerpt_length', 999 );
if ( !function_exists( 'cordero_excerpt_more' ) ) {
function cordero_excerpt_more( $more ) {
if ( is_admin() ) {
return $more;
} else {
return '&hellip;';
}
}
}
add_filter( 'excerpt_more', 'cordero_excerpt_more' );
if ( !function_exists( 'cordero_archive_title_prefix' ) ) {
function cordero_archive_title_prefix( $title ) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = '<span class="author vcard">' . get_avatar( get_the_author_meta( 'ID' ), '90' ) . esc_html( get_the_author() ) . '</span>';
}
return $title;
}
}
add_filter( 'get_the_archive_title', 'cordero_archive_title_prefix' );
if ( !function_exists( 'cordero_header_menu' ) ) {
function cordero_header_menu() {
$header_layout = get_theme_mod( 'header_layout', '' );
?>
<button class="toggle-nav"></button>
<?php cordero_before_site_nav(); ?>
<div id="site-navigation" role="navigation"<?php cordero_schema_item( 'nav' ); ?>>
<button class="toggle-nav-open"></button>
<?php
if ( $header_layout == 'logo-right' ) {
cordero_header_content_extra();
}
?>
<div class="site-main-menu">
<?php cordero_before_main_menu(); ?>
<?php wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'fallback_cb' => 'cordero_primary_menu_fallback',
)
); ?>
<?php cordero_after_main_menu(); ?>
</div>
<?php
if ( $header_layout == 'logo-left' || $header_layout == 'logo-below' || $header_layout == 'masthead-left' || $header_layout == '' ) {
cordero_header_content_extra();
}
?>
<button class="menu-close"><?php esc_html_e( 'Close Menu', 'cordero' ); ?></button>
</div>
<div id="site-nav-after" class="site-nav-after"></div>
<?php cordero_after_site_nav(); ?>
<?php
}
}
if ( !function_exists( 'cordero_header_content' ) ) {
function cordero_header_content() {
cordero_site_branding_start();
?>
<?php if ( get_theme_mod( 'custom_logo' ) ) { ?>
<div class="site-logo">
<?php the_custom_logo(); ?>
</div>
<?php } else { ?>
<?php if ( is_front_page() ) { ?>
<h1 class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></h1>
<?php } else { ?>
<p class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></p>
<?php }
} ?>
<div class="site-description"<?php cordero_schema_prop( 'desc' ); ?>><?php echo esc_html( get_bloginfo( 'description' ) ); ?></div>
<?php
cordero_site_branding_end();
}
}
if ( !function_exists( 'cordero_transparent_header_content' ) ) {
function cordero_transparent_header_content() {
cordero_site_branding_start();
?>
<?php if ( get_theme_mod( 'logo_transparent_header' ) ) { ?>
<div class="site-logo">
<?php cordero_custom_logo_transparent(); ?>
</div>
<?php } else { ?>
<?php if ( is_front_page() ) { ?>
<h1 class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></h1>
<?php } else { ?>
<p class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></p>
<?php }
} ?>
<div class="site-description"<?php cordero_schema_prop( 'desc' ); ?>><?php echo esc_html( get_bloginfo( 'description' ) ); ?></div>
<?php
cordero_site_branding_end();
}
}
if ( !function_exists( 'cordero_custom_logo_transparent' ) ) {
function cordero_custom_logo_transparent() {
$html = '';
$custom_logo_id = get_theme_mod( 'logo_transparent_header' );
// We have a logo. Logo is go.
if ( $custom_logo_id ) {
$custom_logo_attr = array(
'class' => 'custom-logo',
);
if ( is_front_page() ) {
/*
* If on the home page, set the logo alt attribute to an empty string,
* as the image is decorative and doesn't need its purpose to be described.
*/
$custom_logo_attr['alt'] = '';
} else {
/*
* If the logo alt attribute is empty, get the site title and explicitly pass it
* to the attributes used by wp_get_attachment_image().
*/
$image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true );
if ( empty( $image_alt ) ) {
$custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' );
}
}
/*
* If the alt attribute is not empty, there's no need to explicitly pass it
* because wp_get_attachment_image() already adds the alt attribute.
*/
$image = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr );
if ( is_front_page() ) {
// If on the home page, don't link the logo to home.
$html = sprintf(
'<span class="custom-logo-link">%1$s</span>',
$image
);
} else {
$html = sprintf(
'<a href="%1$s" class="custom-logo-link" rel="home">%2$s</a>',
esc_url( home_url( '/' ) ),
$image
);
}
} elseif ( is_customize_preview() ) {
// If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
$html = sprintf(
'<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo"/></a>',
esc_url( home_url( '/' ) )
);
}
echo $html;
}
}
if ( !function_exists( 'cordero_header_content_customizer' ) ) {
function cordero_header_content_customizer() {
cordero_site_branding_start();
?>
<div class="site-logo">
<?php the_custom_logo(); ?>
</div>
<?php if ( is_front_page() ) { ?>
<h1 class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></h1>
<?php } else { ?>
<p class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></p>
<?php }
?>
<div class="site-description"<?php cordero_schema_prop( 'desc' ); ?>><?php echo esc_html( get_bloginfo( 'description' ) ); ?></div>
<?php
cordero_site_branding_end();
}
}
if ( !function_exists( 'cordero_transparent_header_content_customizer' ) ) {
function cordero_transparent_header_content_customizer() {
cordero_site_branding_start();
?>
<div class="site-logo">
<?php cordero_custom_logo_transparent(); ?>
</div>
<?php if ( is_front_page() ) { ?>
<h1 class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></h1>
<?php } else { ?>
<p class="site-title"<?php cordero_schema_prop( 'name' ); ?>><a class="<?php echo esc_attr( get_theme_mod( 'site_title_style' ) );?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"<?php cordero_schema_prop( 'url' ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a></p>
<?php }
?>
<div class="site-description"<?php cordero_schema_prop( 'desc' ); ?>><?php echo esc_html( get_bloginfo( 'description' ) ); ?></div>
<?php
cordero_site_branding_end();
}
}
if ( !function_exists( 'cordero_site_branding_start' ) ) {
function cordero_site_branding_start() {
?>
<?php cordero_before_site_branding(); ?>
<div id="site-branding" class="<?php echo esc_attr( get_theme_mod( 'site_title_style', 'border' ) ); ?>"<?php cordero_schema_item( 'org' ); ?>>
<?php
}
}
if ( !function_exists( 'cordero_site_branding_end' ) ) {
function cordero_site_branding_end() {
?>
</div><!-- #site-branding -->
<?php cordero_after_site_branding(); ?>
<?php
}
}
if ( !function_exists( 'cordero_header_content_extra' ) ) {
function cordero_header_content_extra() {
?>
<div class="extra-wrap noSwipe">
<?php cordero_before_header_search(); ?>
<?php cordero_header_search() ?>
<?php cordero_header_account(); ?>
<?php cordero_header_wishlist(); ?>
<?php cordero_header_cart(); ?>
<?php cordero_after_header_cart(); ?>
</div>
<?php
}
}
if ( !function_exists( 'cordero_header_account' ) ) {
function cordero_header_account() {
if ( class_exists( 'WooCommerce' ) ) { ?>
<div class="top-account">
<?php $woo_account_page_id = get_option( 'woocommerce_myaccount_page_id' );
if ( $woo_account_page_id ) { ?>
<a class="cordero-account" href="<?php echo esc_url( get_permalink( $woo_account_page_id ) ); ?>" role="button"><span id="icon-user" class="icons cordero-icon-user"></span></a>
<?php } else { ?>
<span class="cordero-account" role="button"><span id="icon-user" class="icons cordero-icon-user"></span></span>
<?php } ?>
<div class="mini-account">
<?php if ( is_user_logged_in() ) {
woocommerce_account_navigation();
} else {
wc_get_template( 'myaccount/form-login.php' );
} ?>
</div>
</div>
<?php }
}
}
if ( !function_exists( 'cordero_header_search' ) ) {
function cordero_header_search() {
?>
<div class="top-search">
<button class="icons cordero-icon-search"></button>
<div class="mini-search">
<?php if ( class_exists( 'WooCommerce' ) ) {
get_product_search_form();
} else {
get_search_form();
} ?>
<button class="icons search-close"><?php esc_html_e( 'Close Search', 'cordero' ); ?></button>
</div>
</div>
<?php }
}
if ( !function_exists( 'cordero_header_wishlist' ) ) {
function cordero_header_wishlist() {
if ( class_exists( 'WooCommerce' ) ) {
if ( class_exists( 'YITH_WCWL' ) ) { ?>
<div class="top-wishlist"><a class="cordero-wishlist" href="<?php echo esc_url( YITH_WCWL()->get_wishlist_url() ); ?>" role="button"><span class="icons cordero-icon-heart"></span><span class="wishlist_products_counter_number"><?php echo yith_wcwl_count_all_products(); ?></span></a></div>
<?php } elseif ( class_exists( 'TInvWL' ) ) { ?>
<div class="top-wishlist"> <?php
echo do_shortcode( '[ti_wishlist_products_counter show_icon="off" show_text="off"]' ); ?>
</div> <?php
}
}
}
}
if ( !function_exists( 'cordero_update_wishlist_count' ) ) {
function cordero_update_wishlist_count() {
if( class_exists( 'YITH_WCWL' ) ){
wp_send_json( array(
'count' => yith_wcwl_count_all_products()
) );
}
}
}
add_action( 'wp_ajax_yith_wcwl_update_wishlist_count', 'cordero_update_wishlist_count' );
add_action( 'wp_ajax_nopriv_yith_wcwl_update_wishlist_count', 'cordero_update_wishlist_count' );
if ( !function_exists( 'cordero_header_cart' ) ) {
function cordero_header_cart() {
if ( class_exists( 'WooCommerce' ) ) {
$cart_items = WC()->cart->get_cart_contents_count();
if ( $cart_items > 0 ) {
$cart_class = ' items';
} else {
$cart_class = '';
} ?>
<div class="top-cart<?php echo $cart_class; ?>"><a class="cordero-cart" href="<?php echo esc_url( wc_get_cart_url() ); ?>" role="button"><span class="icons cordero-icon-shopping-cart"></span><?php echo sprintf ( '<span class="item-count">%d</span>', $cart_items ); ?></a><div class="mini-cart"><?php woocommerce_mini_cart();?></div></div>
<?php }
}
}
/**
* Update header mini-cart contents when products are added to the cart via AJAX
*/
if ( !function_exists( 'cordero_header_cart_update' ) ) {
function cordero_header_cart_update( $fragments ) {
$cart_items = WC()->cart->get_cart_contents_count();
if ( $cart_items > 0 ) {
$cart_class = ' items';
} else {
$cart_class = '';
}
ob_start();
?>
<div class="top-cart<?php echo $cart_class; ?>"><a class="cordero-cart" href="<?php echo esc_url( wc_get_cart_url() ); ?>" role="button"><span class="icons cordero-icon-shopping-cart"></span><?php echo sprintf ( '<span class="item-count">%d</span>', $cart_items ); ?></a><div class="mini-cart"><?php woocommerce_mini_cart();?></div></div>
<?php
$fragments['.top-cart'] = ob_get_clean();
return $fragments;
}
}
add_filter( 'woocommerce_add_to_cart_fragments', 'cordero_header_cart_update' );
/**
* Powered by WordPress
*/
if ( !function_exists( 'cordero_powered_by' ) ) {
function cordero_powered_by() {
?>
<div class="site-info">
<div class="copyright">
<?php echo '&copy; ' . date_i18n( 'Y' ) . ' ' . esc_html( get_bloginfo( 'name' ) ); ?>
</div>
<div class="theme">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'cordero' ) ); ?>"><?php printf( esc_html__( 'Powered by %s', 'cordero' ), 'WordPress' ); ?></a>
<span class="sep"> | </span>
<?php /* translators: %2$s link to theme page, %1$s theme author */
printf( esc_html__( 'Theme: %2$s by %1$s', 'cordero' ), 'UXL Themes', '<a href="https://uxlthemes.com/theme/cordero/" rel="designer">Cordero</a>' ); ?>
</div>
</div>
<?php
}
}
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_sidebar', 'woocommerce_get_sidebar', 10);
add_action( 'woocommerce_before_main_content', 'cordero_theme_wrapper_start', 10);
add_action( 'woocommerce_after_main_content', 'cordero_theme_wrapper_end', 10);
add_action( 'woocommerce_before_shop_loop', 'cordero_shop_filter_section', 15);
add_action( 'woocommerce_before_shop_loop_item', 'cordero_before_shop_loop_item', 0);
add_action( 'woocommerce_before_subcategory', 'cordero_before_shop_loop_item', 0);
add_action( 'woocommerce_shop_loop_item_title', 'cordero_before_shop_loop_item_title', 0);
add_action( 'woocommerce_after_shop_loop_item_title', 'cordero_after_shop_loop_item_title', 100);
add_action( 'woocommerce_shop_loop_subcategory_title', 'cordero_before_shop_loop_cat_title', 0);
add_action( 'woocommerce_shop_loop_subcategory_title', 'cordero_after_shop_loop_item_title', 100);
add_action( 'woocommerce_after_shop_loop_item', 'cordero_before_shop_loop_addtocart', 6);
add_action( 'woocommerce_after_shop_loop_item', 'cordero_after_shop_loop_addtocart', 100);
add_action( 'woocommerce_after_subcategory', 'cordero_after_subcategory', 100);
if ( !function_exists( 'cordero_before_shop_loop_item' ) ) {
function cordero_before_shop_loop_item() {
echo '<div class="product-wrap">';
}
}
if ( !function_exists( 'cordero_before_shop_loop_item_title' ) ) {
function cordero_before_shop_loop_item_title() {
global $product;
$attachment_ids = $product->get_gallery_image_ids();
if ( $attachment_ids && $product->get_image_id() ) {
echo '<div class="product-extra-img">' . wp_get_attachment_image( $attachment_ids[0], 'woocommerce_thumbnail' ) . '</div>';
}
echo '<div class="product-detail-wrap">';
}
}
if ( !function_exists( 'cordero_before_shop_loop_cat_title' ) ) {
function cordero_before_shop_loop_cat_title() {
echo '<div class="product-detail-wrap">';
}
}
if ( !function_exists( 'cordero_after_shop_loop_item_title' ) ) {
function cordero_after_shop_loop_item_title() {
echo '</div>';
}
}
if ( !function_exists( 'cordero_before_shop_loop_addtocart' ) ) {
function cordero_before_shop_loop_addtocart() {
echo '<div class="product-addtocart-wrap">';
}
}
if ( !function_exists( 'cordero_after_shop_loop_addtocart' ) ) {
function cordero_after_shop_loop_addtocart() {
echo '</div></div>';
}
}
if ( !function_exists( 'cordero_after_subcategory' ) ) {
function cordero_after_subcategory() {
echo '</div>';
}
}
if ( !function_exists( 'cordero_shop_filter_section' ) ) {
function cordero_shop_filter_section() {
if ( !is_product() ) {
get_sidebar( 'shop-filters' );
}
}
}
if ( !function_exists( 'cordero_theme_wrapper_start' ) ) {
function cordero_theme_wrapper_start() {
if ( !is_active_sidebar( 'cordero-sidebar-shop' ) || is_product() || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
cordero_before_primary_content();
echo '<div id="primary" class="content-area'.$page_full_width.'">
<main id="main" class="site-main" role="main">';
}
}
if ( !function_exists( 'cordero_theme_wrapper_end' ) ) {
function cordero_theme_wrapper_end() {
echo '</main><!-- #main -->
</div><!-- #primary -->';
cordero_after_primary_content();
if ( !is_product() ) {
get_sidebar( 'shop' );
}
}
}
if ( !function_exists( 'cordero_change_prev_next' ) ) {
function cordero_change_prev_next( $args ) {
$args['prev_text'] = '<i class="dashicons dashicons-arrow-left-alt2"></i>';
$args['next_text'] = '<i class="dashicons dashicons-arrow-right-alt2"></i>';
return $args;
}
}
add_filter( 'woocommerce_pagination_args', 'cordero_change_prev_next' );
if ( !function_exists( 'cordero_woocommerce_placeholder_img_src' ) ) {
function cordero_woocommerce_placeholder_img_src() {
return esc_url( get_template_directory_uri() ) . '/images/woocommerce-placeholder.png';
}
}
if ( !get_option( 'woocommerce_placeholder_image', 0 ) ) {
add_filter('woocommerce_placeholder_img_src', 'cordero_woocommerce_placeholder_img_src');
}
if ( !function_exists( 'cordero_upsell_products_args' ) ) {
function cordero_upsell_products_args( $args ) {
$col_per_page = esc_attr( get_option( 'woocommerce_catalog_columns', 5 ) );
$args['posts_per_page'] = $col_per_page;
$args['columns'] = $col_per_page;
return $args;
}
}
add_filter( 'woocommerce_upsell_display_args', 'cordero_upsell_products_args' );
if ( !function_exists( 'cordero_related_products_args' ) ) {
function cordero_related_products_args( $args ) {
$col_per_page = esc_attr( get_option( 'woocommerce_catalog_columns', 5 ) );
$args['posts_per_page'] = $col_per_page;
$args['columns'] = $col_per_page;
return $args;
}
}
add_filter( 'woocommerce_output_related_products_args', 'cordero_related_products_args' );
if ( !function_exists( 'cordero_woocommerce_gallery_thumbnail_size' ) ) {
function cordero_woocommerce_gallery_thumbnail_size( $size ) {
return 'woocommerce_thumbnail';
}
}
add_filter( 'woocommerce_gallery_thumbnail_size', 'cordero_woocommerce_gallery_thumbnail_size' );
/*
* see: woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractProductGrid.php
*/
if ( !function_exists( 'cordero_wc_product_block' ) ) {
function cordero_wc_product_block( $html, $data, $product ) {
$html = '<li class="wc-block-grid__product">
<a href="' . $data->permalink . '" class="wc-block-grid__product-link">
' . $data->image . '
' . cordero_wc_block_extra_img( $product ) . '
' . $data->title . '
</a>
' . $data->badge . '
' . $data->price . '
' . $data->rating . '
' . $data->button . '
</li>';
return $html;
}
}
add_filter( 'woocommerce_blocks_product_grid_item_html', 'cordero_wc_product_block', 10, 3);
if ( !function_exists( 'cordero_wc_block_extra_img' ) ) {
function cordero_wc_block_extra_img( $product ) {
$attachment_ids = $product->get_gallery_image_ids();
if ( $attachment_ids && $product->get_image_id() ) {
return '<div class="product-extra-img">' . wp_get_attachment_image( $attachment_ids[0], 'woocommerce_thumbnail' ) . '</div>';
}
}
}
/**
* Exclude custom logo image from Jetpack lazy load
*/
if(!function_exists( 'cordero_exclude_class_from_lazy_load' )){
function cordero_exclude_class_from_lazy_load( $classes ) {
$classes[] = 'custom-logo';
return $classes;
}
}
add_filter( 'jetpack_lazy_images_blocked_classes', 'cordero_exclude_class_from_lazy_load', 999, 1 );
/**
* Disable image scaling
* since WP 5.3 any uploaded image larger than 2560px (height or width) is scaled to max 2560px
*/
add_filter( 'big_image_size_threshold', '__return_false' );

65
functions/fonts.php

@ -0,0 +1,65 @@
<?php
/**
* Array of Google fonts
*
* @package Cordero
*/
if ( !function_exists( 'cordero_google_fonts_array' ) ) {
function cordero_google_fonts_array() {
return array(
'Arial, Helvetica, sans-serif' => 'Arial, Helvetica, sans-serif',
'Impact, Charcoal, sans-serif' => 'Impact, Charcoal, sans-serif',
'"Lucida Sans Unicode", "Lucida Grande", sans-serif' => '"Lucida Sans Unicode", "Lucida Grande", sans-serif',
'Tahoma, Geneva, sans-serif' => 'Tahoma, Geneva, sans-serif',
'"Trebuchet MS", Helvetica, sans-serif' => '"Trebuchet MS", Helvetica, sans-serif',
'Verdana, Geneva, sans-serif' => 'Verdana, Geneva, sans-serif',
'Georgia, serif' => 'Georgia, serif',
'"Palatino Linotype", "Book Antiqua", Palatino, serif' => '"Palatino Linotype", "Book Antiqua", Palatino, serif',
'"Times New Roman", Times, serif' => '"Times New Roman", Times, serif',
'' => '---------------',
'Alegreya Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' => 'Alegreya Sans',
'Arimo:400,400i,700,700i' => 'Arimo',
'Arvo:400,400i,700,700i' => 'Arvo',
'Asap:400,400i,700,700i' => 'Asap',
'Bitter:400,400i,700' => 'Bitter',
'Bree Serif:400' => 'Bree Serif',
'Cabin:400,400i,500,500i,600,600i,700,700i' => 'Cabin',
'Catamaran:300,400,600,700,800' => 'Catamaran',
'Crimson Text:400,400i,600,600i,700,700i' => 'Crimson Text',
'Cuprum:400,400i,700,700i' => 'Cuprum', 'Dosis:200,300,400,500,600,700,800' => 'Dosis',
'Droid Sans:400,700' => 'Droid Sans',
'Droid Serif:400,400i,700,700i' => 'Droid Serif',
'Exo:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' => 'Exo',
'Exo 2:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' => 'Exo 2',
'Hind:300,400,500,600,700' => 'Hind',
'Lato:100,100i,300,300i,400,400i,700,700i,900,900i' => 'Lato',
'Libre Franklin:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' => 'Libre Franklin',
'Maven Pro:400,500,700,900' => 'Maven Pro',
'Merriweather:300,300i,400,400i,700,700i,900,900i' => 'Merriweather',
'Merriweather Sans:300,300i,400,400i,700,700i,800,800i' => 'Merriweather Sans',
'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' => 'Montserrat',
'Muli:300,300i,400,400i' => 'Muli',
'Noto Sans:400,400i,700,700i' => 'Noto Sans',
'Noto Serif:400,400i,700,700i' => 'Noto Serif',
'Nunito:300,400,700' => 'Nunito',
'Open Sans:300,300i,400,400i,600,600i,700,700i,800,800i' => 'Open Sans',
'Orbitron:400,500,700,900' => 'Orbitron',
'Oswald:300,400,700' => 'Oswald',
'Oxygen:300,400,700' => 'Oxygen',
'Playfair Display:400,400i,700,700i,900,900i' => 'Playfair Display',
'Poppins:300,400,500,600,700' => 'Poppins',
'PT Sans:400,400i,700,700i' => 'PT Sans',
'PT Serif:400,400i,700,700i' => 'PT Serif',
'Rajdhani:300,400,500,600,700' => 'Rajdhani',
'Raleway:100,200,300,400,500,600,700,800,900' => 'Raleway',
'Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i' => 'Roboto',
'Roboto Slab:100,300,400,700' => 'Roboto Slab',
'Rock Salt:400' => 'Rock Salt',
'Sanchez:400,400i' => 'Sanchez',
'Source Sans Pro:200,200i,300,300i,400,400i,600,600i,700,700i,900,900i' => 'Source Sans Pro',
'Titillium Web:200,200i,300,300i,400,400i,600,600i,700,700i,900' => 'Titillium Web',
'Ubuntu:300,300i,400,400i,500,500i,700,700i' => 'Ubuntu',
'Work Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' => 'Work Sans',
);
}
}

130
functions/hooks.php

@ -0,0 +1,130 @@
<?php
/**
* Theme hooks
*
* @package Cordero
*/
/**
* Main page wrapper
*/
function cordero_before_page() {
do_action( 'cordero_before_page' );
}
function cordero_after_page() {
do_action( 'cordero_after_page' );
}
/**
* Header
*/
function cordero_before_header() {
do_action( 'cordero_before_header' );
}
function cordero_after_header() {
do_action( 'cordero_after_header' );
}
function cordero_before_transparent_header() {
do_action( 'cordero_before_transparent_header' );
}
function cordero_after_transparent_header() {
do_action( 'cordero_after_transparent_header' );
}
function cordero_before_top_bar() {
do_action( 'cordero_before_top_bar' );
}
function cordero_after_top_bar() {
do_action( 'cordero_after_top_bar' );
}
function cordero_before_masthead_inner() {
do_action( 'cordero_before_masthead_inner' );
}
function cordero_after_masthead_inner() {
do_action( 'cordero_after_masthead_inner' );
}
function cordero_before_site_branding() {
do_action( 'cordero_before_site_branding' );
}
function cordero_after_site_branding() {
do_action( 'cordero_after_site_branding' );
}
function cordero_before_site_nav() {
do_action( 'cordero_before_site_nav' );
}
function cordero_after_site_nav() {
do_action( 'cordero_after_site_nav' );
}
function cordero_before_main_menu() {
do_action( 'cordero_before_main_menu' );
}
function cordero_after_main_menu() {
do_action( 'cordero_after_main_menu' );
}
function cordero_before_header_search() {
do_action( 'cordero_before_header_search' );
}
function cordero_after_header_cart() {
do_action( 'cordero_after_header_cart' );
}
/**
* Primary content
*/
function cordero_before_primary_content() {
do_action( 'cordero_before_primary_content' );
}
function cordero_after_primary_content() {
do_action( 'cordero_after_primary_content' );
}
/**
* Footer
*/
function cordero_before_footer() {
do_action( 'cordero_before_footer' );
}
function cordero_before_top_footer() {
do_action( 'cordero_before_top_footer' );
}
function cordero_after_top_footer() {
do_action( 'cordero_after_top_footer' );
}
function cordero_before_middle_footer() {
do_action( 'cordero_before_middle_footer' );
}
function cordero_after_middle_footer() {
do_action( 'cordero_after_middle_footer' );
}
function cordero_before_bottom_footer() {
do_action( 'cordero_before_bottom_footer' );
}
function cordero_after_bottom_footer() {
do_action( 'cordero_after_bottom_footer' );
}
function cordero_after_footer() {
do_action( 'cordero_after_footer' );
}

215
functions/js/customizer-preview.js

@ -0,0 +1,215 @@
/**
* Theme Customizer enhancements for a better user experience
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously
*/
jQuery(document).ready(function($){
if ( $('.custom-logo').attr('src') ) {
$('.site-title').css( {'display': 'none'} );
} else {
$('.site-title').css( {'display': 'block'} );
}
});
( function( $ ) {
wp.customize('custom_logo', function( value ) {
value.bind( function( to ) {
if ( to ) {
$('.site-title').css( {'display': 'none'} );
} else {
$('.site-title').css( {'display': 'block'} );
}
} );
} );
wp.customize('blogname', function( value ) {
value.bind( function( to ) {
$('.site-title a').text( to );
} );
} );
wp.customize('blogdescription', function( value ) {
value.bind( function( to ) {
$('.site-description').text( to );
} );
} );
wp.customize('hide_tagline', function( value ) {
value.bind( function( to ) {
if ( to == 1 ) {
$( 'body' ).addClass( 'tagline-hidden' );
} else {
$( 'body' ).removeClass( 'tagline-hidden' );
}
} );
} );
wp.customize('site_title_style', function( value ) {
value.bind( function( to ) {
$( '#site-branding' ).removeClass();
$( '#site-branding' ).addClass( to );
} );
} );
wp.customize('container_width', function( value ) {
value.bind( function( to ) {
$('.container,.wp-block-cover-image.alignfull > .wp-block-group__inner-container > .wp-block-group,.wp-block-cover.alignfull > .wp-block-group__inner-container > .wp-block-group,.wp-block-group.alignfull > .wp-block-group__inner-container > .wp-block-group').css( {'max-width': to + 'px'} );
} );
} );
wp.customize('header_search_off', function( value ) {
value.bind( function( to ) {
if ( to == 1 ) {
$('#masthead .top-search').css( {'display': 'none'} );
} else {
$('#masthead .top-search').css( {'display': 'inline-block'} );
}
} );
} );
wp.customize('accent_color', function( value ) {
value.bind( function( to ) {
var styleColor = 'a,#masthead .top-account .mini-account a,#masthead.transparent #site-navigation .top-account .mini-account a:not(.button),#masthead .top-cart .mini-cart a,#masthead.transparent .top-cart .mini-cart a:not(.button),#masthead.transparent #site-navigation .top-cart .mini-cart a:not(.button),.site-footer a,#add_payment_method .cart-collaterals .cart_totals .discount td,.woocommerce-cart .cart-collaterals .cart_totals .discount td,.woocommerce-checkout .cart-collaterals .cart_totals .discount td,.woocommerce .product-addtocart-wrap a.button,.woocommerce .product-addtocart-wrap a.button:hover,.woocommerce .product-addtocart-wrap a.added_to_cart,.woocommerce .product-addtocart-wrap a.added_to_cart:hover,.wc-block-grid__product .wc-block-grid__product-add-to-cart a.add_to_cart_button,.wc-block-grid__product .wc-block-grid__product-add-to-cart a.added_to_cart,.infinite-loader,.has-accent-color-color,.wp-block-button__link.has-accent-color-color,hr.wp-block-separator.has-accent-color-color{color:' + to + ';}';
var styleBackground = '.button,a.button,button,input[type="button"],input[type="reset"],input[type="submit"],#infinite-handle span button,#infinite-handle span button:hover,#infinite-handle span button:focus,#infinite-handle span button:active,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt,.woocommerce a.added_to_cart,.woocommerce #respond input#submit.alt.disabled,.woocommerce #respond input#submit.alt.disabled:hover,.woocommerce #respond input#submit.alt:disabled,.woocommerce #respond input#submit.alt:disabled:hover,.woocommerce #respond input#submit.alt:disabled[disabled],.woocommerce #respond input#submit.alt:disabled[disabled]:hover,.woocommerce a.button.alt.disabled,.woocommerce a.button.alt.disabled:hover,.woocommerce a.button.alt:disabled,.woocommerce a.button.alt:disabled:hover,.woocommerce a.button.alt:disabled[disabled],.woocommerce a.button.alt:disabled[disabled]:hover,.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce button.button.alt:disabled,.woocommerce button.button.alt:disabled:hover,.woocommerce button.button.alt:disabled[disabled],.woocommerce button.button.alt:disabled[disabled]:hover,.woocommerce input.button.alt.disabled,.woocommerce input.button.alt.disabled:hover,.woocommerce input.button.alt:disabled,.woocommerce input.button.alt:disabled:hover,.woocommerce input.button.alt:disabled[disabled],.woocommerce input.button.alt:disabled[disabled]:hover,.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce input.button.alt:hover,.woocommerce a.added_to_cart,.woocommerce a.added_to_cart:hover,#grid-loop article.sticky:before,#main .infinite-wrap article.sticky:before,#footer-menu a[href^="mailto:"]:before,.widget_nav_menu a[href^="mailto:"]:before,#footer-menu a[href^="tel:"]:before,.widget_nav_menu a[href^="tel:"]:before{background:' + to + ';}';
var styleBgColor = '.woocommerce span.onsale,.woocommerce ul.products li.product .onsale,.woocommerce .widget_price_filter .ui-slider .ui-slider-range,.woocommerce .widget_price_filter .ui-slider .ui-slider-handle,.wp-block-button__link,.wc-block-grid__product-onsale,.has-accent-color-background-color,.wp-block-button__link.has-accent-color-background-color,hr.wp-block-separator.has-accent-color-background-color{background-color:' + to + ';}';
var styleBorderColor = '.woocommerce-info,.woocommerce-message,.featured-style-1 .wp-block-columns .wp-block-column,.wp-block-columns.featured-style-1 .wp-block-column{border-color:' + to + ';}';
var styleRangeColor = '.wc-block-price-filter .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input-progress,.rtl .wc-block-price-filter .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input-progress{--range-color:' + to + ';}';
$('head').append('<style>' + styleColor + styleBackground + styleBgColor + styleBorderColor + styleRangeColor + '</style>');
} );
} );
wp.customize('accent_color2', function( value ) {
value.bind( function( to ) {
var featicon = cordero_hex2rgba(to, '0.45');
var styleColor = '.has-accent-color-2-color,.wp-block-button__link.has-accent-color-2-color,hr.wp-block-separator.has-accent-color-2-color{color:' + to + ';}';
var styleBgColor = '#masthead.transparent.scrolled,#colophon,.wp-block-cover,.wp-block-cover-image,.has-accent-color-2-background-color,.wp-block-button__link.has-accent-color-2-background-color,hr.wp-block-separator.has-accent-color-2-background-color,.featured-style-1 .wp-block-image figure,.wc-block-featured-product,.wc-block-featured-category{background-color:' + to + ';}';
var styleBoxShadow = '.featured-style-1 .wp-block-image figure{box-shadow: 0px 0px 0px 4px ' + featicon + ';}';
$('head').append('<style>' + styleColor + styleBgColor + styleBoxShadow + '</style>');
} );
} );
wp.customize('accent_color3', function( value ) {
value.bind( function( to ) {
var blog_post_style = wp.customize.value( 'blog_post_style' )();
var blog_post_tag = '';
if ( blog_post_style == 'border' || blog_post_style == 'shadow' ) {
blog_post_tag = ',#grid-loop article,#main .infinite-wrap article,.wp-block-latest-posts.is-grid li';
}
var styleColor = '.has-accent-color-3-color,.wp-block-button__link.has-accent-color-3-color,hr.wp-block-separator.has-accent-color-3-color{color:' + to + ';}';
var styleBackground = 'th,.woocommerce ul.products li.product,.woocommerce-page ul.products li.product,#secondary,ul.archive-sub-cats li,#shop-filters,article.comment-body,.wp-caption-text,.pagination span,.pagination .dots,.pagination a,.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span,.woocommerce div.product .woocommerce-tabs ul.tabs li,.wp-block-woocommerce-attribute-filter,.wp-block-woocommerce-price-filter,.wp-block-woocommerce-active-filters > h5,.wp-block-woocommerce-active-filters > div,.wp-block-woocommerce-active-filters > div:last-child,.wc-block-grid__product' + blog_post_tag + '{background:' + to + ';}';
var styleBgColor = 'input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="number"],input[type="tel"],input[type="range"],input[type="date"],input[type="month"],input[type="week"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="color"],textarea,select,input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="number"]:focus,input[type="tel"]:focus,input[type="range"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="time"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="color"]:focus,textarea:focus,select:focus,.shop-filter-wrap .shop-filter-toggle,.woocommerce div.product form.cart div.quantity input[type="button"],.featured-style-1 .wp-block-columns .wp-block-column,.wp-block-columns.featured-style-1 .wp-block-column,.wp-block-columns.pricing-table .wp-block-column,.has-accent-color-3-background-color,.wp-block-button__link.has-accent-color-3-background-color,hr.wp-block-separator.has-accent-color-3-background-color{background-color:' + to + ';}';
var styleBorderLeftColor = '.comment-navigation .nav-next a:after{border-left-color:' + to + ';}';
var styleBorderRightColor = '.comment-navigation .nav-previous a:after{border-right-color:' + to + ';}';
var styleResponsive = '@media (min-width: 1025px){.masthead-left #masthead{background:' + to + ';}}';
var styleResponsive2 = '@media (max-width: 1024px){.toggle-nav-open,.toggle-nav-open:hover{background:' + to + ';}}';
$('head').append('<style>' + styleColor + styleBackground + styleBgColor + styleBorderLeftColor + styleBorderRightColor + styleResponsive + styleResponsive2 + '</style>');
} );
} );
wp.customize('font_site_title', function( value ) {
value.bind( function( to ) {
cordero_font_bind( to, '.site-title' );
} );
} );
wp.customize('font_nav', function( value ) {
value.bind( function( to ) {
cordero_font_bind( to, '#site-navigation .site-main-menu' );
} );
} );
wp.customize('font_content', function( value ) {
value.bind( function( to ) {
var font_nav = wp.customize.value( 'font_nav' )();
var font_site_title = wp.customize.value( 'font_site_title' )();
cordero_font_bind( to, 'body, button, input, select, textarea' );
if ( font_site_title === '' ) {
$('.site-title').css({ fontFamily: 'initial' });
} else {
cordero_font_bind( font_site_title, '.site-title' );
}
if ( font_nav === '' ) {
$('#site-navigation .site-main-menu').css({ fontFamily: 'initial' });
} else {
cordero_font_bind( font_nav, '#site-navigation .site-main-menu' );
}
} );
} );
wp.customize('font_headings', function( value ) {
value.bind( function( to ) {
cordero_font_bind( to, 'h1:not(.site-title), h2, h3, h4, h5, h6, blockquote, .wc-block-grid__product .wc-block-grid__product-title, .wp-block-latest-posts.is-grid li > a' );
} );
} );
wp.customize('fs_base', function( value ) {
value.bind( function( to ) {
$('body,button,input,select,textarea').css( {'font-size': to + 'px'} );
} );
} );
wp.customize('menu_uppercase', function( value ) {
value.bind( function( to ) {
$('#primary-menu > li').css( {'text-transform': to} );
} );
} );
} )( jQuery );
function cordero_font_bind( to, style_class ) {
if ( to == '' || to == 'Arial, Helvetica, sans-serif' || to == 'Impact, Charcoal, sans-serif' || to == '"Lucida Sans Unicode", "Lucida Grande", sans-serif' || to == 'Tahoma, Geneva, sans-serif' || to == '"Trebuchet MS", Helvetica, sans-serif' || to == 'Verdana, Geneva, sans-serif' || to == 'Georgia, serif' || to == '"Palatino Linotype", "Book Antiqua", Palatino, serif' || to == '"Times New Roman", Times, serif' ) {
} else {
var googlefont = encodeURI(to.replace(" ", "+"));
jQuery('head').append('<link href="//fonts.googleapis.com/css?family=' + googlefont + '" type="text/css" media="all" rel="stylesheet">');
to = to.substr(0, to.indexOf(':'));
to = "'" + to + "'";
}
jQuery(style_class).css({
fontFamily: to
});
}
function cordero_font_style( to, style_class ) {
if ( to == 'italic' ) {
var to_style = 'italic';
} else {
var to_style = 'normal';
}
jQuery(style_class).css( {'font-style': to_style } );
}
function cordero_hex2rgba( colour, opacity ) {
var r,g,b;
if ( colour.charAt(0) == '#') {
colour = colour.substr(1);
}
r = colour.charAt(0) + '' + colour.charAt(1);
g = colour.charAt(2) + '' + colour.charAt(3);
b = colour.charAt(4) + '' + colour.charAt(5);
r = parseInt( r,16 );
g = parseInt( g,16 );
b = parseInt( b,16);
return 'rgba(' + r + ',' + g + ',' + b + ',' + opacity + ')';
}

17
functions/js/customizer-script.js

@ -0,0 +1,17 @@
jQuery(document).ready(function($) {
$('.controls#cordero-img-container-header_layout li img').click(function(){
$('.controls#cordero-img-container-header_layout li').each(function(){
$(this).find('img').removeClass ('cordero-radio-img-selected') ;
});
$(this).addClass ('cordero-radio-img-selected') ;
});
$('.controls#cordero-img-container-footer_layout li img').click(function(){
$('.controls#cordero-img-container-footer_layout li').each(function(){
$(this).find('img').removeClass ('cordero-radio-img-selected') ;
});
$(this).addClass ('cordero-radio-img-selected') ;
});
});

148
functions/schema.php

@ -0,0 +1,148 @@
<?php
/**
* Adds schema tags
*
* @package Cordero
*/
/**
* Adds schema tags to the body
*
*/
if ( !function_exists( 'cordero_schema_body' ) ) {
function cordero_schema_body() {
if ( !get_theme_mod( 'schema_off' ) ) {
$is_blog = ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) ? true : false;
$itemtype = 'WebPage';
$itemtype = ( $is_blog ) ? 'Blog' : $itemtype;
$itemtype = ( is_search() ) ? 'SearchResultsPage' : $itemtype;
// Make itemtype filterable
$itemtype = apply_filters( 'cordero_schema_body_itemtype', $itemtype );
// Output if not WooCommerce as it has it's own schema
if ( class_exists( 'WooCommerce' ) ) {
if ( !is_woocommerce() ) {
echo ' itemtype="https://schema.org/' . esc_attr( $itemtype ) . '" itemscope="itemscope"'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
} else {
echo ' itemtype="https://schema.org/' . esc_attr( $itemtype ) . '" itemscope="itemscope"'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
}
}
/**
* Adds schema itemtypes
*
*/
if ( !function_exists( 'cordero_schema_item' ) ) {
function cordero_schema_item( $type = '', $echo = 'true' ) {
if ( !get_theme_mod( 'schema_off' ) ) {
$itemtype = '';
$itemid = '';
$itemprop = '';
if ( $type === 'masthead' ) {
$itemtype = 'WPHeader';
$itemid = ' itemid="#masthead"';
} elseif ( $type === 'org' ) {
$itemtype = 'Organization';
} elseif ( $type === 'nav' ) {
$itemtype = 'SiteNavigationElement';
} elseif ( $type === 'article' ) {
$itemtype = 'CreativeWork';
} elseif ( $type === 'author' ) {
$itemtype = 'Person';
$itemprop = ' itemprop="author"';
} elseif ( $type === 'sidebar' ) {
$itemtype = 'WPSideBar';
} elseif ( $type === 'footer' ) {
$itemtype = 'WPFooter';
$itemid = ' itemid="#colophon"';
}
if ( $itemtype !== '' ) {
$result = ' itemtype="https://schema.org/' . $itemtype . '" itemscope="itemscope"' . $itemprop . $itemid; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
$result = '';
}
if ( $echo === 'false' ) {
return $result;
} else {
echo $result;
}
} else {
return NULL;
}
}
}
/**
* Adds schema itemprops
*
*/
if ( !function_exists( 'cordero_schema_prop' ) ) {
function cordero_schema_prop( $prop = '', $echo = 'true' ) {
if ( !get_theme_mod( 'schema_off' ) ) {
$itemprop = '';
if ( $prop === 'name' ) {
$itemprop = 'name';
} elseif ( $prop === 'url' ) {
$itemprop = 'url';
} elseif ( $prop === 'desc' ) {
$itemprop = 'description';
} elseif ( $prop === 'headline' ) {
$itemprop = 'headline';
} elseif ( $prop === 'text' ) {
$itemprop = 'text';
} elseif ( $prop === 'image' ) {
$itemprop = 'image';
} elseif ( $prop === 'wp-thumb' ) {
$itemprop = 'wp-thumb';
} elseif ( $prop === 'time-publish' ) {
$itemprop = 'datePublished';
} elseif ( $prop === 'time-update' ) {
$itemprop = 'dateModified';
}
if ( $itemprop !== '' ) {
if ( $itemprop === 'wp-thumb' ) {
$result = ' itemprop=image'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
$result = ' itemprop="' . $itemprop . '"'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
} else {
$result = '';
}
if ( $echo === 'false' ) {
return $result;
} else {
echo $result;
}
} else {
return NULL;
}
}
}

329
functions/style-output.php

@ -0,0 +1,329 @@
<?php
/**
* Output the customizer styling changes
*
* @package Cordero
*/
if ( !function_exists( 'cordero_css_font_family' ) ) {
function cordero_css_font_family( $font_family ) {
if ( strpos( $font_family, ':' ) ) {
$font_family = substr( $font_family, 0, strpos( $font_family, ':' ) );
return 'font-family:\'' . cordero_esc_font_family( $font_family ) . '\'';
} else {
return 'font-family:' . cordero_esc_font_family( $font_family );
}
}
}
function cordero_esc_font_family( $input ) {
$input = wp_kses( $input, array(
'"' => array(),
)
);
$input = str_replace( '"', '\'', $input );
return $input;
}
if ( !function_exists( 'cordero_dynamic_style' ) ) {
function cordero_dynamic_style( $css = array() ) {
$font_content = get_theme_mod( 'font_content' );
$font_headings = get_theme_mod( 'font_headings' );
$font_site_title = get_theme_mod( 'font_site_title' );
$font_nav = get_theme_mod( 'font_nav' );
if ( $font_content ) {
$font_site_title_on = 1;
$font_nav_on = 1;
$css[] = 'body,button,input,select,textarea{' . cordero_css_font_family( $font_content ) . ';}';
if ( $font_site_title ) {
$css[] = '.site-title{' . cordero_css_font_family( $font_site_title ) . ';}';
} else {
$css[] = '.site-title{font-family:\'Montserrat\';}';
}
if ( $font_nav ) {
$css[] = '#site-navigation .site-main-menu{' . cordero_css_font_family( $font_nav ) . ';}';
} else {
$css[] = '#site-navigation .site-main-menu{font-family:\'Work Sans\';}';
}
} else {
$font_site_title_on = 0;
$font_nav_on = 0;
}
if ( $font_headings ) {
$css[] = 'h1:not(.site-title),h2,h3,h4,h5,h6,blockquote,.wc-block-grid__product .wc-block-grid__product-title,.wp-block-latest-posts.is-grid li > a{' . cordero_css_font_family( $font_headings ) . ';}';
}
if ( $font_site_title && $font_site_title_on == 0 ) {
$css[] = '.site-title{' . cordero_css_font_family( $font_site_title ) . ';}';
}
if ( $font_nav && $font_nav_on == 0 ) {
$css[] = '#site-navigation .site-main-menu{' . cordero_css_font_family( $font_nav ) . ';}';
}
$fs_base = get_theme_mod( 'fs_base', '16' );
if ( $fs_base && $fs_base != '16' ) {
$css[] = 'body,button,input,select,textarea{font-size:' . esc_attr($fs_base) . 'px;}';
}
$menu_uppercase = get_theme_mod( 'menu_uppercase', 'uppercase' );
if ( $menu_uppercase == 'none' ) {
$css[] = '#primary-menu > li{text-transform:none;}';
}
if ( class_exists( 'WooCommerce' ) ) {
$woo_uncat_id = term_exists( 'uncategorized', 'product_cat' );
if ( $woo_uncat_id != NULL ) {
$woo_uncat_id = $woo_uncat_id['term_id'];
$css[] = '#shop-filters .widget_product_categories li.cat-item-' . $woo_uncat_id . '{display:none;}';
}
}
$container_width = get_theme_mod( 'container_width', '1240' );
if ( $container_width && $container_width != '1240' ) {
$css[] = '.container,.wp-block-cover-image.alignfull > .wp-block-cover-image__inner-container > .wp-block-group,.wp-block-cover.alignfull > .wp-block-cover__inner-container > .wp-block-group,.wp-block-group.alignfull > .wp-block-group__inner-container > .wp-block-group{max-width:' . esc_attr($container_width) . 'px;}';
}
$accent_color = get_theme_mod( 'accent_color', '#d82978' );
if ( $accent_color && $accent_color != '#d82978' ) {
$accent_color = esc_attr($accent_color);
$css[] = 'a,#masthead .top-account .mini-account a,#masthead.transparent #site-navigation .top-account .mini-account a:not(.button),#masthead .top-cart .mini-cart a,#masthead.transparent .top-cart .mini-cart a:not(.button),#masthead.transparent #site-navigation .top-cart .mini-cart a:not(.button),.site-footer a,#add_payment_method .cart-collaterals .cart_totals .discount td,.woocommerce-cart .cart-collaterals .cart_totals .discount td,.woocommerce-checkout .cart-collaterals .cart_totals .discount td,.woocommerce .product-addtocart-wrap a.button,.woocommerce .product-addtocart-wrap a.button:hover,.woocommerce .product-addtocart-wrap a.added_to_cart,.woocommerce .product-addtocart-wrap a.added_to_cart:hover,.wc-block-grid__product .wc-block-grid__product-add-to-cart a.add_to_cart_button,.wc-block-grid__product .wc-block-grid__product-add-to-cart a.added_to_cart,.infinite-loader,.has-accent-color-color,.wp-block-button__link.has-accent-color-color,.wp-block-button.is-style-outline .wp-block-button__link.has-accent-color-color,hr.wp-block-separator.has-accent-color-color,.wp-block-group.testimonial:before{color:' . $accent_color . ';}';
$css[] = '.button,a.button,button,input[type="button"],input[type="reset"],input[type="submit"],#infinite-handle span button,#infinite-handle span button:hover,#infinite-handle span button:focus,#infinite-handle span button:active,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt,.woocommerce a.added_to_cart,.woocommerce #respond input#submit.alt.disabled,.woocommerce #respond input#submit.alt.disabled:hover,.woocommerce #respond input#submit.alt:disabled,.woocommerce #respond input#submit.alt:disabled:hover,.woocommerce #respond input#submit.alt:disabled[disabled],.woocommerce #respond input#submit.alt:disabled[disabled]:hover,.woocommerce a.button.alt.disabled,.woocommerce a.button.alt.disabled:hover,.woocommerce a.button.alt:disabled,.woocommerce a.button.alt:disabled:hover,.woocommerce a.button.alt:disabled[disabled],.woocommerce a.button.alt:disabled[disabled]:hover,.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce button.button.alt:disabled,.woocommerce button.button.alt:disabled:hover,.woocommerce button.button.alt:disabled[disabled],.woocommerce button.button.alt:disabled[disabled]:hover,.woocommerce input.button.alt.disabled,.woocommerce input.button.alt.disabled:hover,.woocommerce input.button.alt:disabled,.woocommerce input.button.alt:disabled:hover,.woocommerce input.button.alt:disabled[disabled],.woocommerce input.button.alt:disabled[disabled]:hover,.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce input.button.alt:hover,.woocommerce a.added_to_cart,.woocommerce a.added_to_cart:hover,#grid-loop article.sticky:before,#main .infinite-wrap article.sticky:before,#footer-menu a[href^="mailto:"]:before,.widget_nav_menu a[href^="mailto:"]:before,#footer-menu a[href^="tel:"]:before,.widget_nav_menu a[href^="tel:"]:before{background:' . $accent_color . ';}';
$css[] = '.woocommerce span.onsale,.woocommerce ul.products li.product .onsale,.woocommerce .widget_price_filter .ui-slider .ui-slider-range,.woocommerce .widget_price_filter .ui-slider .ui-slider-handle,.wp-block-button__link,.wc-block-grid__product-onsale,.has-accent-color-background-color,.wp-block-button__link.has-accent-color-background-color,hr.wp-block-separator.has-accent-color-background-color{background-color:' . $accent_color . ';}';
$css[] = '.woocommerce-info,.woocommerce-message{border-color:' . $accent_color . ';}';
$css[] = '.wc-block-price-filter .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input-progress,.rtl .wc-block-price-filter .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input-progress{--range-color:' . $accent_color . ';}';
$css[] = '.wc-block-price-filter .wc-block-price-filter__range-input::-webkit-slider-thumb,.wc-block-price-filter .wc-block-price-filter__range-input::-moz-range-thumb,.wc-block-price-filter .wc-block-price-filter__range-input::-webkit-slider-thumb,.wc-block-price-filter .wc-block-price-filter__range-input::-moz-range-thumb{background-color:' . $accent_color . ';}';
}
$accent_color2 = get_theme_mod( 'accent_color2', '#2d2354' );
if ( $accent_color2 && $accent_color2 != '#2d2354' ) {
$accent_color2 = esc_attr($accent_color2);
$css[] = '.has-accent-color-2-color,.wp-block-button__link.has-accent-color-2-color,.wp-block-button.is-style-outline .wp-block-button__link.has-accent-color-2-color,hr.wp-block-separator.has-accent-color-2-color{color:' . $accent_color2 . ';}';
$css[] = '#masthead.transparent.scrolled,#colophon,.wp-block-cover,.wp-block-cover-image,.has-accent-color-2-background-color,.wp-block-button__link.has-accent-color-2-background-color,hr.wp-block-separator.has-accent-color-2-background-color,.featured-style-1 .wp-block-image figure,.wc-block-featured-product,.wc-block-featured-category{background-color:' . $accent_color2 . ';}';
$accent_color2_rgb = cordero_hex2RGB($accent_color2);
$css[] = '.featured-style-1 .wp-block-image figure{box-shadow: 0px 0px 0px 4px rgba( '.$accent_color2_rgb['r'].', '.$accent_color2_rgb['g'].', '.$accent_color2_rgb['b'].',0.45);}';
}
$accent_color3 = get_theme_mod( 'accent_color3', '#fbfbfb' );
if ( $accent_color3 && $accent_color3 != '#fbfbfb' ) {
$accent_color3 = esc_attr($accent_color3);
$css[] = '.has-accent-color-3-color,.wp-block-button__link.has-accent-color-3-color,.wp-block-button.is-style-outline .wp-block-button__link.has-accent-color-3-color,hr.wp-block-separator.has-accent-color-3-color{color:' . $accent_color3 . ';}';
$css[] = 'th,.woocommerce ul.products li.product,.woocommerce-page ul.products li.product,#secondary,ul.archive-sub-cats li,#shop-filters,article.comment-body,.wp-caption-text,.pagination span,.pagination .dots,.pagination a,.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span,.woocommerce div.product .woocommerce-tabs ul.tabs li,.wp-block-woocommerce-attribute-filter,.wp-block-woocommerce-price-filter,.wp-block-woocommerce-active-filters > h5,.wp-block-woocommerce-active-filters > div,.wp-block-woocommerce-active-filters > div:last-child,.wc-block-grid__product{background:' . $accent_color3 . ';}';
$css[] = 'input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="number"],input[type="tel"],input[type="range"],input[type="date"],input[type="month"],input[type="week"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="color"],textarea,select,input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="number"]:focus,input[type="tel"]:focus,input[type="range"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="time"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="color"]:focus,textarea:focus,select:focus,.shop-filter-wrap .shop-filter-toggle,.woocommerce div.product form.cart div.quantity input[type="button"],.featured-style-1 .wp-block-columns .wp-block-column,.wp-block-columns.featured-style-1 .wp-block-column,.wp-block-columns.pricing-table .wp-block-column,.has-accent-color-3-background-color,.wp-block-button__link.has-accent-color-3-background-color,hr.wp-block-separator.has-accent-color-3-background-color{background-color:' . $accent_color3 . ';}';
$css[] = '.comment-navigation .nav-next a:after{border-left-color:' . $accent_color3 . ';}';
$css[] = '.comment-navigation .nav-previous a:after{border-right-color:' . $accent_color3 . ';}';
$css[] = '@media (min-width: 1025px){.masthead-left #masthead{background:' . $accent_color3 . ';}}';
$css[] = '@media (max-width: 1024px){.toggle-nav-open,.toggle-nav-open:hover{background:' . $accent_color3 . ';}}';
}
if ( get_theme_mod( 'header_search_off' ) ) {
$css[] = '#masthead .top-search{display:none;}';
}
$blog_post_style = get_theme_mod( 'blog_post_style', 'plain' );
if ( $blog_post_style == 'border' ) {
if ($accent_color3 && $accent_color3 != "#fbfbfb") {
$blog_post_bg = $accent_color3;
} else {
$blog_post_bg = '#fbfbfb';
}
$css[] = '#grid-loop article,#main .infinite-wrap article,.wp-block-latest-posts.is-grid li{background:' . esc_attr($blog_post_bg) . ';border:1px solid #f1f1f1;padding:1em;}';
} elseif ( $blog_post_style == 'shadow' ) {
if ($accent_color3 && $accent_color3 != "#fbfbfb") {
$blog_post_bg = $accent_color3;
} else {
$blog_post_bg = '#fbfbfb';
}
$css[] = '#grid-loop article,#main .infinite-wrap article,.wp-block-latest-posts.is-grid li{background:' . esc_attr($blog_post_bg) . ';border-radius:6px;padding:1em;box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.03);}';
}
$post_spacing = get_theme_mod( 'post_spacing', 'space-between' );
if ( $post_spacing && $post_spacing != 'space-between' ) {
$css[] = '#grid-loop article,#main .infinite-wrap article,.wp-block-latest-posts.is-grid li{justify-content:' . esc_attr($post_spacing) . ';}';
}
$reading_width = get_theme_mod( 'reading_width', '640' );
if ( $reading_width && $reading_width != '640' ) {
$css[] = '.post-template-template-single-reading .single-entry-content,.post-template-template-single-reading-paragraph .single-entry-content p{max-width:' . esc_attr($reading_width) . 'px;}';
}
return implode( '', $css );
}
}
if ( !function_exists( 'cordero_editor_dynamic_style' ) ) {
function cordero_editor_dynamic_style( $mceInit, $css = array() ) {
$font_content = get_theme_mod( 'font_content' );
if ( $font_content ) {
$css[] = 'body.mce-content-body{' . cordero_css_font_family( $font_content ) . ';}';
}
$font_headings = get_theme_mod( 'font_headings' );
if ( $font_headings ) {
$css[] = '.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{' . cordero_css_font_family( $font_headings ) . ';}';
}
$accent_color = get_theme_mod( 'accent_color' );
if ( $accent_color ) {
$css[] = '.mce-content-body a:not(.button),.mce-content-body a:hover:not(.button),.mce-content-body a:focus:not(.button),.mce-content-body a:active:not(.button){color:' . esc_attr( $accent_color ) . '}';
}
$styles = implode( '', $css );
if ( isset( $mceInit['content_style'] ) ) {
$mceInit['content_style'] .= ' ' . $styles . ' ';
} else {
$mceInit['content_style'] = $styles . ' ';
}
return $mceInit;
}
}
add_filter( 'tiny_mce_before_init', 'cordero_editor_dynamic_style' );
function cordero_block_editor_dynamic_style( $css = array() ) {
$container_width = get_theme_mod( 'container_width', '1240' );
if ( $container_width && $container_width != '1240' ) {
$css[] = '.edit-post-visual-editor,[data-align="full"] .wp-block-cover-image > .wp-block-cover-image__inner-container > .wp-block-group,[data-align="full"] .wp-block-cover > .wp-block-cover__inner-container > .wp-block-group,[data-align="full"] .wp-block-group > .wp-block-group__inner-container > .wp-block-group{max-width:' . esc_attr ( $container_width ) . 'px;}';
}
$full_width = $container_width + 280;
$css[] = '@media (max-width:' . esc_attr ( $full_width ) . 'px){.edit-post-layout.is-sidebar-opened .wp-block[data-align="full"]{margin-left: 0 !important;margin-right: 0 !important;}}';
$background_color = get_theme_mod( 'background_color', 'ffffff' );
if ( $background_color && $background_color != 'ffffff' ) {
$css[] = '.edit-post-layout .interface-interface-skeleton__content,.block-editor-editor-skeleton__body,.edit-post-visual-editor{background-color:#' . esc_attr( $background_color ) . '}';
}
$font_content = get_theme_mod( 'font_content', 'Work Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
if ($font_content && $font_content != 'Work Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' ) {
$css[] = '.editor-default-block-appender textarea.editor-default-block-appender__content,.editor-styles-wrapper div,.editor-styles-wrapper p,.editor-styles-wrapper ul,.editor-styles-wrapper li{' . cordero_css_font_family( $font_content ) . ';}';
}
$font_headings = get_theme_mod( 'font_headings', 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
if ($font_headings && $font_headings != 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' ) {
$css[] = '.editor-post-title__block .editor-post-title__input,.editor-styles-wrapper h1,.editor-styles-wrapper h2,.editor-styles-wrapper h3,.editor-styles-wrapper h4,.editor-styles-wrapper h5,.editor-styles-wrapper h6,.wp-block-latest-posts.is-grid li > a > div,.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title,.wc-block-grid__product .wc-block-grid__product-title{' . cordero_css_font_family( $font_headings ) . ';}';
}
$accent_color = get_theme_mod( 'accent_color' );
if ($accent_color && $accent_color != "#d82978") {
$css[] = '.editor-rich-text__tinymce a,.block-editor-rich-text__editable a,.wp-block-latest-posts.is-grid li > a,.wc-block-grid__product .wc-block-grid__product-add-to-cart,.wc-block-grid__product .wc-block-grid__product-add-to-cart a.add_to_cart_button,.wc-block-grid__product .wc-block-grid__product-add-to-cart a.added_to_cart,.wp-block-group.testimonial:before{color:'.esc_attr($accent_color).'}';
$css[] = '.wp-block-button__link,.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale,.wc-block-grid__product-onsale{background-color:' . esc_attr( $accent_color ) . ';}';
$css[] = '.wc-block-price-filter .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input-progress,.rtl .wc-block-price-filter .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input-progress{--range-color:' . esc_attr( $accent_color ) . ';}';
$css[] = '.wc-block-price-filter .wc-block-price-filter__range-input::-webkit-slider-thumb,.wc-block-price-filter .wc-block-price-filter__range-input::-moz-range-thumb,.wc-block-price-filter .wc-block-price-filter__range-input::-webkit-slider-thumb,.wc-block-price-filter .wc-block-price-filter__range-input::-moz-range-thumb{background-color:' . esc_attr( $accent_color ) . ';}';
}
$accent_color2 = get_theme_mod( 'accent_color2' );
if ($accent_color2 && $accent_color2 != "#2d2354") {
$css[] = '.wc-block-featured-product,.wc-block-featured-category,.featured-style-1 figure.wp-block-image > div{background-color:' . esc_attr( $accent_color2 ) . ';}';
$accent_color2_rgb = cordero_hex2RGB($accent_color2);
$css[] = '.featured-style-1 figure.wp-block-image > div{box-shadow: 0px 0px 0px 4px rgba( '.$accent_color2_rgb['r'].', '.$accent_color2_rgb['g'].', '.$accent_color2_rgb['b'].',0.45);}';
}
$accent_color3 = get_theme_mod( 'accent_color3' );
if ($accent_color3 && $accent_color3 != "#fbfbfb") {
$css[] = '{color:'.esc_attr($accent_color3).'}';
$css[] = '.wc-block-grid__product{background:' . esc_attr( $accent_color3 ) . ';}';
$css[] = '.featured-style-1 .wp-block-columns .wp-block-column,.wp-block-columns.featured-style-1 .wp-block-column,.wp-block-columns.pricing-table .wp-block-column{background-color:' . esc_attr( $accent_color3 ) . ';}';
}
$blog_post_style = get_theme_mod( 'blog_post_style', 'plain' );
if ( $blog_post_style == 'border' ) {
if ($accent_color3 && $accent_color3 != "#fbfbfb") {
$blog_post_bg = $accent_color3;
} else {
$blog_post_bg = '#fbfbfb';
}
$css[] = '.wp-block-latest-posts.is-grid li{background:' . esc_attr($blog_post_bg) . ';border:1px solid #f1f1f1;padding:1em;}';
} elseif ( $blog_post_style == 'shadow' ) {
if ($accent_color3 && $accent_color3 != "#fbfbfb") {
$blog_post_bg = $accent_color3;
} else {
$blog_post_bg = '#fbfbfb';
}
$css[] = '.wp-block-latest-posts.is-grid li{background:' . esc_attr($blog_post_bg) . ';border-radius:6px;padding:1em;box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.03);}';
}
$post_spacing = get_theme_mod( 'post_spacing', 'space-between' );
if ( $post_spacing && $post_spacing != 'space-between' ) {
$css[] = '.wp-block-latest-posts.is-grid li{justify-content:' . esc_attr($post_spacing) . ';}';
}
return implode( '', $css );
}
function cordero_hex2RGB($hex) {
$hex = str_replace("#", "", $hex);
preg_match("/^#{0,1}([0-9a-f]{1,6})$/i",$hex,$match);
if(!isset($match[1]))
{
return false;
}
if(strlen($match[1]) == 6)
{
list($r, $g, $b) = array($hex[0].$hex[1],$hex[2].$hex[3],$hex[4].$hex[5]);
}
elseif(strlen($match[1]) == 3)
{
list($r, $g, $b) = array($hex[0].$hex[0],$hex[1].$hex[1],$hex[2].$hex[2]);
}
else if(strlen($match[1]) == 2)
{
list($r, $g, $b) = array($hex[0].$hex[1],$hex[0].$hex[1],$hex[0].$hex[1]);
}
else if(strlen($match[1]) == 1)
{
list($r, $g, $b) = array($hex.$hex,$hex.$hex,$hex.$hex);
}
else
{
return false;
}
$color = array();
$color['r'] = hexdec($r);
$color['g'] = hexdec($g);
$color['b'] = hexdec($b);
return $color;
}

369
functions/template-tags.php

@ -0,0 +1,369 @@
<?php
/**
* Custom template tags for this theme
*
* Eventually, some of the functionality here could be replaced by core features.
*
* @package Cordero
*/
if ( ! function_exists( 'cordero_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time.
*/
function cordero_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s"' . cordero_schema_prop( 'time-publish', 'false' ) . '>%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s"' . cordero_schema_prop( 'time-publish', 'false' ) . '>%2$s</time><time class="updated" datetime="%3$s"' . cordero_schema_prop( 'time-update', 'false' ) . '>%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
echo '<span class="posted-on">' . $time_string . '</span>';
$meta_separator = '<span class="meta-separator">|</span>';
if ( is_single() ) {
if ( get_theme_mod( 'disable_cats_single' ) ) {
$meta_separator = '';
}
} else {
if ( get_theme_mod( 'disable_cats' ) ) {
$meta_separator = '';
}
}
echo $meta_separator;
}
endif;
if ( ! function_exists( 'cordero_posted_on_related' ) ) :
/**
* Prints HTML with meta information for the current post-date/time.
*/
function cordero_posted_on_related( $related_id ) {
$time_string = '<time class="entry-date published updated" datetime="%1$s"' . cordero_schema_prop( 'time-publish', 'false' ) . '>%2$s</time>';
if ( get_the_time( 'U', $related_id ) !== get_the_modified_time( 'U', $related_id ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s"' . cordero_schema_prop( 'time-publish', 'false' ) . '>%2$s</time><time class="updated" datetime="%3$s"' . cordero_schema_prop( 'time-update', 'false' ) . '>%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c', $related_id ) ),
esc_html( get_the_date( '', $related_id ) ),
esc_attr( get_the_modified_date( 'c', $related_id ) ),
esc_html( get_the_modified_date( '', $related_id ) )
);
echo '<span class="posted-on">' . $time_string . '</span>';
$meta_separator = '<span class="meta-separator">|</span>';
if ( get_theme_mod( 'disable_cats' ) ) {
$meta_separator = '';
}
echo $meta_separator;
}
endif;
if ( ! function_exists( 'cordero_posted_by' ) ) :
/**
* Prints HTML with meta information for the current author.
*/
function cordero_posted_by() {
$meta_separator = '<span class="meta-separator">|</span>';
if ( is_single() ) {
if ( get_theme_mod( 'disable_date_single' ) && get_theme_mod( 'disable_cats_single' ) ) {
$meta_separator = '';
}
echo '<span class="byline"><span class="author vcard"' . cordero_schema_item( 'author', 'false' ) . '><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '"' . cordero_schema_prop( 'url', 'false' ) . '><span class="author-name"' . cordero_schema_prop( 'name', 'false' ) . '>' . esc_html( get_the_author() ) . '</span></a></span></span>' . $meta_separator;
} else {
if ( get_theme_mod( 'disable_date' ) && get_theme_mod( 'disable_cats' ) ) {
$meta_separator = '';
}
echo '<span class="byline"><span class="author vcard"' . cordero_schema_item( 'author', 'false' ) . '><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '"' . cordero_schema_prop( 'url', 'false' ) . '><span class="author-name"' . cordero_schema_prop( 'name', 'false' ) . '>' . esc_html( get_the_author() ) . '</span></a></span></span>' . $meta_separator;
}
}
endif;
if ( ! function_exists( 'cordero_posted_by_related' ) ) :
/**
* Prints HTML with meta information for the current author.
*/
function cordero_posted_by_related( $related_id ) {
$author_id = get_post_field( 'post_author', $related_id );
$meta_separator = '<span class="meta-separator">|</span>';
if ( get_theme_mod( 'disable_date' ) && get_theme_mod( 'disable_cats' ) ) {
$meta_separator = '';
}
echo '<span class="byline"><span class="author vcard"' . cordero_schema_item( 'author', 'false' ) . '><a class="url fn n" href="' . esc_url( get_author_posts_url( $author_id ) ) . '"' . cordero_schema_prop( 'url', 'false' ) . '><span class="author-name"' . cordero_schema_prop( 'name', 'false' ) . '>' . esc_html( get_the_author_meta( 'display_name', $author_id ) ) . '</span></a></span></span>' . $meta_separator;
}
endif;
if ( ! function_exists( 'cordero_entry_cats' ) ) :
/**
* Prints HTML with meta information for the categories only.
*/
function cordero_entry_cats() {
// Hide category text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$list_item_seperator = esc_html__( ', ', 'cordero' );
$categories_list = get_the_category_list( $list_item_seperator );
if ( $categories_list ) {
echo '<span class="cat-links">' . $categories_list . '</span>';
}
}
}
endif;
if ( ! function_exists( 'cordero_entry_cats_related' ) ) :
/**
* Prints HTML with meta information for the categories only.
*/
function cordero_entry_cats_related( $related_id ) {
/* translators: used between list items, there is a space after the comma */
$list_item_seperator = esc_html__( ', ', 'cordero' );
$categories_list = get_the_category_list( $list_item_seperator, '', $related_id );
if ( $categories_list ) {
echo '<span class="cat-links">' . $categories_list . '</span>';
}
}
endif;
if ( ! function_exists( 'cordero_entry_tags' ) ) :
/**
* Prints HTML with meta information for the tags only.
*/
function cordero_entry_tags() {
if ( !get_theme_mod( 'disable_tags' ) ) {
// Hide tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$list_item_seperator = esc_html__( ', ', 'cordero' );
$tags_list = get_the_tag_list( '', $list_item_seperator );
if ( $tags_list ) {
echo '<span class="tags-links"><i class="cordero-icon-tag"></i> ' . $tags_list . '</span>';
}
}
}
}
endif;
if ( ! function_exists( 'cordero_entry_tags_related' ) ) :
/**
* Prints HTML with meta information for the tags only.
*/
function cordero_entry_tags_related( $related_id ) {
if ( !get_theme_mod( 'disable_tags' ) ) {
/* translators: used between list items, there is a space after the comma */
$list_item_seperator = esc_html__( ', ', 'cordero' );
$tags_list = get_the_tag_list( '', $list_item_seperator, '', $related_id );
if ( $tags_list ) {
echo '<span class="tags-links"><i class="cordero-icon-tag"></i> ' . $tags_list . '</span>';
}
}
}
endif;
if ( ! function_exists( 'cordero_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function cordero_entry_footer() {
if ( !get_theme_mod( 'disable_tags_single' ) ) {
// Hide tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$list_item_seperator = esc_html__( ', ', 'cordero' );
$tags_list = get_the_tag_list( '', $list_item_seperator );
if ( $tags_list ) {
echo '<span class="tags-links"><i class="cordero-icon-tag"></i> ' . $tags_list . '</span>';
}
}
}
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
comments_popup_link(
sprintf(
wp_kses(
/* translators: %s: post title */
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'cordero' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
echo '</span>';
}
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit <span class="screen-reader-text">%s</span>', 'cordero' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'<span class="edit-link">',
'</span>'
);
}
endif;
if ( ! function_exists( 'cordero_post_thumbnail' ) ) :
/**
* Displays an optional post thumbnail.
*
* Wraps the post thumbnail in an anchor element on index views, or a div
* element when on single views.
*/
function cordero_post_thumbnail() {
$thumbnail_on = false;
$thumbnail_exists = false;
if ( has_post_thumbnail() ) {
$thumbnail_on = true;
$thumbnail_exists = true;
}
$thumbnail_placeholder = get_theme_mod( 'featured_image' );
if ( $thumbnail_placeholder != '' ) {
$thumbnail_on = true;
}
if ( get_theme_mod( 'disable_img' ) ) {
$thumbnail_on = false;
}
if ( post_password_required() || is_attachment() || ! $thumbnail_on ) {
return;
}
if ( is_singular() ) :
?>
<div class="post-thumbnail">
<?php the_post_thumbnail( get_theme_mod( 'single_img_size', 'full' ), cordero_schema_prop( 'wp-thumb', 'false' ) ); ?>
</div><!-- .post-thumbnail -->
<?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
<?php
if ( $thumbnail_exists ) {
the_post_thumbnail( get_theme_mod( 'archive_img_size', 'large' ), array(
'alt' => the_title_attribute( array(
'echo' => false,
) ),
) );
} else {
echo '<img class="featured-image-placeholder" src="' . $thumbnail_placeholder . '">';
}
?>
</a>
<?php
endif; // End is_singular().
}
endif;
if ( ! function_exists( 'cordero_related_post_thumbnail' ) ) :
function cordero_related_post_thumbnail($related_id) {
$thumbnail_on = false;
$thumbnail_exists = false;
if ( has_post_thumbnail($related_id) ) {
$thumbnail_on = true;
$thumbnail_exists = true;
}
$thumbnail_placeholder = get_theme_mod( 'featured_image' );
if ( $thumbnail_placeholder != '' ) {
$thumbnail_on = true;
}
if ( get_theme_mod( 'disable_img' ) ) {
$thumbnail_on = false;
}
if ( post_password_required($related_id) || is_attachment($related_id) || ! $thumbnail_on ) {
return;
}
?>
<a class="post-thumbnail" href="<?php the_permalink($related_id); ?>" aria-hidden="true">
<?php
if ( $thumbnail_exists ) {
echo get_the_post_thumbnail( $related_id, get_theme_mod( 'archive_img_size', 'large' ), array(
'alt' => the_title_attribute( array(
'echo' => false,
'post' => $related_id,
) ),
) );
} else {
echo '<img class="featured-image-placeholder" src="' . $thumbnail_placeholder . '">';
}
?>
</a>
<?php
}
endif;
if ( ! function_exists( 'cordero_read_more' ) ) :
function cordero_read_more() {
if ( 'post' === get_post_type() && !get_theme_mod( 'disable_readmore' ) ) {
$readmore_text = get_theme_mod( 'readmore_text' );
if ( $readmore_text == '' ) {
$readmore_text = esc_html__( 'Read More', 'cordero' );
} else {
$readmore_text = esc_html( $readmore_text );
}
?>
<a class="more-tag" href="<?php echo esc_url( get_the_permalink() ); ?>" title="<?php the_title_attribute(); ?>"><?php echo $readmore_text; ?></a>
<?php
}
}
endif;

219
functions/theme-help.php

@ -0,0 +1,219 @@
<?php
/**
* Theme help
*
* Adds a simple Theme help page to the Appearance section of the WordPress Dashboard.
*
* @package Cordero
*/
// Add Theme help page to admin menu.
add_action( 'admin_menu', 'cordero_add_theme_help_page' );
function cordero_add_theme_help_page() {
// Get Theme Details from style.css
$theme = wp_get_theme();
/* translators: %s: theme name. */
add_theme_page(
esc_html( $theme->get( 'Name' ) ) . ' ' . esc_html( $theme->get( 'Version' ) ), sprintf( esc_html__( '%s Options', 'cordero' ), $theme->get( 'Name' ) ), 'edit_theme_options', 'cordero', 'cordero_display_theme_help_page'
);
}
// Display Theme help page.
function cordero_display_theme_help_page() {
// Get Theme Details from style.css.
$theme = wp_get_theme();
?>
<div class="wrap theme-help-wrap">
<h1><?php echo esc_html( $theme->get( 'Name' ) ) . ' <span class="theme-version">' . esc_html( $theme->get( 'Version' ) ); ?></span></h1>
<div class="theme-description"><?php echo esc_html( $theme->get( 'Description' ) ); ?></div>
<div id="getting-started">
<h3><?php
/* translators: %s: theme name. */
printf( esc_html__( 'Getting Started with %s', 'cordero' ), $theme->get( 'Name' ) ); ?>
</h3>
<h4><strong><?php esc_html_e( 'NEW! - Block Patterns', 'cordero' ); ?></strong></h4>
<p class="about">
<?php esc_html_e( 'With WordPress 5.5 there is a new Block Patterns feature. This allows you to easily insert block designs into your pages or posts.', 'cordero' ); ?>
</p>
<p class="about">
<?php esc_html_e( 'Cordero has a variety of patterns to help you get started, including a full width hero, featured services and pricing table.', 'cordero' ); ?>
</p>
<p class="about">
<?php esc_html_e( 'To begin, add or edit a page, click the "Add Block" button and then the "Patterns" tab.', 'cordero' ); ?>
</p>
<p class="about">
<?php esc_html_e( 'Find a pattern you like, and click it to add the pattern to your page.', 'cordero' ); ?>
</p>
<p class="about">
<?php esc_html_e( 'Thats it! You can now edit the text or images of the pattern to really make it your own!', 'cordero' ); ?>
</p>
<?php
$this_wp_version = get_bloginfo( 'version' );
if ( $this_wp_version < 5.5 ) { ?>
<p class="about">
<?php esc_html_e( 'You appear to be using an old version of WordPress. Block patterns require at least version 5.5 of WordPress.', 'cordero' ); ?>
</p>
<p>
<a href="<?php echo esc_url( get_admin_url() . 'update-core.php' ); ?>" class="button button-primary">
<?php esc_html_e( 'Update WordPress', 'cordero' ); ?>
</a>
</p>
<?php } else {
?>
<p class="about">
<?php esc_html_e( 'Add or edit a page now to try it out.', 'cordero' ); ?>
</p>
<p>
<a href="<?php echo esc_url( get_admin_url() . 'post-new.php?post_type=page' ); ?>" class="button button-primary">
<?php esc_html_e( 'Add New Page', 'cordero' ); ?>
</a>
</p>
<?php }
?>
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/help-block-pattern-inserted.jpg" class="pattern-img" />
<div class="columns-wrapper clearfix">
<div class="column column-half clearfix">
<div class="section">
<h4><?php esc_html_e( 'Options', 'cordero' ); ?></h4>
<p class="about">
<?php
/* translators: %s: theme name. */
printf( esc_html__( '%s makes use of the Customizer for the theme settings.', 'cordero' ), $theme->get( 'Name' ) ); ?>
</p>
<p>
<a href="<?php echo esc_url( wp_customize_url() ); ?>" class="button button-primary">
<?php esc_html_e( 'Customize', 'cordero' ); ?>
</a>
</p>
</div>
<div class="section">
<h4><?php esc_html_e( 'Demo Content', 'cordero' ); ?></h4>
<p class="about">
<?php
/* translators: %s: theme name. */
printf( esc_html__( 'Import %s demo content and Starter Sites.', 'cordero' ), $theme->get( 'Name' ) ); ?>
</p>
<?php
if ( class_exists( 'Starter_Sites' ) ) {
$plugin_page = 'starter-sites';
$plugin_text = esc_html__( 'View Demo Content', 'cordero' );
} else {
$plugin_page = 'tgmpa-install-plugins';
$plugin_text = esc_html__( 'Get Starter Sites Plugin', 'cordero' );
}
?>
<p>
<a href="<?php echo esc_url( get_admin_url() . 'themes.php?page=' . $plugin_page ); ?>" class="button button-primary">
<?php echo $plugin_text; ?>
</a>
</p>
</div>
<div class="section">
<h4><?php esc_html_e( 'Documentation', 'cordero' ); ?></h4>
<p class="about">
<?php esc_html_e( 'Do you need help to setup and customize this theme? Check out the theme documentation.', 'cordero' ); ?>
</p>
<p>
<a href="<?php echo esc_url( 'https://uxlthemes.com/documentation/' ); ?>" target="_blank" class="button button-secondary">
<?php esc_html_e( 'View Documentation', 'cordero' ); ?>
</a>
</p>
</div>
<div class="section">
<h4><?php esc_html_e( 'Support', 'cordero' ); ?></h4>
<p class="about">
<?php esc_html_e( 'Any questions?', 'cordero' ); ?>
</p>
<p>
<a href="<?php echo esc_url( 'https://uxlthemes.com/forums/forum/cordero/' ); ?>" target="_blank" class="button button-secondary">
<?php esc_html_e( 'Get Support', 'cordero' ); ?>
</a>
</p>
</div>
<div class="section">
<h4><?php esc_html_e( 'Upgrade', 'cordero' ); ?></h4>
<p class="about">
<?php esc_html_e( 'Upgrade to Cordero Pro for even more cool features and customization options.', 'cordero' ) ; ?>
</p>
<p>
<a href="<?php echo esc_url( 'https://uxlthemes.com/theme/cordero-pro/' ); ?>" target="_blank" class="button button-pro">
<?php esc_html_e( 'GO PRO', 'cordero' ); ?>
</a>
</p>
</div>
</div>
<div class="column column-half clearfix">
<div class="screenshot">
<a href="<?php echo esc_url( 'https://uxlthemes.com/theme/cordero/' ); ?>" target="_blank">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/screenshot.png" />
</a>
<a href="<?php echo esc_url( 'https://uxlthemes.com/theme/cordero/' ); ?>" target="_blank" class="button button-primary">
<?php esc_html_e( 'Theme Details', 'cordero' ); ?>
</a>
</div>
</div>
</div>
</div>
<hr>
<div id="theme-author">
<p>
<?php /* translators: %1$s: theme name, %2$s: theme author, %3$s: link to theme review page. */
printf( esc_html__( '%1$s is proudly brought to you by %2$s. If you like this theme, %3$s :)', 'cordero' ), $theme->get( 'Name' ) , '<a target="_blank" href="https://uxlthemes.com/">' . $theme->get( 'Author' ) . '</a>', '<a target="_blank" href="https://wordpress.org/support/theme/cordero/reviews/?filter=5">' . __( 'rate it', 'cordero' ) . '</a>' ); ?>
</p>
</div>
</div>
<?php
}
// Add CSS for Theme help Panel.
add_action( 'admin_enqueue_scripts', 'cordero_theme_help_page_css' );
function cordero_theme_help_page_css( $hook ) {
// Load styles and scripts only on theme help page.
if ( 'appearance_page_cordero' != $hook ) {
return;
}
// Embed theme help css style.
wp_enqueue_style( 'cordero-theme-help-css', get_template_directory_uri() . '/css/theme-help.css' );
}

86
header-transparent.php

@ -0,0 +1,86 @@
<?php
/**
* The theme header with transparency for use with Transparent Header page template.
*
* @package Cordero
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?><?php cordero_schema_body(); ?>>
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'cordero' ); ?></a>
<?php
if ( get_theme_mod( 'sticky_footer' ) ) {
$page_class = ' class="sticky-footer"';
} else {
$page_class = '';
}
if ( get_theme_mod( 'sticky_header_off' ) ) {
$header_sticky = ' not-fixed';
} else {
$header_sticky = '';
}
?>
<?php cordero_before_page(); ?>
<div id="page"<?php echo $page_class; ?>>
<?php cordero_before_transparent_header(); ?>
<header id="masthead" class="site-header<?php echo $header_sticky; ?> transparent"<?php cordero_schema_item( 'masthead' ); ?>>
<?php if ( is_active_sidebar( 'cordero-top-bar' ) ) : ?>
<?php cordero_before_top_bar(); ?>
<div id="top-bar">
<div class="container">
<?php dynamic_sidebar( 'cordero-top-bar' ); ?>
</div>
</div>
<?php cordero_after_top_bar(); ?>
<?php endif; ?>
<?php cordero_before_masthead_inner(); ?>
<?php $header_layout = get_theme_mod( 'header_layout', '' ); ?>
<div id="masthead-inner" class="container <?php echo esc_attr( $header_layout ); ?>">
<?php
if ( $header_layout == 'logo-below' || $header_layout == 'logo-right' ) {
cordero_header_menu();
if ( is_customize_preview() ) {
cordero_transparent_header_content_customizer();
} else {
cordero_transparent_header_content();
}
} else {
if ( is_customize_preview() ) {
cordero_transparent_header_content_customizer();
} else {
cordero_transparent_header_content();
}
cordero_header_menu();
}
?>
</div>
<?php cordero_after_masthead_inner(); ?>
</header><!-- #masthead -->
<?php cordero_after_transparent_header(); ?>
<div id="content" class="site-content clearfix">
<div class="container clearfix">

100
header.php

@ -0,0 +1,100 @@
<?php
/**
* The theme header.
*
* @package Cordero
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?><?php cordero_schema_body(); ?>>
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'cordero' ); ?></a>
<?php
if ( get_theme_mod( 'sticky_footer' ) ) {
$page_class = ' class="sticky-footer"';
} else {
$page_class = '';
}
if ( get_theme_mod( 'sticky_header_off' ) ) {
$header_sticky = ' not-fixed';
} else {
$header_sticky = '';
}
$header_color = get_theme_mod( 'header_color', '' );
if ( $header_color === 'light' ) {
$use_header_color = ' light';
} else {
$use_header_color = '';
}
$header_image = get_header_image();
if ( $header_image ) {
$use_header_image = ' style="background-image: url(' . esc_url( $header_image ) . ')"';
} else {
$use_header_image = '';
}
?>
<?php cordero_before_page(); ?>
<div id="page"<?php echo $page_class; ?>>
<?php cordero_before_header(); ?>
<header id="masthead" class="site-header <?php echo $header_sticky . $use_header_color; ?>"<?php echo $use_header_image; ?><?php cordero_schema_item( 'masthead' ); ?>>
<?php if ( is_active_sidebar( 'cordero-top-bar' ) ) : ?>
<?php cordero_before_top_bar(); ?>
<div id="top-bar">
<div class="container">
<?php dynamic_sidebar( 'cordero-top-bar' ); ?>
</div>
</div>
<?php cordero_after_top_bar(); ?>
<?php endif; ?>
<?php cordero_before_masthead_inner(); ?>
<?php $header_layout = get_theme_mod( 'header_layout', '' ); ?>
<div id="masthead-inner" class="container <?php echo esc_attr( $header_layout ); ?>">
<?php
if ( $header_layout == 'logo-below' || $header_layout == 'logo-right' ) {
cordero_header_menu();
if ( is_customize_preview() ) {
cordero_header_content_customizer();
} else {
cordero_header_content();
}
} else {
if ( is_customize_preview() ) {
cordero_header_content_customizer();
} else {
cordero_header_content();
}
cordero_header_menu();
}
?>
</div>
<?php cordero_after_masthead_inner(); ?>
</header><!-- #masthead -->
<?php cordero_after_header(); ?>
<div id="content" class="site-content clearfix">
<div class="container clearfix">

53
home.php

@ -0,0 +1,53 @@
<?php
/**
* The template for displaying the blog home
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main post-columns-<?php echo esc_attr( get_theme_mod( 'blog_columns', '2' ) );?>" role="main">
<?php if ( have_posts() ) : ?>
<div id="grid-loop">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content' ); ?>
<?php endwhile; ?>
</div><!-- #grid-loop -->
<?php the_posts_pagination( array(
'prev_text' => '<i class="dashicons dashicons-arrow-left-alt2"></i>',
'next_text' => '<i class="dashicons dashicons-arrow-right-alt2"></i>',
) ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

BIN
images/column-bg-01.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
images/column-bg-02.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
images/column-bg-03.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
images/column-bg-04.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
images/cover-01.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

BIN
images/cover-02.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
images/cover-background.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

44
images/down-arrow.svg

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 491.996 491.996" style="enable-background:new 0 0 491.996 491.996;" xml:space="preserve">
<g>
<g>
<path d="M484.132,124.986l-16.116-16.228c-5.072-5.068-11.82-7.86-19.032-7.86c-7.208,0-13.964,2.792-19.036,7.86l-183.84,183.848
L62.056,108.554c-5.064-5.068-11.82-7.856-19.028-7.856s-13.968,2.788-19.036,7.856l-16.12,16.128
c-10.496,10.488-10.496,27.572,0,38.06l219.136,219.924c5.064,5.064,11.812,8.632,19.084,8.632h0.084
c7.212,0,13.96-3.572,19.024-8.632l218.932-219.328c5.072-5.064,7.856-12.016,7.864-19.224
C491.996,136.902,489.204,130.046,484.132,124.986z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/food-item-01.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/food-item-02.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
images/food-item-03.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
images/food-item-04.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
images/footer-centered-info-below.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
images/footer-centered.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

BIN
images/footer-info-right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

BIN
images/footer-standard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

BIN
images/header-logo-below.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

BIN
images/header-logo-left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

BIN
images/header-logo-right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

BIN
images/header-masthead-left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/header-standard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

BIN
images/help-block-pattern-inserted.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
images/help-block-patterns.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
images/icon-camera-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/icon-camera-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/icon-rocket-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/icon-rocket-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/icon-settings-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/icon-settings-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/media-text-image-02.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
images/media-text-image-03.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
images/media-text-image-04.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
images/media-text-image.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
images/square-image-01.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
images/square-image-02.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

44
images/up-arrow.svg

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 492.002 492.002" style="enable-background:new 0 0 492.002 492.002;" xml:space="preserve">
<g>
<g>
<path d="M484.136,328.473L264.988,109.329c-5.064-5.064-11.816-7.844-19.172-7.844c-7.208,0-13.964,2.78-19.02,7.844
L7.852,328.265C2.788,333.333,0,340.089,0,347.297c0,7.208,2.784,13.968,7.852,19.032l16.124,16.124
c5.064,5.064,11.824,7.86,19.032,7.86s13.964-2.796,19.032-7.86l183.852-183.852l184.056,184.064
c5.064,5.06,11.82,7.852,19.032,7.852c7.208,0,13.96-2.792,19.028-7.852l16.128-16.132
C494.624,356.041,494.624,338.965,484.136,328.473z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/woocommerce-placeholder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

49
index.php

@ -0,0 +1,49 @@
<?php
/**
* The main template file
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content' ); ?>
<?php endwhile; ?>
<?php the_posts_pagination( array(
'prev_text' => '<i class="dashicons dashicons-arrow-left-alt2"></i>',
'next_text' => '<i class="dashicons dashicons-arrow-right-alt2"></i>',
) ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

252
js/custom.js

@ -0,0 +1,252 @@
/**
* Cordero Custom JS
*
* @package Cordero
*
* Distributed under the MIT license - http://opensource.org/licenses/MIT
*/
jQuery(document).ready(function($){
// Defining a function to adjust mobile menu and search icons position if we have a large Top Bar widget area
function fullscreen(){
if ( $('#wpadminbar').length ) {
var adminbarheight = parseInt( $('#wpadminbar').outerHeight() );
$('#masthead').css({'top' : adminbarheight + 'px'});
}
if ( $('#masthead.transparent').length ) {
var mastheadheight = parseInt( $('#masthead').height() );
$('article > .entry-content *:not(.wp-block-group,.wp-block-group__inner-container):first').css({'padding-top' : mastheadheight + 'px'});
}
var footerheight = parseInt( $('#colophon').height() );
footerheight = footerheight - 1;
$('#page.sticky-footer').css({'padding-bottom' : footerheight + 'px'});
if ( ! $('#primary-menu').length ) {
$('.toggle-nav').css({'display' : 'none'});
}
}
fullscreen();
// Run the function in case of window resize
jQuery(window).resize(function() {
fullscreen();
});
});
jQuery(function($){
function navScroll(){
var mastheadheight = parseInt( $('#masthead').height() );
var s = $("#masthead");
var pos = s.position();
var windowpos = $(window).scrollTop();
if (windowpos > pos.top) {
$('#masthead').addClass('scrolled');
if ( ! $('#masthead.transparent').length ) {
$('#page').css({'padding-top' : mastheadheight + 'px'});
}
} else {
$('#masthead').removeClass('scrolled');
if ( ! $('#masthead.transparent').length ) {
$('#page').css({'padding-top' : '0'});
}
}
}
function navScrollTs(){
var s = $("#masthead");
var pos = s.position();
var windowpos = $(window).scrollTop();
if (windowpos > pos.top) {
$('#masthead').addClass('not-fixed-scrolled');
} else {
$('#masthead').removeClass('not-fixed-scrolled');
}
}
if ( ! $('body.masthead-left').length ) {
if ( ! $('#masthead.not-fixed').length ) {
$(window).scroll(function() {
navScroll();
});
$(document).ready(function() {
navScroll();
});
} else {
if ( $('#masthead.transparent').length ) {
$(window).scroll(function() {
navScrollTs();
});
$(document).ready(function() {
navScrollTs();
});
}
}
}
// WooCommerce quantity buttons
jQuery('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
// Target quantity inputs on product pages
jQuery('input.qty:not(.product-quantity input.qty)').each( function() {
var min = parseFloat( jQuery( this ).attr('min') );
if ( min && min > 0 && parseFloat( jQuery( this ).val() ) < min ) {
jQuery( this ).val( min );
}
});
jQuery( document ).on('click', '.plus, .minus', function() {
// Get values
var $qty = jQuery( this ).closest('.quantity').find('.qty'),
currentVal = parseFloat( $qty.val() ),
max = parseFloat( $qty.attr('max') ),
min = parseFloat( $qty.attr('min') ),
step = $qty.attr('step');
// Format values
if ( ! currentVal || currentVal === '' || currentVal === 'NaN') currentVal = 0;
if ( max === '' || max === 'NaN') max = '';
if ( min === '' || min === 'NaN') min = 0;
if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN') step = 1;
// Change the value
if ( jQuery( this ).is('.plus') ) {
if ( max && ( max == currentVal || currentVal > max ) ) {
$qty.val( max );
} else {
$qty.val( currentVal + parseFloat( step ) );
}
} else {
if ( min && ( min == currentVal || currentVal < min ) ) {
$qty.val( min );
} else if ( currentVal > 0 ) {
$qty.val( currentVal - parseFloat( step ) );
}
}
// Trigger change event
$qty.trigger('change');
});
if ( $('.mini-account p.username-wrap').length ) {
$('.mini-account p.username-wrap').html($('.mini-account p.username-wrap').html().replace('(','<br>('));
}
$( '.top-search .cordero-icon-search' ).on( 'click', function(e) {
$( '.top-search' ).toggleClass( 'search-open' );
});
$( '.top-search .search-close' ).on( 'click', function(e) {
$( '.top-search' ).toggleClass( 'search-open' );
$( '.top-search .cordero-icon-search' ).focus();
});
$( '.toggle-nav,.toggle-nav-open' ).click( function() {
$( '#site-navigation' ).toggleClass( 'menu-open' );
$( 'body' ).toggleClass( 'menu-open' );
});
$( '.menu-close' ).click( function() {
$( '#site-navigation' ).toggleClass( 'menu-open' );
$( 'body' ).toggleClass( 'menu-open' );
$( '.toggle-nav' ).focus();
});
$( '.site-nav-after' ).click( function() {
$( '#site-navigation' ).toggleClass( 'menu-open' );
$( 'body' ).toggleClass( 'menu-open' );
$( '.toggle-nav' ).focus();
});
$( '.menu-close' ).on( 'keydown', function (e) {
var isTabbed = ( e.key === 'Tab' || e.keyCode === 9 );
if ( !isTabbed ) {
return;
}
if ( e.shiftKey ) {
return;
} else {
$( '.toggle-nav-open' ).focus();
e.preventDefault();
}
});
$( '.toggle-nav-open' ).on( 'keydown', function (e) {
var isTabbed = ( e.key === 'Tab' || e.keyCode === 9 );
if ( !isTabbed ) {
return;
}
if ( e.shiftKey ) {
$( '#site-navigation' ).toggleClass( 'menu-open' );
$( 'body' ).toggleClass( 'menu-open' );
} else {
return
}
});
$( '#site-navigation' ).swipe( {
swipeLeft:function( event, direction ) {
$( '#site-navigation' ).toggleClass( 'menu-open' );
$( 'body' ).toggleClass( 'menu-open' );
},
});
$( '.sub-trigger' ).click( function() {
$( this ).toggleClass( 'is-open' );
$( this ).siblings( '.sub-menu' ).toggle();
});
$( '.shop-filter-wrap .shop-filter-toggle' ).click( function() {
$( '.shop-filter-wrap #shop-filters' ).toggleClass( 'active' );
$( this ).toggleClass( 'active' );
});
$( '.top-account .mini-account input' ).focusin( function() {
$( '.top-account .mini-account' ).addClass( 'locked' );
}).add( '.top-account .mini-account' ).focusout( function() {
if ( !$( '.top-account .mini-account' ).is( ':focus' ) ) {
$( '.top-account .mini-account' ).removeClass( 'locked' );
}
});
$( '#primary-menu li.menu-item-has-children' ).focusin( function() {
$( this ).addClass( 'locked' );
}).add( this ).focusout( function() {
if ( !$( this ).is( ':focus' ) ) {
$( this ).removeClass( 'locked' );
}
});
$( '.top-account #customer_login .u-column2 h2' ).click( function() {
$( '.top-account #customer_login .u-column2' ).toggleClass( 'open' );
});
});
jQuery( document ).ready( function( $ ){
$(document).on( 'added_to_wishlist removed_from_wishlist', function(){
var counter = $('.wishlist_products_counter_number');
$.ajax({
url: yith_wcwl_l10n.ajax_url,
data: {
action: 'yith_wcwl_update_wishlist_count'
},
dataType: 'json',
success: function( data ){
counter.html( data.count );
}
})
} )
});

2107
js/jquery.touchSwipe.js

File diff suppressed because it is too large

15
js/jquery.touchSwipe.min.js

File diff suppressed because one or more lines are too long

31
js/skip-link-focus-fix.js

@ -0,0 +1,31 @@
/**
* File skip-link-focus-fix.js.
*
* Helps with accessibility for keyboard only users.
*
* Learn more: https://git.io/vWdr2
*/
( function() {
var isIe = /(trident|msie)/i.test( navigator.userAgent );
if ( isIe && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
} )();

2086
languages/cordero.pot

File diff suppressed because it is too large

281
license.txt

@ -0,0 +1,281 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

42
page.php

@ -0,0 +1,42 @@
<?php
/**
* The template for displaying standard pages
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar-page' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar( 'page' ); ?>
<?php get_footer(); ?>

200
readme.txt

@ -0,0 +1,200 @@
== Cordero ==
Cordero WordPress Theme, Copyright UXL Themes 2020
Cordero is distributed under the terms of the GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html)
Contributors: uxl
Stable tag: 1.2.6
Requires at least: 5
Tested up to: 5.8
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
== Installation ==
1. In your WordPress Dashboard, nagivate to **Appearance > Themes** and click the **Add New** button.
2. Type **Cordero** in the search form and press the **Enter** key on your keyboard.
3. Click the **Activate** button to begin using Cordero on your website.
== Customization ==
1. Navigate to **Appearance > Customize**.
2. Customize the style of your website by adding a logo, changing the fonts and selecting a custom accent color.
== Screenshot Content ==
1. Navigate to **Pages > Add New**.
2. Click the **Add Block** button, select the **Patterns** tab, click the **Cover and Overlapped Featured Services** preview to add the block pattern to the page.
3. Edit the pattern's text/images/colors to really make it your own.
4. In **Document > Page Attributes**, select **Transparent Header** template.
5. Click **Publish** and then **View Page**.
== Changelog ==
1.2.6 - Dec 07, 2021
Fixed font compatibility with Classic Editor
1.2.5 - Nov 25, 2021
CSS updates
1.2.4 - Nov 04, 2021
Updated accent color customization output
1.2.3 - Jun 29, 2021
Fix for cart quantity input
Add excerpt or full post option for blog archives
1.2.2 - Nov 12, 2020
Added **Call to action hero cover** block pattern
Fixed **Media and text with overlapping heading** block pattern for all heading levels
Fixed tablet and mobile preview in block editor
1.2 - Oct 19, 2020
Added primary menu text style options
Added left side header layout option
Added **Not Stacked on Mobile** block style for columns
Added box shadow, bordered and framed styles for gallery block
Added **Inset Frame** style for media and text, gallery and cover blocks
Added left and right chevron block styles for images
Added point up and down block styles for images, covers and groups
Added heading with separator block styles
Added paragraph with separator block styles
Added **Gigantic heading with separator** block pattern
Added **Media and text with overlapping heading** block pattern
Added **Full-width group with inner container** block pattern
Updated container width of group block within full width group block
Fixed **Translucent** group block style
Minor CSS updates
1.1.6 - Oct 01, 2020
Added six sizing styles for Separator block
Fix **Media and text overlapped** block patterns to work with gradient background
1.1.5 - Sep 23, 2020
Added **Box Shadow** blog style option
Added new **Cover with Translucent Content** block pattern
Added new **Ribbon Heading** block pattern
Added **Translucent** style for group block
Added **No Spacing** styles for column and gallery blocks
Added **Box Shadow** styles for group, column, heading, paragraph and image blocks
Improved wishlist compatibility
1.1.4 - Aug 31, 2020
Added new block patterns
1.1.3 - Aug 21, 2020
Added new block patterns
Improved fixed header scrolling
1.1.2 - Aug 15, 2020
Added blog columns (posts per row) option
Added featured image size selection settings
Fix post layout/styling with Jetpack infinite scrolling
1.1.1 - Aug 13, 2020
Fix Transparent Header post template when post has featured image
1.1 - Aug 12, 2020
Added additional custom color options
Added block patterns using register_block_pattern functionality
Added post template: Reading View
Added blog style options
Added blog meta info display options
Updated transparent header logo to WP 5.5 standard
Minor CSS updates
1.0.5 - Jul 16, 2020
Fix for header menu layout option 2 displaying incorrectly
Added TGMPA to recommend Starter Sites plugin
1.0.4 - Jul 13, 2020
Fixes for theme review requirements
Updated keyboard navigation for mobile menu
1.0.3 - Jul 06, 2020
Fix for accent color CSS
Fix for mobile menu swipe conflict with search input
1.0.2 - Jul 05, 2020
Added header and footer layout options
Added option to disable fixed header
Added various action hooks
Added Schema markup with option to disable
Updated mobile menu
1.0.1 - Jun 27, 2020
Added Site Title styling options
Added extra product image to WooCommerce products blocks
Minor CSS updates
1.0 - Jun 10, 2020
Initial release
== Credits ==
* Underscores - (C) 2012-2019 Automattic, Inc. - http://underscores.me
License: GPLv2 or later - https://www.gnu.org/licenses/gpl-2.0.html
* normalize.css - (C) 2012-2015 Nicolas Gallagher and Jonathan Neal - http://necolas.github.io/normalize.css/
License: MIT - http://opensource.org/licenses/MIT
* Customizer Radio Image Control and sanitization - (C) WordPress Themes Team - https://github.com/WPTT/code-examples/
License: GPL-2.0 - https://github.com/WPTT/code-examples/blob/master/LICENSE
* TouchSwipe - jQuery Plugin - (C) 2010-2016 Matt Bryson - https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
License: GPLv2 or later - https://www.gnu.org/licenses/gpl-2.0.html
== Images ==
Images used in screenshot and block patterns
https://stocksnap.io/photo/train-station-6FHSE43K4R
Copyright: Matthew Henry - https://stocksnap.io/author/200
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/pretty-woman-DN2O01D5X7
Copyright: Bruce Mars - https://stocksnap.io/author/brucemars
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/abstract-background-C7E4WYWEHZ
Copyright: Bob Richards - https://stocksnap.io/author/bobrichards
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/women-working-Y61SKQCFE8 and https://stocksnap.io/photo/sandwich-plate-M9SLUDGRNT
Copyright: Kristin Hardwick - https://stocksnap.io/author/kristinhardwick
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/wireless-headphones-EXCBJA3FFQ
Copyright: Burst - https://stocksnap.io/author/burstshopify
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/sea-ocean-MTWZM3YK68
Copyright: Khachik Simonian - https://stocksnap.io/author/52498
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/mountains-road-0BJXEHZBXK
Copyright: Andrew James Kovalsky - https://stocksnap.io/author/drewjamesphoto
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/paris-landmark-NDGTKGCAZB
Copyright: Matt Moloney - https://stocksnap.io/author/mattmoloney
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/nature-landscape-PIX0SSJ72A
Copyright: Carl Cerstrand - https://stocksnap.io/author/26742
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/steak-asparagus-JMJZKYXUWD
Copyright: Snapwire - https://stocksnap.io/author/snapwire
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/food-asiancuisine-RZUWVKLQAR
Copyright: Yevgeniy Rozenblat - https://stocksnap.io/author/yevgeniyrozenblat
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
https://stocksnap.io/photo/corn-salad-407JYVPIPO
Copyright: Foodie Girl - https://stocksnap.io/author/foodiegirl
License: CC0 Creative Commons - https://stocksnap.io/license - https://creativecommons.org/publicdomain/zero/1.0/
Setting Screwdriver Icon - https://aiconica.net/detail/setting-418
License: CC0 Creative Commons - http://creativecommons.org/publicdomain/zero/1.0/
Photo Camera Modern Icon - https://aiconica.net/detail/camera-18
License: CC0 Creative Commons - http://creativecommons.org/publicdomain/zero/1.0/
Rocket Icon - https://aiconica.net/detail/rocket-845
License: CC0 Creative Commons - http://creativecommons.org/publicdomain/zero/1.0/

BIN
screenshot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

62
search.php

@ -0,0 +1,62 @@
<?php
/**
* The template for displaying search results pages
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main post-columns-<?php echo esc_attr( get_theme_mod( 'blog_columns', '2' ) );?>" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php
/* translators: %s: search query. */
printf( esc_html__( 'Search Results for: %s', 'cordero' ), '<span>' . get_search_query() . '</span>' );
?>
</h1>
</header><!-- .page-header -->
<div id="grid-loop">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'search' ); ?>
<?php endwhile; ?>
</div><!-- #grid-loop -->
<?php the_posts_pagination( array(
'prev_text' => '<i class="dashicons dashicons-arrow-left-alt2"></i>',
'next_text' => '<i class="dashicons dashicons-arrow-right-alt2"></i>',
) ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

15
sidebar-page.php

@ -0,0 +1,15 @@
<?php
/**
* The sidebar containing the main widget area for pages
*
* @package Cordero
*/
if ( ! is_active_sidebar( 'cordero-sidebar-page' ) ) {
return;
}
?>
<div id="secondary" class="widget-area"<?php cordero_schema_item( 'sidebar' ); ?>>
<?php dynamic_sidebar( 'cordero-sidebar-page' ); ?>
</div><!-- #secondary -->

24
sidebar-shop-filters.php

@ -0,0 +1,24 @@
<?php
/**
* The sidebar containing the horizontal widget area for WooCommerce archives
*
* @package Cordero
*/
if ( ! is_active_sidebar( 'cordero-sidebar-shop-filters' ) ) {
return;
}
?>
<div class="shop-filter-wrap">
<?php $page_url_full = home_url( add_query_arg( NULL, NULL ) );
if ( stripos( $page_url_full, 'min_price' ) !== false || stripos( $page_url_full, 'max_price' ) !== false || stripos( $page_url_full, 'filter_' ) !== false || stripos( $page_url_full, '_filter' ) !== false ) {
$set_active = ' active';
} else {
$set_active = '';
} ?>
<div class="shop-filter-toggle<?php echo $set_active; ?>"><?php echo esc_html__( 'Product Filters', 'cordero' ); ?><span class="toggle-icon"></span></div>
<div id="shop-filters" class="clearfix<?php echo $set_active; ?>">
<?php dynamic_sidebar( 'cordero-sidebar-shop-filters' ); ?>
</div><!-- #shop-filters -->
</div>

15
sidebar-shop.php

@ -0,0 +1,15 @@
<?php
/**
* The sidebar containing the main widget area for WooCommerce archives
*
* @package Cordero
*/
if ( ! is_active_sidebar( 'cordero-sidebar-shop' ) ) {
return;
}
?>
<div id="secondary" class="widget-area"<?php cordero_schema_item( 'sidebar' ); ?>>
<?php dynamic_sidebar( 'cordero-sidebar-shop' ); ?>
</div><!-- #secondary -->

15
sidebar.php

@ -0,0 +1,15 @@
<?php
/**
* The sidebar containing the main widget area
*
* @package Cordero
*/
if ( ! is_active_sidebar( 'cordero-sidebar' ) ) {
return;
}
?>
<div id="secondary" class="widget-area"<?php cordero_schema_item( 'sidebar' ); ?>>
<?php dynamic_sidebar( 'cordero-sidebar' ); ?>
</div><!-- #secondary -->

53
single.php

@ -0,0 +1,53 @@
<?php
/**
* The template for displaying all single posts
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php
if ( !get_theme_mod( 'disable_prevnext' ) ) {
the_post_navigation( array(
'prev_text' => '<span class="nav-title"><i class="dashicons dashicons-arrow-left-alt2"></i>%title</span>',
'next_text' => '<span class="nav-title">%title<i class="dashicons dashicons-arrow-right-alt2"></i></span>',
) );
}
if ( !get_theme_mod( 'disable_related' ) ) {
get_template_part( 'content', 'related' );
}
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

5886
style.css

File diff suppressed because it is too large

44
template-no-title.php

@ -0,0 +1,44 @@
<?php
/**
* Template Name: No Page Title
*
* A page template with no page title.
*
* @package Cordero
*/
get_header();
if ( ! is_active_sidebar( 'cordero-sidebar-page' ) || get_theme_mod( 'sidebar_position' ) === 'below' ) {
$page_full_width = ' full-width';
} else {
$page_full_width = '';
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area<?php echo $page_full_width;?>">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'no-title' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar( 'page' ); ?>
<?php get_footer(); ?>

51
template-single-reading-paragraph.php

@ -0,0 +1,51 @@
<?php
/**
* Template Name: Reading View (Paragraphs Only)
* Template Post Type: post
*
* A post template with a narrow reading panel (paragraphs only) and sidebar below content.
*
* @package Cordero
*/
get_header();
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area full-width">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php
if ( !get_theme_mod( 'disable_prevnext' ) ) {
the_post_navigation( array(
'prev_text' => '<span class="nav-title"><i class="dashicons dashicons-arrow-left-alt2"></i>%title</span>',
'next_text' => '<span class="nav-title">%title<i class="dashicons dashicons-arrow-right-alt2"></i></span>',
) );
}
if ( !get_theme_mod( 'disable_related' ) ) {
get_template_part( 'content', 'related' );
}
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

51
template-single-reading.php

@ -0,0 +1,51 @@
<?php
/**
* Template Name: Reading View
* Template Post Type: post
*
* A post template with a narrow reading panel and sidebar below content.
*
* @package Cordero
*/
get_header();
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area full-width">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php
if ( !get_theme_mod( 'disable_prevnext' ) ) {
the_post_navigation( array(
'prev_text' => '<span class="nav-title"><i class="dashicons dashicons-arrow-left-alt2"></i>%title</span>',
'next_text' => '<span class="nav-title">%title<i class="dashicons dashicons-arrow-right-alt2"></i></span>',
) );
}
if ( !get_theme_mod( 'disable_related' ) ) {
get_template_part( 'content', 'related' );
}
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

52
template-single-transparent-header.php

@ -0,0 +1,52 @@
<?php
/**
* Template Name: Transparent Header
* Template Post Type: post
*
* A post template with a transparent header and no sidebar.
*
* @package Cordero
*/
if ( get_theme_mod( 'header_layout') === 'masthead-left' ) {
get_header();
} else {
get_header( 'transparent' );
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area full-width">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single-no-title' ); ?>
<?php
if ( !get_theme_mod( 'disable_prevnext' ) ) {
the_post_navigation( array(
'prev_text' => '<span class="nav-title"><i class="dashicons dashicons-arrow-left-alt2"></i>%title</span>',
'next_text' => '<span class="nav-title">%title<i class="dashicons dashicons-arrow-right-alt2"></i></span>',
) );
}
if ( !get_theme_mod( 'disable_related' ) ) {
get_template_part( 'content', 'related' );
}
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_footer(); ?>

41
template-transparent-header.php

@ -0,0 +1,41 @@
<?php
/**
* Template Name: Transparent Header
* Template Post Type: page
*
* A page template with a transparent header and no sidebar.
*
* @package Cordero
*/
if ( get_theme_mod( 'header_layout') === 'masthead-left' ) {
get_header();
} else {
get_header( 'transparent' );
}
?>
<?php cordero_before_primary_content(); ?>
<div id="primary" class="content-area full-width">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'no-title' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php cordero_after_primary_content(); ?>
<?php get_footer(); ?>

76
woocommerce/content-single-product-tabs-inline.php

@ -0,0 +1,76 @@
<?php
/**
* The template for displaying product content in the single-product-tabs-inline.php template
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.6.0
*/
defined( 'ABSPATH' ) || exit;
global $product;
/**
* Hook: woocommerce_before_single_product.
*
* @hooked wc_print_notices - 10
*/
do_action( 'woocommerce_before_single_product' );
if ( post_password_required() ) {
echo get_the_password_form(); // WPCS: XSS ok.
return;
}
?>
<div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
<?php
/**
* Hook: woocommerce_before_single_product_summary.
*
* @hooked woocommerce_show_product_sale_flash - 10
* @hooked woocommerce_show_product_images - 20
*/
do_action( 'woocommerce_before_single_product_summary' );
?>
<div class="summary entry-summary">
<?php
/**
* Hook: woocommerce_single_product_summary.
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40
* @hooked woocommerce_template_single_sharing - 50
* @hooked WC_Structured_Data::generate_product_data() - 60
*/
add_action( 'woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 90);
do_action( 'woocommerce_single_product_summary' );
?>
</div>
<?php
/**
* Hook: woocommerce_after_single_product_summary.
*
* @hooked woocommerce_output_product_data_tabs - 10
* @hooked woocommerce_upsell_display - 15
* @hooked woocommerce_output_related_products - 20
*/
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
do_action( 'woocommerce_after_single_product_summary' );
?>
</div>
<?php do_action( 'woocommerce_after_single_product' ); ?>

74
woocommerce/content-single-product-wide-image-after.php

@ -0,0 +1,74 @@
<?php
/**
* The template for displaying product content in the single-product-wide-image-after.php template
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.6.0
*/
defined( 'ABSPATH' ) || exit;
global $product;
/**
* Hook: woocommerce_before_single_product.
*
* @hooked wc_print_notices - 10
*/
do_action( 'woocommerce_before_single_product' );
if ( post_password_required() ) {
echo get_the_password_form(); // WPCS: XSS ok.
return;
}
?>
<div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
<div class="summary entry-summary">
<?php
/**
* Hook: woocommerce_single_product_summary.
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40
* @hooked woocommerce_template_single_sharing - 50
* @hooked WC_Structured_Data::generate_product_data() - 60
*/
do_action( 'woocommerce_single_product_summary' );
?>
</div>
<?php
/**
* Hook: woocommerce_before_single_product_summary.
*
* @hooked woocommerce_show_product_sale_flash - 10
* @hooked woocommerce_show_product_images - 20
*/
do_action( 'woocommerce_before_single_product_summary' );
?>
<?php
/**
* Hook: woocommerce_after_single_product_summary.
*
* @hooked woocommerce_output_product_data_tabs - 10
* @hooked woocommerce_upsell_display - 15
* @hooked woocommerce_output_related_products - 20
*/
do_action( 'woocommerce_after_single_product_summary' );
?>
</div>
<?php do_action( 'woocommerce_after_single_product' ); ?>

68
woocommerce/single-product-image-after-tabs-inline.php

@ -0,0 +1,68 @@
<?php
/**
* Template Name: Image right and tabs in line with summary
* Template Post Type: product
*
* The single product template with product image/gallery on the right, and description and tabs in line with product summary.
*
* @package Cordero
*
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
*
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
get_header( 'shop' ); ?>
<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action( 'woocommerce_before_main_content' );
?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<?php wc_get_template_part( 'content', 'single-product-tabs-inline' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
/**
* woocommerce_after_main_content hook.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );
?>
<?php
/**
* woocommerce_sidebar hook.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' );
?>
<?php
get_footer( 'shop' );
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */

68
woocommerce/single-product-image-after.php

@ -0,0 +1,68 @@
<?php
/**
* Template Name: Image/gallery on the right
* Template Post Type: product
*
* The single product template with product image/gallery section on the right.
*
* @package Cordero
*
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
*
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
get_header( 'shop' ); ?>
<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action( 'woocommerce_before_main_content' );
?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<?php wc_get_template_part( 'content', 'single-product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
/**
* woocommerce_after_main_content hook.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );
?>
<?php
/**
* woocommerce_sidebar hook.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' );
?>
<?php
get_footer( 'shop' );
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */

68
woocommerce/single-product-tabs-inline.php

@ -0,0 +1,68 @@
<?php
/**
* Template Name: Tabs in line with summary
* Template Post Type: product
*
* The single product template with description and tabs in line with product summary.
*
* @package Cordero
*
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
*
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
get_header( 'shop' ); ?>
<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action( 'woocommerce_before_main_content' );
?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<?php wc_get_template_part( 'content', 'single-product-tabs-inline' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
/**
* woocommerce_after_main_content hook.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );
?>
<?php
/**
* woocommerce_sidebar hook.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' );
?>
<?php
get_footer( 'shop' );
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save