Put site ID by "Howdy" in WordPress 3.0


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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. ?>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.