Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_network_dashboard_right_now [ WordPress Function ]

wp_network_dashboard_right_now ( No parameters )
Defined at:



No description yet.

Source


<?php
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>';

    if ( ! 
wp_is_large_network'users' ) )
        
wp_enqueue_script'user-search' );

    if ( ! 
wp_is_large_network'sites' ) )
        
wp_enqueue_script'site-search' );

    
$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="search" name="s" value="" size="17" id="all-user-search-input" />
            <?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="search" name="s" value="" size="17" id="site-search-input" />
            <?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' );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics