Skip to content

Commit

Permalink
Merge branch 'release/v2.1.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qriouslad committed Apr 13, 2023
2 parents 294bd37 + 9ac57ad commit dcb3e14
Show file tree
Hide file tree
Showing 42 changed files with 45,263 additions and 45,252 deletions.
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Variable Inspector

Contributors: qriouslad
Donate link: https://paypal.me/qriouslad
Donate link: https://bowo.io/go/sponsor-vi/
Tags: php variables, variable dump, debug, developer
Requires at least: 4.8
Tested up to: 6.2
Stable tag: 2.0.0
Stable tag: 2.1.0
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -36,24 +36,25 @@ This would help you locate and clean up the inspector lines once you're done deb

### Give Back

* [A nice review](https://wordpress.org/plugins/variable-inspector/#reviews) would be great!
* [Give feedback](https://wordpress.org/support/plugin/variable-inspector/) and help improve future versions.
* [Github repo](https://github.com/qriouslad/variable-inspector) to contribute code.
* [Donate](https://paypal.me/qriouslad) and support my work.
* [A nice review](https://bowo.io/go/add-review-vi/) would be great!
* [Give feedback](https://bowo.io/go/feedback-vi/) and help improve future versions.
* [Github repo](https://bowo.io/go/github-vi/) to contribute code.
* [Sponsor](https://bowo.io/go/sponsor-vi/) my work.

### Check These Out Too

* [System Dashboard](https://wordpress.org/plugins/system-dashboard/): Central dashboard to monitor various WordPress components, processes and data, including the server.
* [Debug Log Manager](https://wordpress.org/plugins/debug-log-manager/): Log PHP, database and JavaScript errors via WP_DEBUG with one click. Conveniently create, view, filter and clear the debug.log file.
* [Code Explorer](https://wordpress.org/plugins/code-explorer/): Fast directory explorer and file/code viewer with syntax highlighting.
* [Database Admin](https://github.com/qriouslad/database-admin): Securely manage your WordPress website's database with a clean and user-friendly interface based on a custom-themed Adminer app. Only available on Github.
* [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.
* [Flexible Scroll Top](https://wordpress.org/plugins/flexible-scroll-top/) and [Floating Share Buttons](https://wordpress.org/plugins/floating-share-button/) is a lightweight combo with minimalist UI.
* [Admin and Site Enhancements](https://bowo.io/go/asenha-via-vi/) helps you to easily enhance various admin workflows and site aspects while replacing multiple plugins doing it.
* [System Dashboard](https://bowo.io/go/sd-via-vi/): Central dashboard to monitor various WordPress components, processes and data, including the server.
* [Debug Log Manager](https://bowo.io/go/dlm-via-vi/): Log PHP, database and JavaScript errors via WP_DEBUG with one click. Conveniently create, view, filter and clear the debug.log file.
* [Code Explorer](https://bowo.io/go/ce-via-vi/): Fast directory explorer and file/code viewer with syntax highlighting.
* [Database Admin](https://bowo.io/go/da-via-vi/): Securely manage your WordPress website's database with a clean and user-friendly interface based on a custom-themed Adminer app. Only available on Github.
* [Flexible Scroll Top](https://bowo.io/go/fst-via-vi/) and [Floating Share Buttons](https://bowo.io/go/fsb-via-vi/) is a lightweight combo with minimalist UI.
* [WordPress Newsboard](https://bowo.io/go/wpn-vi/): The latest news, articles, podcasts and videos from 100+ WordPress-focused sources.

## Screenshots

1. The main Variable Inspector page
![The main Variable Inspector page](.wordpress-org/screenshot-1.png)
1. The variable inspection dashboard
![The variable inspection dashboard](.wordpress-org/screenshot-1.png)

## Frequently Asked Questions

Expand All @@ -63,6 +64,11 @@ Variable Inspector was built with: [WordPress Plugin Boilerplate](https://github

## Changelog

### 2.1.0 (2023.04.11)

* Limit height of each result's content and add scroll bar when content is taller than the limit. This should prevent very long result content from occupying the screen.
* Change background color of each result's content to white for better readability.

### 2.0.0 (2023.04.10)

* Add button to easily generate sample results. Useful for first-time installation.
Expand Down
20 changes: 11 additions & 9 deletions admin/class-variable-inspector-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ public function vi_inspection_results()
<select name="results_viewer" id="results_viewer" class="results-viewer" data-viewer="">
<option value="var_export">var_export</option>
<option value="var_dump">var_dump</option>
<option value="print_r">print_r</option>
</select>
<option value="print_r">print_r</option>';
$output .= '</select>
<a class="button toggle-results">Expand all</a>
</div>
<div class="results-options">
Expand Down Expand Up @@ -381,18 +381,20 @@ public function vi_inspection_results()
$output .= '
<div id="' . esc_html( $identifier ) . '" class="accordion__panel">
<div class="functions">
<a class="item" data-tab="third">var_export</a>' . $separator . '<a class="item" data-tab="second">var_dump</a>' . $separator . '<a class="item" data-tab="first">print_r</a>
</div>
<div class="ui tab" data-tab="third">
<a class="item" data-tab="first">var_export</a>' . $separator . '
<a class="item" data-tab="second">var_dump</a>' . $separator . '
<a class="item" data-tab="third">print_r</a>';
$output .= '</div>
<div class="ui tab varexport" data-tab="first">
<pre>' . $variable_content_varexport . '</pre>
</div>
<div class="ui tab" data-tab="second">
<div class="ui tab vardump" data-tab="second">
<pre>' . $variable_content_vardump . '</pre>
</div>
<div class="ui tab" data-tab="first">
<div class="ui tab printr" data-tab="third">
<pre>' . print_r( $variable_content, true ) . '</pre>
</div>
<script>
</div>';
$output .= '<script>
jQuery("#' . esc_html( $identifier ) . ' .functions .item")
.tab({
context: jQuery("#' . esc_html( $variable_name_plain . '-' . $inspection_time_numeric ) . '")
Expand Down
24 changes: 8 additions & 16 deletions admin/css/variable-inspector-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@
width: 90%;
}

.vi .ui.tab.active,
.vi .ui.tab.open {
max-height: 50vh;
overflow-y: scroll;
border: 1px solid #e7e7e7;
}

.vi .variable-type {
border: 1px solid #ddd;
border-radius: 8px;
Expand All @@ -286,8 +293,7 @@

.vi .inspection-accordion pre {
margin: 0;
background: #fafafa;
border: 1px solid #e7e7e7;
background: #ffffff;
padding: 12px 16px;
}

Expand Down Expand Up @@ -409,20 +415,6 @@
box-shadow: none;
}

.premium-badge {
text-transform: uppercase;
position: relative;
top: -2px;
margin-right: 6px;
padding: 4px 4px 4px 8px;
font-size: 0.5em;
font-weight: 600;
letter-spacing: 0.5px;
background: #888;
color: #fff;
border-radius: 5px;
}



@media (max-width: 768px) {
Expand Down
21 changes: 13 additions & 8 deletions admin/js/variable-inspector-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* practising this, we should strive to set a better example in our own work.
*/



// Simple Accordion -- https://codepen.io/gecugamo/pen/xGLyXe

$.fn.simpleAccordion = function() {
Expand All @@ -51,18 +49,24 @@
function setViewer( viewer ) {

if ( viewer == 'var_export' ) {
$('.item[data-tab="third"]').each( function() {
$('.item[data-tab="first"]').each( function() {
$( this ).click();
});
} else if ( viewer == 'var_dump' ) {
}

if ( viewer == 'var_dump' ) {
$('.item[data-tab="second"]').each( function() {
$( this ).click();
});
} else if ( viewer == 'print_r' ) {
$('.item[data-tab="first"]').each( function() {
}

if ( viewer == 'print_r' ) {
$('.item[data-tab="third"]').each( function() {
$( this ).click();
});
}
}



}

Expand Down Expand Up @@ -243,7 +247,8 @@
// Fomantic UI accordion init

$(".ui.accordion").accordion();



});

})( jQuery );
Expand Down
Loading

0 comments on commit dcb3e14

Please sign in to comment.