Created
January 13, 2015 17:31
-
-
Save AbhishekGhosh/897d36d120eb4c7f79d8 to your computer and use it in GitHub Desktop.
WordPress Multisite ID Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// must be placed under wp-content/mu-plugins/ | |
// GNU GPL 3.0 Licence | |
// Digital Ocean created it, but WordPress is not their father's property | |
// hence DMCA safe harbour exists | |
// if they files DMCA, we will file a simple civil case for abusing law from Bombay High Court | |
// for abusing the Power of Law | |
// hence Github can not delete | |
// hence you should kiss me | |
// hence you might get hacked if you are not sure what it is | |
// hence if you are The President | |
// file DMCA | |
// eleseif | |
// do not file case. | |
// abusing law. huh? mother foo *ke -R | |
// you can fork, do not fear ! | |
add_filter( 'wpmu_blogs_columns', 'do_get_id' ); | |
add_action( 'manage_sites_custom_column', 'do_add_columns', 10, 2 ); | |
add_action( 'manage_blogs_custom_column', 'do_add_columns', 10, 2 ); | |
function do_add_columns( $column_name, $blog_id ) { | |
if ( 'blog_id' === $column_name ) | |
echo $blog_id; | |
return $column_name; | |
} | |
function do_get_id( $columns ) { | |
$columns['blog_id'] = 'ID'; | |
return $columns; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment