$args = array(
'count' => true,
);
$terms = get_terms( $args );
wp_cache_set()
$cache_key = 'term_post_counts';
$counts = get_transient($cache_key);
if ($counts === false) {
$counts = $wpdb->get_results($sql);
set_transient($cache_key, $counts, HOUR_IN_SECONDS);
}
И совсем застопорился куда копать
$categories = get_the_category();
$separator = ' ';
$output = '';
if ( ! empty( $categories ) ) {
foreach( $categories as $category ) {
$output .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</a> (' . $category->count .')'.$separator;
}
echo trim( $output, $separator );
}
$('input[name="score"]').each(function(el){
$(this).attr("type", "text");
});
inputs[i].setAttribute('type', 'text');
// rutube
wp_embed_register_handler('rutube', '#https?:\/\/(www\.)?rutube\.ru\/(play|video)\/(.*?)$#i', 'wpdocs_embed_handler_rutube');
function wpdocs_embed_handler_rutube( $matches, $attr, $url, $rawattr ) {
$embed = sprintf(
'<iframe width="720" height="405" src="https://rutube.ru/%2$s/embed/%3$s" frameBorder="0" allow="clipboard-write" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>',
esc_attr($matches[1]),
esc_attr($matches[2]),
esc_attr($matches[3])
);
return $embed;
}