-
Notifications
You must be signed in to change notification settings - Fork 2
/
tgm-example-plugin.php
67 lines (63 loc) · 2.21 KB
/
tgm-example-plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* TGM Example Plugin.
*
* Example plugin to demonstrate the ability to handle bundled plugins with the
* TGM Plugin Activation library.
*
* @package WordPress\Plugins\TGM Example Plugin
* @author Thomas Griffin <[email protected]>
* @link https://github.com/thomasgriffin/TGM-Plugin-Activation
* @version 1.0.2
* @copyright 2011-2016 Thomas Griffin
* @license http://creativecommons.org/licenses/GPL/3.0/ GNU General Public License, version 3 or higher
*
* @wordpress-plugin
* Plugin Name: TGM Example Plugin
* Plugin URI: http://tgmpluginactivation.com/
* Description: This is an example plugin to going along with the TGM Plugin Activation class.
* Author: Thomas Griffin
* Author URI: http://thomasgriffinmedia.com/
* Version: 1.0.2
* Text Domain: tgm-example-plugin
* Domain Path: /languages
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3, as
* published by the Free Software Foundation.
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'tgm_php_mysql_versions' ) ) {
add_action( 'rightnow_end', 'tgm_php_mysql_versions', 9 );
/**
* Displays the current server's PHP and MySQL versions right below the WordPress version
* in the Right Now dashboard widget.
*
* @since 1.0.0
*/
function tgm_php_mysql_versions() {
echo wp_kses(
sprintf(
/* TRANSLATORS: %1 = php version nr, %2 = mysql version nr. */
__( '<p>You are running on <strong>PHP %1$s</strong> and <strong>MySQL %2$s</strong>.</p>', 'tgm-example-plugin' ),
phpversion(),
$GLOBALS['wpdb']->db_version()
),
array(
'p' => array(),
'strong' => array(),
)
);
}
}