get_categories();
}
if ( ! empty( $product_categories ) ) {
/**
* Explode categories in words by ',' separator and show only the first 2. If the value is modified to -1 or lower in
* a function hooked at bigbang_shop_category_words, then show all categories.
*/
$categories = explode( ',', $product_categories );
$nb_of_cat = apply_filters( 'bigbang_shop_category_words', 2 );
$nb_of_cat = intval( $nb_of_cat );
$cat = $nb_of_cat > -1 ? bigbang_limit_content( $categories, $nb_of_cat, ',', false ) : $product_categories;
$allowed_html = array(
'a' => array(
'href' => array(),
'rel' => array(),
),
);
echo '
';
echo wp_kses( $cat, $allowed_html );
echo '
';
}
?>
-1 ? bigbang_limit_content( $title_in_words, $title_limit, ' ' ) : $title;
?>
post_excerpt ) {
/**
* Explode the excerpt in words by ' ' separator and show only the first 60 words. If the value is modified to -1 or lower in
* a function hooked at bigbang_shop_excerpt_words, then use the normal behavior from woocommece ( show post excerpt )
*/
$excerpt_in_words = explode( ' ', $post->post_excerpt );
$excerpt_limit = apply_filters( 'bigbang_shop_excerpt_words', 60 );
$excerpt_limit = intval( $excerpt_limit );
$limited_excerpt = $excerpt_limit > -1 ? bigbang_limit_content( $excerpt_in_words, $excerpt_limit, ' ' ) : $post->post_excerpt;
?>