Skip to content

Commit e6aec9b

Browse files
committed
Bump changelog, array notation
1 parent b0c4d95 commit e6aec9b

File tree

6 files changed

+26
-16
lines changed

6 files changed

+26
-16
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 1.5.3 (22 May 2019)
4+
* Fix: Try to get rid of PHP errors related to "Unable to set PHP Console server cookie" and "Cannot modify header information - headers already sent"
5+
* Misc: Require PHP 5.6
6+
37
### 1.5.2 (12 Sep 2018)
48
* Misc: Updates PHP Console core library to v3.1.7
59

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "unfulvio/wp-php-console",
33
"description": "A WordPress implementation of PHP Console.",
44
"type": "wordpress-plugin",
5-
"version": "1.5.2",
5+
"version": "1.5.3",
66
"keywords": ["wordpress", "debug", "debugging", "development", "php-console", "console", "terminal", "command-line", "cli" ],
77
"homepage": "https://github.com/unfulvio/wp-php-console",
88
"license": "GPLv2.0+",

includes/class-wp-php-console.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ private function set_admin() {
8383
// add a settings link to the plugins admin screen
8484
$plugin_name = str_replace( 'includes/class-', '', plugin_basename( __FILE__ ) );
8585
add_filter( "plugin_action_links_{$plugin_name}", static function( $actions ) {
86-
return array_merge( array(
86+
return array_merge( [
8787
'<a href="' . esc_url( admin_url( 'options-general.php?page=wp-php-console' ) ) . '">' . __( 'Settings', 'wp-php-console' ) . '</a>',
88-
), $actions );
88+
], $actions );
8989
} );
9090

9191
// init settings
@@ -129,20 +129,21 @@ public function connect() {
129129
* Get WP PHP Console settings options.
130130
*
131131
* @since 1.4.0
132+
*
132133
* @return array
133134
*/
134135
protected function get_options() {
135136

136-
$options = get_option( 'wp_php_console', array() );
137+
$options = get_option( 'wp_php_console', [] );
137138

138-
return wp_parse_args( $options, array(
139+
return wp_parse_args( $options, [
139140
'ip' => '',
140141
'password' => '',
141142
'register' => false,
142143
'short' => false,
143144
'ssl' => false,
144145
'stack' => false,
145-
) );
146+
] );
146147
}
147148

148149

@@ -199,7 +200,7 @@ public function init() {
199200
if ( empty( $password ) ) {
200201

201202
// display admin notice and abort if no password has been set
202-
add_action( 'admin_notices', array( $this, 'password_notice' ) );
203+
add_action( 'admin_notices', [ $this, 'password_notice' ] );
203204
return;
204205
}
205206

@@ -263,7 +264,7 @@ public function init() {
263264
$this->print_notice_exception( $e );
264265
}
265266

266-
$openBaseDirs = array( ABSPATH, get_template_directory() );
267+
$openBaseDirs = [ ABSPATH, get_template_directory() ];
267268

268269
try {
269270
$evalProvider->addSharedVarReference( 'dirs', $openBaseDirs );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "wp-php-console",
33
"title": "WP PHP Console",
44
"description": "An implementation of PHP Console as a WordPress plugin. Use Chrome Dev Tools to debug your WordPress installation!",
5-
"version": "1.5.2",
5+
"version": "1.5.3",
66
"homepage": "https://wordpress.org/plugins/wp-php-console/",
77
"repository": {
88
"type": "git",

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: dev, development, bug, debug, debugging, stacktrace, php, console, termina
55
Requires at least: 3.6.0
66
Requires PHP: 5.6
77
Tested up to: 5.2.1
8-
Stable tag: 1.5.2
8+
Stable tag: 1.5.3
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -128,6 +128,10 @@ None.
128128

129129
== Changelog ==
130130

131+
= 1.5.3 =
132+
* Fix: Try to get rid of PHP errors related to "Unable to set PHP Console server cookie" and "Cannot modify header information - headers already sent"
133+
* Misc: Require PHP 5.6
134+
131135
= 1.5.2 =
132136
* Misc: Updates PHP Console core library to v3.1.7
133137

wp-php-console.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
*
1515
* Text Domain: wp-php-console
1616
* Domain Path: /languages
17-
*/
18-
19-
defined( 'ABSPATH' ) or exit;
20-
21-
/**
17+
*
2218
* WP PHP Console
2319
* Copyright (c) 2014-2019 Fulvio Notarstefano <[email protected]>
2420
* and contributors https://github.com/unfulvio/wp-php-console/graphs/contributors
@@ -41,7 +37,9 @@
4137
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
4238
*/
4339

44-
// Composer fallback for PHP < 5.3.0.
40+
defined( 'ABSPATH' ) or exit;
41+
42+
// composer fallback for PHP < 5.3.0
4543
if ( -1 === version_compare( PHP_VERSION, '5.3.0' ) ) {
4644
require_once dirname( __FILE__ ) . '/vendor/autoload_52.php';
4745
} else {
@@ -50,8 +48,11 @@
5048

5149
/**
5250
* WP PHP Console requires PHP 5.4.0 minimum.
51+
*
5352
* @link https://make.wordpress.org/plugins/2015/06/05/policy-on-php-versions/
5453
* @link https://github.com/unfulvio/wp-requirements
54+
*
55+
* TODO: remove WP_Requirements as a way of handling this
5556
*/
5657
$this_plugin_checks = new WP_Requirements(
5758
'WP PHP Console',

0 commit comments

Comments
 (0)