Created
April 17, 2012 16:33
-
-
Save nfreader/2407340 to your computer and use it in GitHub Desktop.
WP Search Engines Blocked
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 if ( current_user_can('manage_options')) { | |
$table = $wpdb->prefix . "options"; | |
$private = $wpdb->get_var("SELECT option_value FROM $table WHERE option_name = 'blog_public'"); | |
if ($private == 0) { | |
echo '<a href="#" class="btn btn-danger">Search Engines Blocked!</a>'; | |
} | |
else { | |
echo '<a href="#" class="btn btn-success">Search Engines Unblocked!</a>'; | |
} | |
} ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment