Skip to content

Commit 097ea2a

Browse files
committed
Add a generic tester plugin
1 parent 999a8c8 commit 097ea2a

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

tester.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
/**
3+
* PHP Tester - Plugins
4+
*
5+
* @package PHP Tester
6+
* @author Joe Dolson
7+
* @copyright 2021 PHP Tester
8+
* @license GPL-2.0+
9+
*
10+
* @wordpress-plugin
11+
* Plugin Name: PHP Tester
12+
* Plugin URI: http://localhost
13+
* Description: Convenient way to quickly run arbitrary PHP.
14+
* Author: Joseph C Dolson
15+
* Author URI: https://www.joedolson.com
16+
* Text Domain: localhost
17+
* License: GPL-2.0+
18+
* License URI: http://www.gnu.org/license/gpl-2.0.txt
19+
* Domain Path: lang
20+
* Version: 1.0.0
21+
*/
22+
23+
/*
24+
Copyright 2020-2024 Localhost Tester
25+
26+
This program is free software; you can redistribute it and/or modify
27+
it under the terms of the GNU General Public License as published by
28+
the Free Software Foundation; either version 2 of the License, or
29+
(at your option) any later version.
30+
31+
This program is distributed in the hope that it will be useful,
32+
but WITHOUT ANY WARRANTY; without even the implied warranty of
33+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34+
GNU General Public License for more details.
35+
36+
You should have received a copy of the GNU General Public License
37+
along with this program; if not, write to the Free Software
38+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
39+
*/
40+
41+
// Exit if accessed directly.
42+
if ( ! defined( 'ABSPATH' ) ) {
43+
exit;
44+
}
45+
46+
if ( ! defined( 'SCRIPT_DEBUG' ) ) {
47+
define( 'SCRIPT_DEBUG', true );
48+
}
49+
50+
add_action( 'admin_notices', 'debugging_processor' );
51+
function debugging_processor() {
52+
if ( isset( $_GET['debug'] ) ) {
53+
$result = mc_upgrade_db();
54+
55+
wp_admin_notice( print_r( $result, 1 ) );
56+
}
57+
}

0 commit comments

Comments
 (0)