updated theme GeneratePress version 3.2.0

This commit is contained in:
2022-10-27 11:14:10 +00:00
committed by Gitium
parent 7b1024e711
commit 1465186bc5
41 changed files with 3367 additions and 4581 deletions

@ -116,6 +116,9 @@ class GeneratePress_HTML_Attributes {
case 'footer-entry-meta':
return $this->footer_entry_meta( $attributes );
case 'woocommerce-content':
return $this->woocommerce_content( $attributes );
}
return $attributes;
@ -311,7 +314,7 @@ class GeneratePress_HTML_Attributes {
public function post_navigation( $attributes ) {
if ( is_single() ) {
$attributes['class'] .= ' post-navigation';
$attributes['aria-label'] = esc_attr__( 'Single Post', 'generatepress' );
$attributes['aria-label'] = esc_attr__( 'Posts', 'generatepress' );
} else {
$attributes['class'] .= ' paging-navigation';
$attributes['aria-label'] = esc_attr__( 'Archive Page', 'generatepress' );
@ -460,6 +463,34 @@ class GeneratePress_HTML_Attributes {
return $attributes;
}
/**
* Add attributes to our WooCommerce content container.
*
* @since 3.2.0
* @param array $attributes The existing attributes.
*/
public function woocommerce_content( $attributes ) {
if ( is_singular() ) {
$attributes['id'] = 'post-' . get_the_ID();
$attributes['class'] = esc_attr( implode( ' ', get_post_class( '', get_the_ID() ) ) );
if ( 'microdata' === generate_get_schema_type() ) {
$type = apply_filters( 'generate_article_itemtype', 'CreativeWork' );
$attributes['itemtype'] = sprintf(
'itemtype="https://schema.org/%s"',
$type
);
$attributes['itemscope'] = true;
}
} else {
$attributes['class'] = 'woocommerce-archive-wrapper';
}
return $attributes;
}
}
GeneratePress_HTML_Attributes::get_instance();