Retrieves the classes for the post div as an array. This method was modified from WordPress's get_post_class() to allow the removal of taxonomies (for performance reasons). Previously wc_product_post_class was hooked into post_class. @since 3.6.0
$post_classes, $class, $product->get_id(
Sortie :
@param string|array $class One or more classes to add to the class list. @param int|WP_Post|WC_Product $product Product ID or product object. @return array
// Modifier la valeur avec le filtre 'post_class'
add_filter('post_class', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($post_classes) {
// Modifier la valeur
return $post_classes;
}
Chargement des actualités...