$cur_terms = get_the_terms( $post->ID, 'genres' );
if( $cur_terms && ! is_wp_error( $cur_terms ) ) {
$array = array();
foreach( $cur_terms as $cur_term ) {
$array[] = $cur_term->name;
}
$comma_separated = implode( ", ", $array );
echo '<div>Жанры: ' . esc_attr( $comma_separated ) . '</div>'; // term1, term2, term3
}
<tr>
<td>sroda<td> // вы забыли закрыть тег - </td>.
<td>ilosc godzin</td>
</tr>
$.each(g.totals_data.manufacturers, function (f, k) {
if (k.id) {
h[h.length] = k.id;
var j = $("#manufacturer_" + k.id);
if (j.length == 0) {
return;
}
j.removeAttr("disabled");
if (j.get(0).tagName == "OPTION") {
j.text($("#m_" + k.id).val() + "(" + k.t + ")")
} else {
$('label[for="manufacturer_' + k.id + '"]').html($("#m_" + k.id).val() + '<div>' + k.t + '</div>')
}
}
});
function myFunc(event, target, banned, handler){
var arglen = arguments.length;
var handler = arglen > 1 ? arguments[arglen-1] : undefined;
var banned = arglen > 3 ? arguments[2] : undefined;
var target = arglen > 2 ? arguments[1] : undefined;
console.log({
event:event,
target:target,
banned:banned,
handler:handler
});
}
myFunc('event', 'handler');
myFunc('event', 'target', 'handler');
myFunc('event', 'target', 'banned', 'handler');