Advertisements

wp_network_dashboard_right_now

Definition:
function wp_network_dashboard_right_now() {}

Defined actions

  • wpmuadminresult
    do_action( 'wpmuadminresult', '' );
  • mu_rightnow_end
    do_action( 'mu_rightnow_end' );
  • mu_activity_box_end
    do_action( 'mu_activity_box_end' );

Source code

function wp_network_dashboard_right_now() {

	$actions = array();

	if ( current_user_can('create_sites') )

		$actions['create-site'] = '<a href="' . network_admin_url('site-new.php') . '">' . __( 'Create a New Site' ) . '</a>';

	if ( current_user_can('create_users') )

		$actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>';



	$c_users = get_user_count();

	$c_blogs = get_blog_count();



	$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );

	$blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) );



	$sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );



	if ( $actions ) {

		echo '<ul class="subsubsub">';

		foreach ( $actions as $class => $action ) {

			 $actions[ $class ] = "\t<li class='$class'>$action";

		}

		echo implode( " |</li>\n", $actions ) . "</li>\n";

		echo '</ul>';

	}

?>

	<br class="clear" />



	<p class="youhave"><?php echo $sentence; ?></p>

	<?php do_action( 'wpmuadminresult', '' ); ?>



	<form name="searchform" action="<?php echo network_admin_url('users.php'); ?>" method="get">

		<p>

			<input type="text" name="s" value="" size="17" />

			<?php submit_button( __( 'Search Users' ), 'button', 'submit', false, array( 'id' => 'submit_users' ) ); ?>

		</p>

	</form>



	<form name="searchform" action="<?php echo network_admin_url('sites.php'); ?>" method="get">

		<p>

			<input type="text" name="s" value="" size="17" />

			<?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?>

		</p>

	</form>

<?php

	do_action( 'mu_rightnow_end' );

	do_action( 'mu_activity_box_end' );

}

10884

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: