Skip to content

Commit 72329de

Browse files
committed
Work in progress.
1 parent 0ddea3e commit 72329de

File tree

5 files changed

+304
-12
lines changed

5 files changed

+304
-12
lines changed

changelog.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# DebugPress
2+
3+
## Changelog
4+
5+
### Version: 3.9 (2024.05.14)
6+
7+
* **edit** few more updates and improvements
8+
* **edit** replacement of some native with WordPress functions
9+
* **edit** various small updates and tweaks
10+
* **edit** Kint Pretty Print Library 5.1.1
11+
* **fix** various PHP notices related to PHP 8.1 and newer
12+
13+
### Version: 3.8 (2024.04.24)
14+
15+
* **edit** few minor tweaks and changes
16+
* **edit** updates to the plugin readme file
17+
* **edit** small changes related to the PHP 8.3 compatibility
18+
* **fix** various PHP notices related to PHP 8.1 and newer
19+
20+
### Version: 3.7 (2024.01.23)
21+
22+
* **edit** changes related to WordPress and PHP code standards
23+
* **edit** updated Query object for page query conditionals
24+
* **edit** updated Dev4Press Library Query detection versions
25+
* **fix** few compare statements written as assignment
26+
27+
### Version: 3.6 (2023.12.15)
28+
29+
* **edit** Increase Kint Library depth levels to 12
30+
* **edit** Kint Pretty Print Library 5.1.0
31+
* **fix** Small issue with getting the OPCache version when not allowed by the server

core/display/SQLFormat.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -874,21 +874,21 @@ protected static function getNextToken( $string, $previous = null ) {
874874
if ( preg_match( '/^(' . self::$regex_reserved_toplevel . ')($|\s|' . self::$regex_boundaries . ')/', $upper, $matches ) ) {
875875
return array(
876876
self::TOKEN_TYPE => self::TOKEN_TYPE_RESERVED_TOPLEVEL,
877-
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ) ),
877+
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ?? '' ) ),
878878
);
879879
}
880880
// Newline Reserved Word
881881
if ( preg_match( '/^(' . self::$regex_reserved_newline . ')($|\s|' . self::$regex_boundaries . ')/', $upper, $matches ) ) {
882882
return array(
883883
self::TOKEN_TYPE => self::TOKEN_TYPE_RESERVED_NEWLINE,
884-
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ) ),
884+
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ?? '' ) ),
885885
);
886886
}
887887
// Other Reserved Word
888888
if ( preg_match( '/^(' . self::$regex_reserved . ')($|\s|' . self::$regex_boundaries . ')/', $upper, $matches ) ) {
889889
return array(
890890
self::TOKEN_TYPE => self::TOKEN_TYPE_RESERVED,
891-
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ) ),
891+
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ?? '' ) ),
892892
);
893893
}
894894
}
@@ -900,7 +900,7 @@ protected static function getNextToken( $string, $previous = null ) {
900900
if ( preg_match( '/^(' . self::$regex_function . '[(]|\s|[)])/', $upper, $matches ) ) {
901901
return array(
902902
self::TOKEN_TYPE => self::TOKEN_TYPE_RESERVED,
903-
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ) - 1 ),
903+
self::TOKEN_VALUE => substr( $string, 0, strlen( $matches[1] ?? '' ) - 1 ),
904904
);
905905
}
906906

@@ -1106,7 +1106,7 @@ public static function format( $string, $highlight = true ) {
11061106
}
11071107
}
11081108

1109-
$inline_count += strlen( $token[ self::TOKEN_VALUE ] );
1109+
$inline_count += strlen( $token[ self::TOKEN_VALUE ] ?? '' );
11101110
}
11111111

11121112
// Opening parentheses increase the block indent level and start a new line
@@ -1141,7 +1141,7 @@ public static function format( $string, $highlight = true ) {
11411141
break;
11421142
}
11431143

1144-
$length += strlen( $next[ self::TOKEN_VALUE ] );
1144+
$length += strlen( $next[ self::TOKEN_VALUE ] ?? '' );
11451145
}
11461146

