PHP Settings - Version 1.0.3

Version Description

  • (NEW) Added a link to the PHP settings page in the plugins page
  • (FIX) Locally overridden directives are now copied properly to the editor
Download this release

Release Info

Developer Askupa Software
Plugin Icon 128x128 PHP Settings
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

assets/css/style.css CHANGED
@@ -183,7 +183,7 @@
183
  background-color: #6AFDB2;
184
  }
185
 
186
- #phpinfo tr.local-override span {
187
  background-color: #FFEA56;
188
  padding: 2px 6px;
189
  border-radius: 4px;
183
  background-color: #6AFDB2;
184
  }
185
 
186
+ #phpinfo tr.local-override .highlight {
187
  background-color: #FFEA56;
188
  padding: 2px 6px;
189
  border-radius: 4px;
assets/js/process-button.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @package PHP Settings
3
- * @date 2016-03-11
4
- * @version 1.0.2
5
  * @author Askupa Software <contact@askupasoftware.com>
6
  * @link http://products.askupasoftware.com/php-settings
7
  * @copyright 2016 Askupa Software
1
  /**
2
  * @package PHP Settings
3
+ * @date 2016-04-19
4
+ * @version 1.0.3
5
  * @author Askupa Software <contact@askupasoftware.com>
6
  * @link http://products.askupasoftware.com/php-settings
7
  * @copyright 2016 Askupa Software
assets/js/script.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @package PHP Settings
3
- * @date 2016-03-11
4
- * @version 1.0.2
5
  * @author Askupa Software <contact@askupasoftware.com>
6
  * @link http://products.askupasoftware.com/php-settings
7
  * @copyright 2016 Askupa Software
@@ -81,14 +81,16 @@ jQuery(document).ready(function($) {
81
  $('[href="'+id+'"]').addClass('nav-tab-active');
82
  }
83
 
84
- $('#phpinfo-wrapper').on('click','#phpinfo tr',function(){
 
85
  var directive = $(this).children('th').text(),
86
  value = $(this).find('td .value').text();
87
-
88
  editor.setValue(editor.getValue() + '\n'+directive+' = '+value, 1);
89
  show_tab( '#tab1' );
90
  editor.focus();
91
- });
 
92
 
93
  function notify( message, type )
94
  {
1
  /**
2
  * @package PHP Settings
3
+ * @date 2016-04-19
4
+ * @version 1.0.3
5
  * @author Askupa Software <contact@askupasoftware.com>
6
  * @link http://products.askupasoftware.com/php-settings
7
  * @copyright 2016 Askupa Software
81
  $('[href="'+id+'"]').addClass('nav-tab-active');
82
  }
83
 
84
+ function copy_directive()
85
+ {
86
  var directive = $(this).children('th').text(),
87
  value = $(this).find('td .value').text();
88
+
89
  editor.setValue(editor.getValue() + '\n'+directive+' = '+value, 1);
90
  show_tab( '#tab1' );
91
  editor.focus();
92
+ }
93
+ $('#phpinfo-wrapper').on('click','#phpinfo tr',copy_directive);
94
 
95
  function notify( message, type )
96
  {
bootstrap.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: PHP Settings
14
  * Plugin URI: http://products.askupasoftware.com/php-settings
15
  * Description: This plugin provides a simple user interface with a code editor to edit your local php.ini settings.
16
- * Version: 1.0.2
17
  * Author: Askupa Software
18
  * Author URI: http://www.askupasoftware.com
19
  * Text Domain: php-settings
@@ -22,7 +22,7 @@
22
 
23
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
24
 
25
- define( 'PHP_SETTINGS_VERSION', '1.0.2' );
26
  define( 'PHP_SETTINGS_JS_URL', plugins_url( '/assets/js/', __FILE__ ) );
27
  define( 'PHP_SETTINGS_CSS_URL', plugins_url( '/assets/css/', __FILE__ ) );
28
  define( 'PHP_SETTINGS_IMG_URL', plugins_url( '/assets/img/', __FILE__ ) );
13
  * Plugin Name: PHP Settings
14
  * Plugin URI: http://products.askupasoftware.com/php-settings
15
  * Description: This plugin provides a simple user interface with a code editor to edit your local php.ini settings.
16
+ * Version: 1.0.3
17
  * Author: Askupa Software
18
  * Author URI: http://www.askupasoftware.com
19
  * Text Domain: php-settings
22
 
23
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
24
 
25
+ define( 'PHP_SETTINGS_VERSION', '1.0.3' );
26
  define( 'PHP_SETTINGS_JS_URL', plugins_url( '/assets/js/', __FILE__ ) );
27
  define( 'PHP_SETTINGS_CSS_URL', plugins_url( '/assets/css/', __FILE__ ) );
28
  define( 'PHP_SETTINGS_IMG_URL', plugins_url( '/assets/img/', __FILE__ ) );
includes/EnvironmentValidator.php CHANGED
@@ -1,4 +1,12 @@
1
  <?php
 
 
 
 
 
 
 
 
2
 
3
  function php_settings_admin_notice()
4
  {
1
  <?php
2
+ /**
3
+ * @package PHP Settings
4
+ * @date 2016-04-19
5
+ * @version 1.0.3
6
+ * @author Askupa Software <contact@askupasoftware.com>
7
+ * @link http://products.askupasoftware.com/php-settings
8
+ * @copyright 2016 Askupa Software
9
+ */
10
 
