wp_dashboard_right_now

函数


wp_dashboard_right_now ( No parameters )
定义位置
  • wp-admin/includes/dashboard.php
    , line 301
引入
2.7.0
弃用

Dashboard widget that displays some basic stats about the site.

Formerly ‘Right Now’. A streamlined ‘At a Glance’ as of 3.8.

function wp_dashboard_right_now() {
	?>
	
    publish ) { if ( 'post' === $post_type ) { /* translators: %s: Number of posts. */ $text = _n( '%s Post', '%s Posts', $num_posts->publish ); } else { /* translators: %s: Number of pages. */ $text = _n( '%s Page', '%s Pages', $num_posts->publish ); } $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); $post_type_object = get_post_type_object( $post_type ); if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) { printf( '
  • %2$s
  • ', $post_type, $text ); } else { printf( '
  • %2$s
  • ', $post_type, $text ); } } } // Comments. $num_comm = wp_count_comments(); if ( $num_comm && ( $num_comm->approved || $num_comm->moderated ) ) { /* translators: %s: Number of comments. */ $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) ); ?>
  • moderated ); /* translators: %s: Number of comments. */ $text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $num_comm->moderated ), $moderated_comments_count_i18n ); ?>
  • ' . implode( "n
  • ", $elements ) . "
  • n"; } ?>
$content"; } ?>