Quantcast
Viewing latest article 3
Browse Latest Browse All 10

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


Filed under: /wp-admin/includes/dashboard.php, Actions, Actions by letter m, Actions by letter w, Documentation, Files, Functions, Functions by letter w Tagged: id8aee60772eaf145b6683d2bd648f65e7, mu_activity_box_end, mu_rightnow_end, wpmuadminresult, wp_network_dashboard_right_now Image may be NSFW.
Clik here to view.

Viewing latest article 3
Browse Latest Browse All 10

Trending Articles