/> Voci espandibili

/> Visualizza solo nella pagina indicata nelle impostazioni, pagina archivio e singola dei documenti

false ), 'objects' ); foreach ( $post_types as $post_type ) { $num_posts = wp_count_posts( $post_type->name ); $num = number_format_i18n( $num_posts->publish ); $text = _n( $post_type->labels->singular_name, $post_type->labels->name, $num_posts->publish ); if ( current_user_can( 'edit_posts' ) ) { $num = '' . $num . ''; $text = '' . $text . ''; } echo '' . $num . ''; echo '' . $text . ''; echo ''; if ( $num_posts->pending > 0 ) { $num = number_format_i18n( $num_posts->pending ); $text = _n( $post_type->labels->singular_name . ' pending', $post_type->labels->name . ' pending', $num_posts->pending ); if ( current_user_can( 'edit_posts' ) ) { $num = '' . $num . ''; $text = '' . $text . ''; } echo '' . $num . ''; echo '' . $text . ''; echo ''; } } $showTaxonomies = 1; // Custom taxonomies counts if ($showTaxonomies) { $taxonomies = get_taxonomies( array( '_builtin' => false ), 'objects' ); foreach ( $taxonomies as $taxonomy ) { $num_terms = wp_count_terms( $taxonomy->name ); $num = number_format_i18n( $num_terms ); $text = _n( $taxonomy->labels->singular_name, $taxonomy->labels->name, $num_terms ); $associated_post_type = $taxonomy->object_type; if ( current_user_can( 'manage_categories' ) ) { $num = $num; $text = $text; } echo '' . $num . ''; echo '' . $text . ''; echo ''; } } } ?>