diff --git a/Puc/v5p0/DebugBar/Extension.php b/Puc/v5p0/DebugBar/Extension.php index 37974e5..90a9a9e 100644 --- a/Puc/v5p0/DebugBar/Extension.php +++ b/Puc/v5p0/DebugBar/Extension.php @@ -26,7 +26,7 @@ if ( !class_exists(Extension::class, false) ): add_filter('debug_bar_panels', array($this, 'addDebugBarPanel')); add_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies')); - add_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow')); + add_action('wp_ajax_puc_v5_debug_check_now', array($this, 'ajaxCheckNow')); } /** @@ -47,17 +47,17 @@ if ( !class_exists(Extension::class, false) ): */ public function enqueuePanelDependencies() { wp_enqueue_style( - 'puc-debug-bar-style-v4', + 'puc-debug-bar-style-v5', $this->getLibraryUrl("/css/puc-debug-bar.css"), array('debug-bar'), - '20171124' + '20221008' ); wp_enqueue_script( - 'puc-debug-bar-js-v4', + 'puc-debug-bar-js-v5', $this->getLibraryUrl("/js/debug-bar.js"), array('jquery'), - '20201209' + '20221008' ); } @@ -157,7 +157,7 @@ if ( !class_exists(Extension::class, false) ): public function removeHooks() { remove_filter('debug_bar_panels', array($this, 'addDebugBarPanel')); remove_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies')); - remove_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow')); + remove_action('wp_ajax_puc_v5_debug_check_now', array($this, 'ajaxCheckNow')); } /** diff --git a/Puc/v5p0/DebugBar/Panel.php b/Puc/v5p0/DebugBar/Panel.php index c2deeea..99bb725 100644 --- a/Puc/v5p0/DebugBar/Panel.php +++ b/Puc/v5p0/DebugBar/Panel.php @@ -23,7 +23,7 @@ if ( !class_exists(Panel::class, false) && class_exists('Debug_Bar_Panel', false public function render() { printf( - '
', + '
', esc_attr($this->updateChecker->getUniqueName('debug-bar-panel')), esc_attr($this->updateChecker->slug), esc_attr($this->updateChecker->getUniqueName('uid')), diff --git a/Puc/v5p0/DebugBar/PluginExtension.php b/Puc/v5p0/DebugBar/PluginExtension.php index 4d27ab4..975a02f 100644 --- a/Puc/v5p0/DebugBar/PluginExtension.php +++ b/Puc/v5p0/DebugBar/PluginExtension.php @@ -13,7 +13,7 @@ if ( !class_exists(PluginExtension::class, false) ): public function __construct($updateChecker) { parent::__construct($updateChecker, PluginPanel::class); - add_action('wp_ajax_puc_v4_debug_request_info', array($this, 'ajaxRequestInfo')); + add_action('wp_ajax_puc_v5_debug_request_info', array($this, 'ajaxRequestInfo')); } /** diff --git a/css/puc-debug-bar.css b/css/puc-debug-bar.css index 2cb3f8e..649db4f 100644 --- a/css/puc-debug-bar.css +++ b/css/puc-debug-bar.css @@ -1,4 +1,4 @@ -.puc-debug-bar-panel-v4 pre { +.puc-debug-bar-panel-v5 pre { margin-top: 0; } diff --git a/js/debug-bar.js b/js/debug-bar.js index 2452c02..9cb65a0 100644 --- a/js/debug-bar.js +++ b/js/debug-bar.js @@ -2,7 +2,7 @@ jQuery(function($) { function runAjaxAction(button, action) { button = $(button); - var panel = button.closest('.puc-debug-bar-panel-v4'); + var panel = button.closest('.puc-debug-bar-panel-v5'); var responseBox = button.closest('td').find('.puc-ajax-response'); responseBox.text('Processing...').show(); @@ -20,13 +20,13 @@ jQuery(function($) { ); } - $('.puc-debug-bar-panel-v4 input[name="puc-check-now-button"]').on('click', function() { - runAjaxAction(this, 'puc_v4_debug_check_now'); + $('.puc-debug-bar-panel-v5 input[name="puc-check-now-button"]').on('click', function() { + runAjaxAction(this, 'puc_v5_debug_check_now'); return false; }); - $('.puc-debug-bar-panel-v4 input[name="puc-request-info-button"]').on('click', function() { - runAjaxAction(this, 'puc_v4_debug_request_info'); + $('.puc-debug-bar-panel-v5 input[name="puc-request-info-button"]').on('click', function() { + runAjaxAction(this, 'puc_v5_debug_request_info'); return false; }); @@ -34,7 +34,7 @@ jQuery(function($) { // Debug Bar uses the panel class name as part of its link and container IDs. This means we can // end up with multiple identical IDs if more than one plugin uses the update checker library. // Fix it by replacing the class name with the plugin slug. - var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel-v4'); + var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel-v5'); panels.each(function() { var panel = $(this); var uid = panel.data('uid');