diff --git a/README.md b/README.md index f8ef2f3..353b58e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Contributors: qriouslad Donate link: https://bowo.io/vi-sp-rdm Tags: php variables, variable dump, debug, developer Requires at least: 4.8 -Tested up to: 6.2 -Stable tag: 2.4.0 +Tested up to: 6.2.2 +Stable tag: 2.4.3 Requires PHP: 5.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -66,8 +66,6 @@ If you need something more versatile for larger, more complex projects, these [P [Click here](https://bowo.io/vi-pro-scrsht-rdm) to see a screenshot of the [PRO version](https://bowo.io/vi-up-hstd-dsc) or see below in the screenshots section. -To upgrade, simply go to Variable Inspector dashboard in wp-admin and hit the Upgrade button. Or, go to the [PRO version's description page](https://bowo.io/vi-up-hstd-dsc) and purchase the PRO version there. - ### Check These Out Too * [Admin and Site Enhancements](https://wordpress.org/plugins/admin-site-enhancements/) helps you to easily enhance various admin workflows and site aspects while replacing multiple plugins doing it. @@ -94,7 +92,18 @@ Variable Inspector was built with: [WordPress Plugin Boilerplate](https://github ### Sponsor Variable Inspector -If this plugin has been useful for your **personal project(s), paid dev work, client site(s) and or agency's workflow**, please kindly consider **sponsoring from as little as USD 1** ([monthly](https://bowo.io/vi-sp-gth-chnlg) or [one-time](https://bowo.io/vi-sp-ppl-chnlg)). This helps ensure you're going to continue seeing **new features and/or fixes**, hopefully for years to come. Thank you! +If this plugin has been useful for your **personal project(s), paid dev work, client site(s) and or agency's workflow**, please kindly consider **sponsoring from as little as USD 1** ([monthly](https://bowo.io/vi-sp-gth-chnlg) or [one-time](https://bowo.io/vi-sp-ppl-chnlg)). You can also choose to [upgrade to the PRO version](https://bowo.io/vi-up-chnlg). Thank you! + +### 2.4.3 (2023.05.22) + +* Add handling for null type / value +* Added link to changelog in footer +* [PRO] Feedback link in header no longer links to wordpress.org support forum. It now links to the contact form within wp-admin. +* [PRO] Fixed: space in vis() inspector's second parameter no longer causes JS error and prevents variable content from loading. This is handled by converting space to underscore, e.g. 'the variable' will show up as $the_variable in the inspection result accordion. +* [PRO] Fixed: special characters inside the 'notes' parameter in vi() and vis() inspectors are now handled better and won't cause JS error. +* [PRO] Fixed: JS error "Maximum call stack size exceeded" when performing ajax actions, e.g. generate sample results, refrehs, etc. +* [PRO] kint viewer: now will properly show $variable_name when getting the access path info of each node in the inspection result +* [PRO] Make the style of NULL results uniform across var_dump_r, var_dump_tree and kint viewers ### 2.4.0 (2023.05.15) diff --git a/admin/class-variable-inspector-admin.php b/admin/class-variable-inspector-admin.php index 129e2a6..8d69156 100644 --- a/admin/class-variable-inspector-admin.php +++ b/admin/class-variable-inspector-admin.php @@ -239,12 +239,7 @@ public function vi_generate_sample_results() // $backtrace = debug_backtrace(); // do_action( 'inspect', [ 'backtrace', $backtrace, __FILE__, __LINE__ ] ); global $current_user, $wp_roles, $wp_post_types ; - do_action( 'inspect', [ - 'wp_post_types', - $wp_post_types, - __FILE__, - __LINE__ - ] ); + // do_action( 'inspect', [ 'wp_post_types', $wp_post_types, __FILE__, __LINE__ ] ); // do_action( 'inspect', [ 'wp_roles', $wp_roles, __FILE__, __LINE__ ] ); do_action( 'inspect', [ 'current_user', @@ -386,6 +381,10 @@ public function vi_inspection_results() case 'object': $variable_content = (object) maybe_unserialize( $variable['content'] ); break; + case 'NULL': + $variable_type = 'null'; + $variable_content = NULL; + break; } $variable_category = ( $variable['category'] ? $variable['category'] : 'gray' ); $variable_notes = $variable['extra']; @@ -419,7 +418,7 @@ public function vi_inspection_results() $output .= '
'; $output .= '
' . esc_html( $variable_type ) . '' . esc_html( $variable_name ) . '' . esc_html( $variable_notes ) . '
'; $output .= ' -
+
var_export' . $separator . ' var_dump' . $separator . ' @@ -497,16 +496,19 @@ public function vi_create_main_page() + ✚ + + + - - ✚ - @@ -600,7 +602,7 @@ public function vi_create_main_page() public function vi_footer_text() { ?> - Variable Inspector is on github + Variable Inspector is on github | View changelog WordPress Newsboard: The latest from 100+ sources'; + $content = 'Also by Bowo → WordPress Newsboard: The latest from 100+ sources'; + return $content; } /** diff --git a/admin/img/pro/variable-inspector-inspector-in-snippet-nr.png b/admin/img/pro/variable-inspector-inspector-in-snippet-nr.png new file mode 100644 index 0000000..145f218 Binary files /dev/null and b/admin/img/pro/variable-inspector-inspector-in-snippet-nr.png differ diff --git a/admin/img/pro/variable-inspector-vi-inspector-vb-nr.png b/admin/img/pro/variable-inspector-vi-inspector-vb-nr.png new file mode 100644 index 0000000..5162626 Binary files /dev/null and b/admin/img/pro/variable-inspector-vi-inspector-vb-nr.png differ diff --git a/admin/img/pro/variable_inspector_plugin_color_categories.png b/admin/img/pro/variable_inspector_plugin_color_categories.png new file mode 100644 index 0000000..fcfb49b Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_color_categories.png differ diff --git a/admin/img/pro/variable_inspector_plugin_color_categorized_results.png b/admin/img/pro/variable_inspector_plugin_color_categorized_results.png new file mode 100644 index 0000000..f3f5589 Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_color_categorized_results.png differ diff --git a/admin/img/pro/variable_inspector_plugin_color_filter.png b/admin/img/pro/variable_inspector_plugin_color_filter.png new file mode 100644 index 0000000..c8a209b Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_color_filter.png differ diff --git a/admin/img/pro/variable_inspector_plugin_counter_notes.png b/admin/img/pro/variable_inspector_plugin_counter_notes.png new file mode 100644 index 0000000..1b5d0ab Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_counter_notes.png differ diff --git a/admin/img/pro/variable_inspector_plugin_dump_print_r.png b/admin/img/pro/variable_inspector_plugin_dump_print_r.png new file mode 100644 index 0000000..795f31c Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_dump_print_r.png differ diff --git a/admin/img/pro/variable_inspector_plugin_dump_print_tree.png b/admin/img/pro/variable_inspector_plugin_dump_print_tree.png new file mode 100644 index 0000000..bb8efd7 Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_dump_print_tree.png differ diff --git a/admin/img/pro/variable_inspector_plugin_kint_viewer.png b/admin/img/pro/variable_inspector_plugin_kint_viewer.png new file mode 100644 index 0000000..5b5063d Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_kint_viewer.png differ diff --git a/admin/img/pro/variable_inspector_plugin_results_deletion.png b/admin/img/pro/variable_inspector_plugin_results_deletion.png new file mode 100644 index 0000000..4a27aaf Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_results_deletion.png differ diff --git a/admin/img/pro/variable_inspector_plugin_search_filter_by_name.png b/admin/img/pro/variable_inspector_plugin_search_filter_by_name.png new file mode 100644 index 0000000..278147d Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_search_filter_by_name.png differ diff --git a/admin/img/pro/variable_inspector_plugin_search_filter_by_type.png b/admin/img/pro/variable_inspector_plugin_search_filter_by_type.png new file mode 100644 index 0000000..19db6fa Binary files /dev/null and b/admin/img/pro/variable_inspector_plugin_search_filter_by_type.png differ diff --git a/admin/js/variable-inspector-admin.js b/admin/js/variable-inspector-admin.js index 6cfa5ee..5730acf 100644 --- a/admin/js/variable-inspector-admin.js +++ b/admin/js/variable-inspector-admin.js @@ -81,44 +81,7 @@ } - function maybeHideColorFilter() { - var greenVarsCount = $('.inspection-result[data-color=green]').length; - var orangeVarsCount = $('.inspection-result[data-color=orange]').length; - var redVarsCount = $('.inspection-result[data-color=red]').length; - var purpleVarsCount = $('.inspection-result[data-color=purple]').length; - var blueVarsCount = $('.inspection-result[data-color=blue]').length; - - if ( greenVarsCount > 0 ) { - $('#green-filter').show(); - } else { - $('#green-filter').hide(); - } - if ( orangeVarsCount > 0 ) { - $('#orange-filter').show(); - } else { - $('#orange-filter').hide(); - } - if ( redVarsCount > 0 ) { - $('#red-filter').show(); - } else { - $('#red-filter').hide(); - } - if ( purpleVarsCount > 0 ) { - $('#purple-filter').show(); - } else { - $('#purple-filter').hide(); - } - if ( blueVarsCount > 0 ) { - $('#blue-filter').show(); - } else { - $('#blue-filter').hide(); - } - if ( greenVarsCount > 0 || orangeVarsCount > 0 || redVarsCount > 0 || purpleVarsCount > 0 || blueVarsCount > 0 ) { - $('#gray-filter').show(); - } else { - $('#gray-filter').hide(); - } - } + $(document).ready( function() { @@ -233,6 +196,19 @@ }); + updateResultsCount(); + }, 2500); + + } + + }, + error:function(errorThrown) { + console.log(errorThrown); + } + }); + + }); + /*! */ // Refresh results @@ -248,8 +224,8 @@ viewer = $('#results_viewer').find("option:selected").attr('value'); setTimeout(function() { - maybeHideColorFilter(); updateResultsCount(); + setViewer( viewer ); $('#results-spinner').hide(); }, 3000); @@ -281,7 +257,7 @@ $('#results-spinner').hide(); $('.color-filters').removeClass('color-chosen'); $('.color-filter').removeClass('color-active'); - maybeHideColorFilter(); + updateResultsCount(); } @@ -333,9 +309,19 @@ close: 'slide:top' } }); - - // Invoke tracking of link clicks to track how man times the "Sponsor" button is clicked + $('#generate-sample-results, #generate-sample-results-premium, #clear-results').click( function() { + $.ajax({ + url: 'https://bowo.io/vi-rf-btn', + method: 'GET', + dataType: 'jsonp', + crossDomain: true + // success: function(response) { + // console.log(response); + // } + }); + }); + $('#plugin-sponsor').click( function() { $.ajax({ url: 'https://bowo.io/vi-sp-btn', @@ -348,8 +334,6 @@ }); }); - // Invoke tracking of link clicks to track how man times the "Upgrade" button is clicked - $('#plugin-upgrade').click( function() { $.ajax({ url: 'https://bowo.io/vi-up-btn-trk', @@ -381,8 +365,9 @@ function AjaxAutoLoad(selector){(function($){ $.ajax({ type: "GET", url: window.location.href - }).done(function(res){ - $(selector).html( $(res).find(selector).html() ); + }).done(function(result){ + var newResults = $(result).find(selector).html(); + $(selector).html( newResults ); $(".accordion__control").click(function() { $("#auto_load").prop( "checked", false ); diff --git a/variable-inspector.php b/variable-inspector.php index b72e843..28c937b 100644 --- a/variable-inspector.php +++ b/variable-inspector.php @@ -16,7 +16,7 @@ * Plugin Name: Variable Inspector * Plugin URI: https://wordpress.org/plugins/variable-inspector/ * Description: Easily dump and centrally inspect your PHP variables for convenient debugging. - * Version: 2.4.0 + * Version: 2.4.3 * Author: Bowo * Author URI: https://bowo.io * License: GPL-2.0+ @@ -35,7 +35,7 @@ * Start at version 1.0.0 and use SemVer - https://semver.org * Rename this for your plugin and update it as you release new versions. */ -define( 'VARIABLE_INSPECTOR_VERSION', '2.4.0' ); +define( 'VARIABLE_INSPECTOR_VERSION', '2.4.3' ); /** * The code that runs during plugin activation.