File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ This is an alpha version! The changes listed here are not final.
2525- Fix a PHP warning when the newest cached pages list is unavailable.
2626- Fix TS errors detected by tsgo.
2727- Fix ` str_starts_with() ` PHP 8.1+ deprecation when ` $wp_cache_home_path ` is null in ` get_current_url_supercache_dir() ` .
28+ - Remove ` .eslintignore ` and fix JS linting errors in ` delete-cache-button.js ` .
2829
2930## [ 3.0.3] - 2025-11-11
3031### Added
Original file line number Diff line number Diff line change 1+ /* global wpsc_ajax */
12( function ( $ ) {
23 $ ( document ) . ready ( function ( ) {
34 $ ( '#wp-admin-bar-delete-cache' ) . on ( 'click' , function ( ) {
1617 // send the nonce along with the request
1718 nonce : wpsc_ajax . nonce ,
1819 } ,
19- success : function ( msg ) {
20- wpsc_ajax . admin == 1 && console . log ( 'Deleted entire cache' ) ;
21- wpsc_ajax . admin == 0 && console . log ( 'Deleted cache for this page and reloading' ) ;
20+ success : function ( ) {
21+ if ( wpsc_ajax . admin === '1' ) {
22+ // eslint-disable-next-line no-console
23+ console . log ( 'Deleted entire cache' ) ;
24+ } else {
25+ // eslint-disable-next-line no-console
26+ console . log ( 'Deleted cache for this page and reloading' ) ;
27+ }
2228 window . location . reload ( ) ;
2329 } ,
24- complete : function ( msg ) {
30+ complete : function ( ) {
2531 $ ( '#wp-admin-bar-delete-cache' ) . fadeIn ( 'slow' ) ;
2632 } ,
2733 } ) ;
You can’t perform that action at this time.
0 commit comments