Version Description
Download this release
Release Info
Developer | dgwyer |
Plugin | Display PHP Version |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.2
- display-php-version.php +17 -11
- dpv.js +3 -0
- readme.txt +17 -8
- screenshot-1.png +0 -0
display-php-version.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Display PHP Version
|
4 |
-
Description: Displays the current PHP version in the "
|
5 |
-
Version: 1.
|
6 |
Author: David Gwyer
|
7 |
Author URI: http://www.presscoders.com
|
8 |
*/
|
@@ -24,13 +24,19 @@ Author URI: http://www.presscoders.com
|
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
27 |
-
function
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
-
add_action('
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Display PHP Version
|
4 |
+
Description: Displays the current PHP version in the "At a Glance" admin dashboard widget.
|
5 |
+
Version: 1.2
|
6 |
Author: David Gwyer
|
7 |
Author URI: http://www.presscoders.com
|
8 |
*/
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
27 |
+
function dpv_enqueue_script($hook) {
|
28 |
+
|
29 |
+
// only run on dashboard page
|
30 |
+
if( 'index.php' != $hook )
|
31 |
+
return;
|
32 |
+
|
33 |
+
// enqueue script to show PHP version
|
34 |
+
wp_enqueue_script( 'dpv_script', plugin_dir_url( __FILE__ ) . 'dpv.js' );
|
35 |
+
|
36 |
+
// pass the PHP version to JavaScript
|
37 |
+
wp_localize_script( 'dpv_script', 'dpvObj', array(
|
38 |
+
'phpVersion' => phpversion()
|
39 |
+
) );
|
40 |
+
|
41 |
}
|
42 |
+
add_action( 'admin_enqueue_scripts', 'dpv_enqueue_script' );
|
dpv.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
$("#wp-version-message").after("<p>Running PHP version: <b>" + dpvObj.phpVersion + "</b></p>");
|
3 |
+
});
|
readme.txt
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
Contributors: dgwyer
|
3 |
Tags: admin, dashboard, widget, display, PHP, version
|
4 |
Requires at least: 2.7
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
-
Displays the current PHP version in the "
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
-
Displays the current PHP version in the "
|
13 |
|
14 |
Please rate the Plugin if you find it useful, thanks.
|
15 |
|
@@ -19,10 +19,11 @@ See our <a href="http://www.presscoders.com" target="_blank">WordPress developme
|
|
19 |
|
20 |
Instructions for installing the Display PHP Version Plugin.
|
21 |
|
22 |
-
1.
|
23 |
-
2.
|
24 |
-
3.
|
25 |
-
4.
|
|
|
26 |
|
27 |
== Screenshots ==
|
28 |
|
@@ -30,6 +31,14 @@ Instructions for installing the Display PHP Version Plugin.
|
|
30 |
|
31 |
== Changelog ==
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*1.0 update*
|
34 |
|
35 |
* Initial uploaded version!
|
2 |
Contributors: dgwyer
|
3 |
Tags: admin, dashboard, widget, display, PHP, version
|
4 |
Requires at least: 2.7
|
5 |
+
Tested up to: 3.9.1
|
6 |
+
Stable tag: 1.2
|
7 |
|
8 |
+
Displays the current PHP version in the "At a Glance" admin dashboard widget.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
+
Displays the current PHP version in the "At a Glane" admin dashboard widget.
|
13 |
|
14 |
Please rate the Plugin if you find it useful, thanks.
|
15 |
|
19 |
|
20 |
Instructions for installing the Display PHP Version Plugin.
|
21 |
|
22 |
+
1. In your WordPress admin go to Plugins -> Add New.
|
23 |
+
2. Enter Display PHP Version in the text box and click Search Plugins.
|
24 |
+
3. In the list of Plugins click Install Now next to the Display PHP Version Plugin.
|
25 |
+
4. Once installed click to activate.
|
26 |
+
5. Go to your WordPress dashboard page and look next to your WordPress version to see what PHP version is running.
|
27 |
|
28 |
== Screenshots ==
|
29 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
*1.2 update*
|
35 |
+
|
36 |
+
* Added more reliable way to output PHP version number.
|
37 |
+
|
38 |
+
*1.1 update*
|
39 |
+
|
40 |
+
* Updated for WordPress 3.9.1.
|
41 |
+
|
42 |
*1.0 update*
|
43 |
|
44 |
* Initial uploaded version!
|
screenshot-1.png
CHANGED
Binary file
|