11471147
if ( $inline_parentheses && $length > 30 ) {

debugpress.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Author: Milan Petrovic
77
* Author URI: https://www.dev4press.com/
88
* Text Domain: debugpress
9-
* Version: 3.8.2
9+
* Version: 3.9
1010
* Requires at least: 5.5
1111
* Tested up to: 6.5
1212
* Requires PHP: 7.4
@@ -33,7 +33,7 @@
3333
* along with this program. If not, see <http://www.gnu.org/licenses/>
3434
*/
3535

36-
const DEBUGPRESS_VERSION = '3.8.2';
36+
const DEBUGPRESS_VERSION = '3.9';
3737
const DEBUGPRESS_FILE = __FILE__;
3838
const DEBUGPRESS_PLUGIN_PATH = __DIR__ . '/';
3939

history.md

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
# DebugPress
2+
3+
## Changelog
4+
5+
### Version: 3.5.1 (2023.11.18)
6+
7+
* **fix** Internal debug to error log remain in the source code
8+
9+
### Version: 3.5 (2023.11.06)
10+
11+
* **new** Tracker logs the trace for each HTTP API request made
12+
* **new** Tracker executes action for every completed HTTP API request
13+
* **new** AJAX Tracker executes action for every completed Admin AJAX request
14+
* **new** HTTP API log shows the trace and timestamps for each request
15+
* **new** Popup tools links to the coreActivity events and logs
16+
* **new** Popup header shows icons for tabs with labels with improved sizing
17+
* **new** Popup tabs show label or icon only, depending on the screen size
18+
* **fix** Trace information for tracker HTTP API request was lost
19+
20+
### Version: 3.4.1 (2023.10.15)
21+
22+
* **fix** Function `apache_get_version` not working on every server
23+
24+
### Version: 3.4 (2023.10.06)
25+
26+
* **new** Updated some plugin system requirements
27+
* **edit** KINT now loads own helper d() and s() functions
28+
* **edit** Various styling improvements and tweaks
29+
* **edit** Improved organization of the print libraries now moved to vendor directory
30+
* **fix** MySQL tools panel showing error if the server information can't be retrieved
31+
* **fix** Problem with the Info method for getting server IP in some cases
32+
* **fix** Few more issues with Info method for getting database information
33+
34+
### Version: 3.3 (2023.07.03)
35+
36+
* **new** Support for more versions of the Dev4Press Library
37+
* **new** System tab shows additional information about Apache
38+
* **new** System tab shows WordPress database overview information
39+
* **new** Remember open/close sections on some panels
40+
* **edit** Some changes to the displayed System and Basic tabs
41+
* **edit** Various small tweaks to the plugin PHP code
42+
* **edit** Kint Pretty Print Library 5.0.7
43+
* **fix** Few issues with Info method for getting database information
44+
45+
### Version: 3.2 (2023.06.22)
46+
47+
* **new** Support for the deprecated hook run handling
48+
* **new** Execute actions when each error has been logged
49+
* **new** Deprecated tracking now logs the caller information
50+
* **edit** Improved caller trace cleanup for error calls
51+
* **edit** Display more relevant error source file and log for errors
52+
* **edit** Errors tab moved to the end of the display order
53+
* **edit** Changed tab order for several other debugger tabs
54+
* **edit** Various small tweaks to the plugin PHP code
55+
* **fix** Fatal error tracking calling default handler directly
56+
* **fix** Sometimes errors not getting displayed in the Error tab
57+
58+
### Version: 3.1 (2023.06.14)
59+
60+
* **new** Identify SQL queries sources for Dev4Press plugins
61+
* **new** Hooks panel can filter by the WordPress Admin callbacks
62+
* **edit** Improved method for displaying button activation flags
63+
* **edit** Many improvements to escaping variables for display
64+
* **edit** Better optimized included images for logos
65+
* **edit** Various small tweaks to the plugin PHP code
66+
* **edit** Various small tweaks to the main JavaScript file
67+
* **fix** Hooks panel not filtering MU Plugins
68+
69+
### Version: 3.0.1 (2023.05.05)
70+
71+
* **edit** Minor updates to the plugin readme file
72+
* **edit** Various improvements to the PHP core code
73+
* **fix** Warnings related to OPCache for some PHP configurations
74+
75+
### Version: 3.0 (2023.04.03)
76+
77+
* **new** Modify debugger popup layout and size
78+
* **new** Modify debugger popup modal state
79+
* **new** Modify debugger popup opening state (auto, manual, remember state)
80+
* **new** Save active tab and show it first on next page load
81+
* **new** Trigger debugger popup display via keyboard shortcut
82+
* **new** Access Key option to enable loading on demand via URL
83+
* **new** Settings block and information for the On Demand access
84+
* **new** Settings block and information for shortcut key activation
85+
* **new** Admin bar button has basic stats dropdown menu
86+
* **new** Plugin settings Help tab with On Demand information
87+
* **new** Content tab split into Content and Rewrite tabs
88+
* **new** Basic tab shows currently active theme information
89+
* **new** Admin tab content moved to the Request tab
90+
* **new** Refreshed the debugger look with new icons
91+
* **new** Function to write log entry into custom info/log file
92+
* **new** `IP` class mostly rewritten and expanded
93+
* **new** Mousetrap Javascript v1.6.5 library
94+
* **edit** Few improvements to the plugin init and load process
95+
* **edit** Various improvements to the PHP core code
96+
* **edit** Changes to some plugin default settings
97+
* **edit** `IP` class expanded Cloudflare IP range
98+
* **edit** Smart Animated Popup v2.0 library
99+
* **del** removed the dedicated Admin tab
100+
* **fix** Few issues with the `IP` class range methods
101+
102+
### Version: 2.2 (2023.02.03)
103+
104+
* **new** Updated some plugin system requirements
105+
* **new** Server panel shows PHP Include Path value
106+
* **new** Server panel shows Memcache/Memcached status
107+
* **new** Server panel shows all loaded extensions
108+
* **new** Server panel shows expanded MySQL information
109+
* **edit** Various improvements to some panels display conditions
110+
* **fix** Several more issues related to changes in PHP 8.1 and 8.2
111+
* **fix** Issue with detection of the PEAR System.php file
112+
113+
### Version: 2.1 (2022.12.30)
114+
115+
* **new** Tested with PHP 8.2 and WordPress 6.1
116+
* **new** Query panel shows current post and metadata for that post
117+
* **edit** Improvements to the Query panel and organization of displayed data
118+
* **edit** Various language syntax improvements and changes
119+
* **edit** Kint Pretty Print Library 5.0.1
120+
* **fix** Several issues related to changes in PHP 8.2
121+
* **fix** Few minor issues with the layouts in the debugger panels
122+
* **fix** Missing semicolon in one instance in JavaScript
123+
124+
### Version: 2.0 (2022.08.31)
125+
126+
* **new** Prevent loading of the debugger panel for REST request
127+
* **new** Default PrettyPrint library has own CSS file
128+
* **new** Debugger now loads on the WordPress login pages
129+
* **new** Kint set as default pretty print library for new installations
130+
* **edit** Improvements to the plugin loading process
131+
* **edit** Various minor updates and tweaks
132+
* **edit** Kint Pretty Print Library 4.2
133+
* **fix** Plugin can break some REST request responses
134+
135+
### Version: 1.9 (2022.05.15)
136+
137+
* **new** Tested with WordPress 6.0
138+
* **edit** Several minor updates and improvements
139+
* **edit** Kint Pretty Print Library 4.1.1
140+
* **fix** Some layout issues with the tables
141+
142+
### Version: 1.8 (2021.09.30)
143+
144+
* **new** requires WordPress 5.1 or newer
145+
* **new** activation button indicator for number of stored object
146+
* **edit** few more compatibility changes to the JavaScript code
147+
* **edit** OPCache status support for server restricted access
148+
* **fix** OPCache warnings when access is restricted on server
149+
150+
### Version: 1.7 (2021.04.03)
151+
152+
* **new** debugger panel - Plugins
153+
* **new** plugins panel - log specially formatted objects from plugins
154+
* **new** settings panel shows Tracking tab
155+
* **new** settings group to select Pretty Print engine to use
156+
* **new** third party pretty print Engine: Kint
157+
* **edit** various improvements to the debugger popup styling
158+
* **fix** few Info methods have wrong names
159+
* **fix** few warnings thrown by the Tracker object
160+
161+
### Version: 1.6 (2021.01.06)
162+
163+
* **new** requires PHP 7.0 or newer
164+
* **new** requires WordPress 5.0 or newer
165+
* **new** debugger panel - Roles
166+
* **new** roles panel - shows registered user roles
167+
* **new** changed the loading order and activation priority
168+
* **edit** few improvements to the readme file
169+
* **fix** tools panel - broken links to all the plugin panels
170+
* **fix** tracker loading causes' problem with some plugins changing user roles
171+
172+
### Version: 1.5 (2020.11.14)
173+
174+
* **new** debugger panel - Tools
175+
* **new** tools panel - links to the individual plugin info panels
176+
* **new** tools panel - links to the individual WordPress tools panels
177+
* **new** tools panel - links to test with Google PageSpeed Insights
178+
* **new** tools panel - link to test with GTMetrix website
179+
* **new** contextual help tab for the plugin settings
180+
* **new** contextual help includes information about debug mode activation
181+
* **edit** various styling changes and tweaks
182+
* **fix** few minor typos in various parts of the code
183+
* **fix** few external links were missing REL noopener attribute
184+
* **fix** minor issue with CMS version INFO method
185+
186+
### Version: 1.4.1 (2020.11.06)
187+
188+
* **edit** support for the edge case HTTP request missing valid URL
189+
* **fix** HTTP panel could still fail in some edge case requests
190+
191+
### Version: 1.4 (2020.11.03)
192+
193+
* **edit** improvements to the way HTTP panel displays logged data
194+
* **fix** HTTP panel shows duplicated content type entry
195+
* **fix** HTTP panel attempts to display data that doesn't exist
196+
* **fix** error log loading fails due to file offset calculation
197+
* **fix** problem with returning error log via AJAX method
198+
199+
### Version: 1.3.2 (2020.10.03)
200+
201+
* **new** link to plugin Tools (Info) page added to Debugger popup footer
202+
* **edit** improvements to documentation for pretty print functions
203+
* **edit** renamed existing System class to Server for potential file name conflict
204+
* **fix** debuglog tab doesn't scroll to the end of the list after the list is loaded
205+
* **fix** test for Pear presence can throw warnings on some hosts
206+
207+
### Version: 1.3.1 (2020.10.01)
208+
209+
* **edit** minor changes to the main plugin class
210+
* **fix** one constant was not defined
211+
212+
### Version: 1.3 (2020.10.01)
213+
214+
* **new** additional Info page added into WordPress admin Tools
215+
* **new** tools info page shows the content of PHP Info
216+
* **new** tools info page shows the content of OPCache Info
217+
* **new** tools info page shows the content of MySQL Variables
218+
* **new** plugin settings panel uses tabbed interface to organize settings
219+
* **new** option to control AJAX tracking data save into debug.log
220+
* **new** filters to control AJAX tracking activity and data returned
221+
* **new** filter to control every plugin settings returned value
222+
* **new** ability to print SQL formatted string for the user stored queries
223+
* **new** improved documentation for all the functions
224+
* **edit** refactored functions and improved the functions' organization
225+
* **edit** refactored pretty print function to use different name and classes
226+
* **edit** uniform return of rendered results from ErrorFormat class
227+
* **edit** expanded plugin readme.txt and added new screenshots
228+
* **removed** several unused methods in the ErrorFormat class
229+
230+
### Version: 1.2.1 (2020.09.27)
231+
232+
* **edit** various improvements to errors and warnings tracking handlers
233+
* **fix** missing argument for the deprecated tracking handler
234+
235+
### Version: 1.2 (2020.09.25)
236+
237+
* **new** debugger activator: show number of captured HTTP API calls
238+
* **new** debugger Log panel: renamed to Store
239+
* **new** debugger Log panel: rewritten rendering to match other panels
240+
* **new** debugger HTTP tab: shows number of calls in the tab button
241+
* **new** settings to control AJAX calls tracking on active page
242+
* **new** settings to control errors and warnings tracking
243+
* **edit** various minor improvements and changes
244+
* **fix** wrong class name in the backtrace tracker processor
245+
* **fix** few small issues with the deprecated tracker processor
246+
* **fix** several issues with displaying AJAX calls results
247+
248+
### Version: 1.1 (2020.09.23)
249+
250+
* **new** debugger panel - Debug Log
251+
* **new** using CSS variables for some debugger styling
252+
* **new** filters to modify CSS variables
253+
* **new** improved the look of the plugin settings page
254+
* **edit** expanded some information for plugin settings
255+
* **edit** changed plugins own actions and filters for uniformity
256+
* **edit** many improvements to the debugger styling
257+
* **edit** various improvements to the SCSS organization
258+
* **edit** various tweaks and changes
259+
260+
### Version: 1.0 (2020.09.15)
261+
262+
* First official release

readme.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: GDragoN
33
Donate link: https://buymeacoffee.com/millan
44
Tags: dev4press, query monitor, debugging, development, ajax monitor
5-
Stable tag: 3.8.2
5+
Stable tag: 3.9
66
Requires at least: 5.5
77
Tested up to: 6.5
88
Requires PHP: 7.3
@@ -118,13 +118,12 @@ Yes. Once the popup is open, you will find the Layout icon next to the button to
118118
Open the WordPress 'Settings' menu, there you will find 'DebugPress' panel.
119119

120120
== Changelog ==
121-
= 3.8.2 (2024.04.29) =
121+
= 3.9 (2024.05.14) =
122122
* Edit: few more updates and improvements
123-
124-
= 3.8.1 (2024.04.27) =
125123
* Edit: replacement of some native with WordPress functions
126124
* Edit: various small updates and tweaks
127125
* Edit: Kint Pretty Print Library 5.1.1
126+
* Fix: various PHP notices related to PHP 8.1 and newer
128127

129128
= 3.8 (2024.04.24) =
130129
* Edit: few minor tweaks and changes

0 commit comments

Comments
 (0)