11
  function php_settings_admin_notice()
12
  {
includes/INIFile.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
-
3
  /**
4
  * @package PHP Settings
5
- * @date 2016-03-11
6
- * @version 1.0.2
7
  * @author Askupa Software <contact@askupasoftware.com>
8
  * @link http://products.askupasoftware.com/php-settings
9
  * @copyright 2016 Askupa Software
1
  <?php
 
2
  /**
3
  * @package PHP Settings
4
+ * @date 2016-04-19
5
+ * @version 1.0.3
6
  * @author Askupa Software <contact@askupasoftware.com>
7
  * @link http://products.askupasoftware.com/php-settings
8
  * @copyright 2016 Askupa Software
includes/PHPInfo.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
-
3
  /**
4
  * @package PHP Settings
5
- * @date 2016-03-11
6
- * @version 1.0.2
7
  * @author Askupa Software <contact@askupasoftware.com>
8
  * @link http://products.askupasoftware.com/php-settings
9
  * @copyright 2016 Askupa Software
1
  <?php
 
2
  /**
3
  * @package PHP Settings
4
+ * @date 2016-04-19
5
+ * @version 1.0.3
6
  * @author Askupa Software <contact@askupasoftware.com>
7
  * @link http://products.askupasoftware.com/php-settings
8
  * @copyright 2016 Askupa Software
includes/PHPSettings.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
-
3
  /**
4
  * @package PHP Settings
5
- * @date 2016-03-11
6
- * @version 1.0.2
7
  * @author Askupa Software <contact@askupasoftware.com>
8
  * @link http://products.askupasoftware.com/php-settings
9
  * @copyright 2016 Askupa Software
@@ -14,12 +13,14 @@ class PHPSettings
14
  {
15
  private $title = 'PHP Settings';
16
 
17
- function __construct() {
 
18
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
19
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
20
  add_action( 'wp_ajax_save_php_settings', array( $this, 'save' ) );
21
  add_action( 'wp_ajax_delete_ini_files', array( $this, 'delete' ) );
22
  add_action( 'wp_ajax_refresh_table', array( $this, 'refresh_table' ) );
 
23
  }
24
 
25
  function admin_menu()
@@ -29,7 +30,7 @@ class PHPSettings
29
  $this->title,
30
  $this->title,
31
  'manage_options',
32
- strtolower(str_replace(' ', '_', $this->title)),
33
  array(
34
  $this,
35
  'render'
@@ -87,5 +88,18 @@ class PHPSettings
87
  {
88
  echo 'Proudly developed by <a class="askupa-logo" href="http://askupasoftware.com/"><img height="30" src="'.PHP_SETTINGS_IMG_URL.'askupa-logo.png"/></a>';
89
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  }
91
  new PHPSettings();
1
  <?php
 
2
  /**
3
  * @package PHP Settings
4
+ * @date 2016-04-19
5
+ * @version 1.0.3
6
  * @author Askupa Software <contact@askupasoftware.com>
7
  * @link http://products.askupasoftware.com/php-settings
8
  * @copyright 2016 Askupa Software
13
  {
14
  private $title = 'PHP Settings';
15
 
16
+ function __construct()
17
+ {
18
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
19
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
20
  add_action( 'wp_ajax_save_php_settings', array( $this, 'save' ) );
21
  add_action( 'wp_ajax_delete_ini_files', array( $this, 'delete' ) );
22
  add_action( 'wp_ajax_refresh_table', array( $this, 'refresh_table' ) );
23
+ add_filter( 'plugin_action_links_' . plugin_basename( dirname( __DIR__ ).'/bootstrap.php' ), array( $this, 'add_action_links' ) );
24
  }
25
 
26
  function admin_menu()
30
  $this->title,
31
  $this->title,
32
  'manage_options',
33
+ $this->get_slug(),
34
  array(
35
  $this,
36
  'render'
88
  {
89
  echo 'Proudly developed by <a class="askupa-logo" href="http://askupasoftware.com/"><img height="30" src="'.PHP_SETTINGS_IMG_URL.'askupa-logo.png"/></a>';
90
  }
91
+
92
+ function get_slug()
93
+ {
94
+ return strtolower(str_replace(' ', '_', $this->title));
95
+ }
96
+
97
+ function add_action_links( $links )
98
+ {
99
+ $mylinks = array(
100
+ '<a href="' . admin_url( 'tools.php?page='.$this->get_slug() ) . '">Settings</a>',
101
+ );
102
+ return array_merge( $links, $mylinks );
103
+ }
104
  }
105
  new PHPSettings();
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: Askupa Software
3
  Tags: admin, php settings, user.ini, ini rules, php.ini, php5.ini, post max size, post_max_size, upload limit, upload max filesize, upload_max_filesize, max_execution_time, max execution time
4
  Requires at least: 3.0
5
- Tested up to: 4.4.2
6
- Stable tag: 1.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -69,8 +69,12 @@ This can happen for multiple reasons.
69
 
70
  == Changelog ==
71
 
 
 
 
 
72
  = 1.0.2 =
73
- * (FIXED) The plugin will gracefully shutdown if the PHP version is too old
74
  * (IMPROVED) Reorganized file structure in a more logical way
75
  * (IMPROVED) Changed naming conventions to prevent class name collisions
76
 
2
  Contributors: Askupa Software
3
  Tags: admin, php settings, user.ini, ini rules, php.ini, php5.ini, post max size, post_max_size, upload limit, upload max filesize, upload_max_filesize, max_execution_time, max execution time
4
  Requires at least: 3.0
5
+ Tested up to: 4.5.0
6
+ Stable tag: 1.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
69
 
70
  == Changelog ==
71
 
72
+ = 1.0.3 =
73
+ * (NEW) Added a link to the PHP settings page in the plugins page
74
+ * (FIX) Locally overridden directives are now copied properly to the editor
75
+
76
  = 1.0.2 =
77
+ * (FIX) The plugin will gracefully shutdown if the PHP version is too old
78
  * (IMPROVED) Reorganized file structure in a more logical way
79
  * (IMPROVED) Changed naming conventions to prevent class name collisions
80
 
view/options-page.phtml CHANGED
@@ -64,7 +64,7 @@
64
  <div class="tab-description">
65
  <p>Use this table to see which core PHP settings were locally overridden (their row becomes highlighted).</p>
66
  <p>You can click on a setting row to copy it to the editor.</p>
67
- <p><strong>NOTE</strong>: In certain hosting platforms it may take a few minutes for the system to update the settings. You can click on "Refresh Table" to load the most resent PHP settings from the server.</p>
68
  </div>
69
  </div>
70
  </div>
64
  <div class="tab-description">
65
  <p>Use this table to see which core PHP settings were locally overridden (their row becomes highlighted).</p>
66
  <p>You can click on a setting row to copy it to the editor.</p>
67
+ <p><strong>NOTE</strong>: In certain hosting platforms it may take a few minutes for the system to update the settings. You can click on "Refresh Table" to load the most recent PHP settings from the server.</p>
68
  </div>
69
  </div>
70
  </div>
view/phpinfo.phtml CHANGED
@@ -5,8 +5,8 @@
5
  <tr class='local-override'>
6
  <th><?php echo $key ?></th>
7
  <td>
8
- <?php echo $val[0]; ?>
9
- <span>Locally Overridden</span>
10
  </td>
11
  </tr>
12
  <?php else: ?>
5
  <tr class='local-override'>
6
  <th><?php echo $key ?></th>
7
  <td>
8
+ <span class="value"><?php echo $val[0]; ?></span>
9
+ <span class="highlight">Locally Overridden</span>
10
  </td>
11
  </tr>
12
  <?php else: ?>