Skip to content

Instantly share code, notes, and snippets.

@fergbrain
Created January 17, 2013 06:40
Show Gist options
  • Save fergbrain/4554180 to your computer and use it in GitHub Desktop.
Save fergbrain/4554180 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Debug Countdown Timer
Plugin URI: http://www.andrewferguson.net/wordpress-plugins/countdown-timer/
Description: Debug things when they go wrong
Version: 0.1
Author: Andrew Ferguson
Author URI: http://www.andrewferguson.net
Debug Countdown Timer - Debug things when they go wrong
Copyright (c) 2013 Andrew Ferguson
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@package Countdown_Timer
@author Andrew Ferguson
@since
@access private
{@internal Missing}
@param type $varname Description
@return type Description
@todo
*/
add_action('admin_notices', 'fergcorp_debugCountdownTimer_admin_notices');
function fergcorp_debugCountdownTimer_admin_notices(){
global $wpdb;
global $query_string;
echo "<div class='updated' style='background-color:#f66;'><p>Please select all of the text below and send it to andrew@fergcorp.com. Then deactivate and remove Debug Countdown Timer.</p>
<textarea cols='80' rows='10'>";
print_r($wpdb->get_results($wpdb->prepare("
SELECT *
FROM $wpdb->options
WHERE option_name
LIKE '%s'
OR option_value
LIKE '%s'",
"%fergcorp%", "%fergcorp%")
));
echo"</textarea></div>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment