wp_network_dashboard_right_now

函数


wp_network_dashboard_right_now ( No parameters )
定义位置
  • wp-admin/includes/dashboard.php
    , line 448
引入
3.1.0
弃用
function wp_network_dashboard_right_now() {
	$actions = array();

	if ( current_user_can( 'create_sites' ) ) {
		$actions['create-site'] = '' . __( 'Create a New Site' ) . '';
	}
	if ( current_user_can( 'create_users' ) ) {
		$actions['create-user'] = '' . __( 'Create a New User' ) . '';
	}

	$c_users = get_user_count();
	$c_blogs = get_blog_count();

	/* translators: %s: Number of users on the network. */
	$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
	/* translators: %s: Number of sites on the network. */
	$blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) );

	/* translators: 1: Text indicating the number of sites on the network, 2: Text indicating the number of users on the network. */
	$sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );

	if ( $actions ) {
		echo '
    ‘;
    foreach ( $actions as $class => $action ) {
    $actions[ $class ] = “t
  • $action”;
    }
    echo implode( ” |
  • n”, $actions ) . “n”;
    echo ‘

‘;
}
?>


‘submit_users’ ) ); ?>


‘submit_sites’ ) ); ?>