Version Description
- (FIXED) The plugin will gracefully shutdown if the PHP version is too old
- (IMPROVED) Reorganized file structure in a more logical way
- (IMPROVED) Changed naming conventions to prevent class name collisions
Download this release
Release Info
Developer | Askupa Software |
Plugin | PHP Settings |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- style.css → assets/css/style.css +1 -1
- askupa-logo.png → assets/img/askupa-logo.png +0 -0
- hourglass.svg → assets/img/hourglass.svg +0 -0
- icon-256x256.png → assets/img/icon-256x256.png +0 -0
- process-button.js → assets/js/process-button.js +2 -2
- script.js → assets/js/script.js +2 -2
- php-settings.php → bootstrap.php +11 -6
- includes/EnvironmentValidator.php +15 -0
- ini-file.php → includes/INIFile.php +2 -2
- phpinfo.php → includes/PHPInfo.php +3 -3
- options-page.php → includes/PHPSettings.php +9 -9
- readme.txt +6 -1
- options-page.phtml → view/options-page.phtml +1 -1
- phpinfo.phtml → view/phpinfo.phtml +0 -0
style.css → assets/css/style.css
RENAMED
@@ -54,7 +54,7 @@
|
|
54 |
}
|
55 |
|
56 |
.process-button .loader {
|
57 |
-
background-image: url('hourglass.svg');
|
58 |
width: 26px;
|
59 |
height: 26px;
|
60 |
background-size: 26px;
|
54 |
}
|
55 |
|
56 |
.process-button .loader {
|
57 |
+
background-image: url('../img/hourglass.svg');
|
58 |
width: 26px;
|
59 |
height: 26px;
|
60 |
background-size: 26px;
|
askupa-logo.png → assets/img/askupa-logo.png
RENAMED
File without changes
|
hourglass.svg → assets/img/hourglass.svg
RENAMED
File without changes
|
icon-256x256.png → assets/img/icon-256x256.png
RENAMED
File without changes
|
process-button.js → assets/js/process-button.js
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @package PHP Settings
|
3 |
-
* @date 2016-03-
|
4 |
-
* @version 1.0.
|
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-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
|
script.js → assets/js/script.js
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @package PHP Settings
|
3 |
-
* @date 2016-03-
|
4 |
-
* @version 1.0.
|
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-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
|
php-settings.php → bootstrap.php
RENAMED
@@ -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.
|
17 |
* Author: Askupa Software
|
18 |
* Author URI: http://www.askupasoftware.com
|
19 |
* Text Domain: php-settings
|
@@ -22,9 +22,14 @@
|
|
22 |
|
23 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
24 |
|
25 |
-
define( 'PHP_SETTINGS_VERSION', '1.0.
|
26 |
-
define( '
|
|
|
|
|
27 |
|
28 |
-
include('
|
29 |
-
|
30 |
-
include('
|
|
|
|
|
|
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 |
|
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__ ) );
|
29 |
|
30 |
+
if( include('includes/EnvironmentValidator.php') ) // Validate PHP version etc
|
31 |
+
{
|
32 |
+
include('includes/PHPSettings.php');
|
33 |
+
include('includes/INIFile.php');
|
34 |
+
include('includes/PHPInfo.php');
|
35 |
+
}
|
includes/EnvironmentValidator.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function php_settings_admin_notice()
|
4 |
+
{
|
5 |
+
$message = '<strong>PHP Settings</strong> requires <strong>PHP 5.3.0</strong> or newer to run (you are currently running <strong>PHP '.phpversion().'</strong>). Please upgrade your PHP version.';
|
6 |
+
$type = 'error';
|
7 |
+
printf( '<div class="notice notice-%1$s"><p>%2$s</p></div>', $type, $message );
|
8 |
+
}
|
9 |
+
|
10 |
+
if( version_compare(phpversion(), '5.3.0', '<') )
|
11 |
+
{
|
12 |
+
add_action( 'admin_notices', 'php_settings_admin_notice' );
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
return true;
|
ini-file.php → includes/INIFile.php
RENAMED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
/**
|
4 |
* @package PHP Settings
|
5 |
-
* @date 2016-03-
|
6 |
-
* @version 1.0.
|
7 |
* @author Askupa Software <contact@askupasoftware.com>
|
8 |
* @link http://products.askupasoftware.com/php-settings
|
9 |
* @copyright 2016 Askupa Software
|
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
|
phpinfo.php → includes/PHPInfo.php
RENAMED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
/**
|
4 |
* @package PHP Settings
|
5 |
-
* @date 2016-03-
|
6 |
-
* @version 1.0.
|
7 |
* @author Askupa Software <contact@askupasoftware.com>
|
8 |
* @link http://products.askupasoftware.com/php-settings
|
9 |
* @copyright 2016 Askupa Software
|
@@ -65,6 +65,6 @@ class PHPInfo
|
|
65 |
{
|
66 |
$array = self::get_as_array();
|
67 |
$phpinfo_section = $array[$section];
|
68 |
-
include('phpinfo.phtml');
|
69 |
}
|
70 |
}
|
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
|
65 |
{
|
66 |
$array = self::get_as_array();
|
67 |
$phpinfo_section = $array[$section];
|
68 |
+
include( dirname( __DIR__ ).'/view/phpinfo.phtml' );
|
69 |
}
|
70 |
}
|
options-page.php → includes/PHPSettings.php
RENAMED
@@ -2,15 +2,15 @@
|
|
2 |
|
3 |
/**
|
4 |
* @package PHP Settings
|
5 |
-
* @date 2016-03-
|
6 |
-
* @version 1.0.
|
7 |
* @author Askupa Software <contact@askupasoftware.com>
|
8 |
* @link http://products.askupasoftware.com/php-settings
|
9 |
* @copyright 2016 Askupa Software
|
10 |
*/
|
11 |
|
12 |
|
13 |
-
class
|
14 |
{
|
15 |
private $title = 'PHP Settings';
|
16 |
|
@@ -68,24 +68,24 @@ class OptionsPage
|
|
68 |
|
69 |
function render()
|
70 |
{
|
71 |
-
include('options-page.phtml');
|
72 |
}
|
73 |
|
74 |
function enqueue_scripts( $hook )
|
75 |
{
|
76 |
if( 'tools_page_php_settings' === $hook )
|
77 |
{
|
78 |
-
wp_enqueue_script( 'php-settings-callback',
|
79 |
-
wp_enqueue_script( 'process-button',
|
80 |
wp_enqueue_script( 'ace-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js', array('jquery'), '1.2.3' );
|
81 |
-
wp_enqueue_style( 'php-settings',
|
82 |
add_filter('admin_footer_text', array( $this, 'footer_text' ) );
|
83 |
}
|
84 |
}
|
85 |
|
86 |
function footer_text()
|
87 |
{
|
88 |
-
echo 'Proudly developed by <a class="askupa-logo" href="http://askupasoftware.com/"><img height="30" src="'.
|
89 |
}
|
90 |
}
|
91 |
-
new
|
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
|
10 |
*/
|
11 |
|
12 |
|
13 |
+
class PHPSettings
|
14 |
{
|
15 |
private $title = 'PHP Settings';
|
16 |
|
68 |
|
69 |
function render()
|
70 |
{
|
71 |
+
include(dirname( __DIR__ ).'/view/options-page.phtml');
|
72 |
}
|
73 |
|
74 |
function enqueue_scripts( $hook )
|
75 |
{
|
76 |
if( 'tools_page_php_settings' === $hook )
|
77 |
{
|
78 |
+
wp_enqueue_script( 'php-settings-callback', PHP_SETTINGS_JS_URL.'script.js', array('jquery'), PHP_SETTINGS_VERSION );
|
79 |
+
wp_enqueue_script( 'process-button', PHP_SETTINGS_JS_URL.'process-button.js', array('jquery'), PHP_SETTINGS_VERSION );
|
80 |
wp_enqueue_script( 'ace-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js', array('jquery'), '1.2.3' );
|
81 |
+
wp_enqueue_style( 'php-settings', PHP_SETTINGS_CSS_URL.'style.css', array(), PHP_SETTINGS_VERSION );
|
82 |
add_filter('admin_footer_text', array( $this, 'footer_text' ) );
|
83 |
}
|
84 |
}
|
85 |
|
86 |
function footer_text()
|
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();
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -69,6 +69,11 @@ This can happen for multiple reasons.
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
= 1.0.1 =
|
73 |
* (NEW) An error message will be shown if PHP does not have sufficient permissions to write files
|
74 |
* (IMPROVED) Error handling & displaying
|
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 |
|
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 |
+
|
77 |
= 1.0.1 =
|
78 |
* (NEW) An error message will be shown if PHP does not have sufficient permissions to write files
|
79 |
* (IMPROVED) Error handling & displaying
|
options-page.phtml → view/options-page.phtml
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
<div class="wrap" id="php-settings-page">
|
2 |
|
3 |
<div class="plugin-banner">
|
4 |
-
<img height="128" src="<?php echo
|
5 |
<h1>PHP Settings <span>V <?php echo PHP_SETTINGS_VERSION ?></span><br/><span>Easily edit you INI settings</span></h1>
|
6 |
</div>
|
7 |
|
1 |
<div class="wrap" id="php-settings-page">
|
2 |
|
3 |
<div class="plugin-banner">
|
4 |
+
<img height="128" src="<?php echo PHP_SETTINGS_IMG_URL ?>icon-256x256.png" />
|
5 |
<h1>PHP Settings <span>V <?php echo PHP_SETTINGS_VERSION ?></span><br/><span>Easily edit you INI settings</span></h1>
|
6 |
</div>
|
7 |
|
phpinfo.phtml → view/phpinfo.phtml
RENAMED
File without changes
|