Posted By

trepmal on 07/31/10


Tagged

wordpress


Versions (?)

Put site ID by "Howdy" in WordPress 3.0


 / Published in: PHP
 

URL: http://trepmal.com/wordpress-tips/put-site-id-by-howdy-greeting-in-wordpress/

  1. <?php
  2.  
  3. add_filter('admin_user_info_links','blog_id_in_howdy_greeting');
  4.  
  5. function blog_id_in_howdy_greeting($links) {
  6. global $blog_id;
  7.  
  8. if ( is_super_admin() ) {
  9. $links[] = ' | <a href="/ms-sites.php?action=editblog&id=' . $blog_id . '">Site ID: ' . $blog_id . '</a>';
  10. } else {
  11. $links[] = ' | Site ID: ' . $blog_id;
  12. }
  13. return $links;
  14. }
  15. ?>

Report this snippet  

You need to login to post a comment.