wp_dashboard_right_now
函数
wp_dashboard_right_now ( No parameters )
- 定义位置
-
-
wp-admin/includes/dashboard.php
, line 301
-
wp-admin/includes/dashboard.php
- 引入
- 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( '
$content"; } ?>- %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"; } ?>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。