element
*
* @param array $classes The existing classes.
* @since 1.1.0
*/
function generate_main_classes( $classes ) {
$classes[] = 'site-main';
return $classes;
}
}
add_filter( 'generate_page_class', 'generate_do_page_container_classes' );
/**
* Adds custom classes to the #page element
*
* @param array $classes The existing classes.
* @since 3.0.0
*/
function generate_do_page_container_classes( $classes ) {
$classes[] = 'site';
$classes[] = 'grid-container';
$classes[] = 'container';
if ( generate_is_using_hatom() ) {
$classes[] = 'hfeed';
}
if ( ! generate_is_using_flexbox() ) {
$classes[] = 'grid-parent';
}
return $classes;
}
add_filter( 'generate_comment-author_class', 'generate_do_comment_author_classes' );
/**
* Adds custom classes to the comment author element
*
* @param array $classes The existing classes.
* @since 3.0.0
*/
function generate_do_comment_author_classes( $classes ) {
$classes[] = 'comment-author';
if ( generate_is_using_hatom() ) {
$classes[] = 'vcard';
}
return $classes;
}
if ( ! function_exists( 'generate_post_classes' ) ) {
add_filter( 'post_class', 'generate_post_classes' );
/**
* Adds custom classes to the element.
* Remove .hentry class from pages to comply with structural data guidelines.
*
* @param array $classes The existing classes.
* @since 1.3.39
*/
function generate_post_classes( $classes ) {
if ( 'page' === get_post_type() || ! generate_is_using_hatom() ) {
$classes = array_diff( $classes, array( 'hentry' ) );
}
return $classes;
}
}