File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ jQuery( function($) {
5656 $ ( 'p.search-box' ) . hide ( ) ;
5757 }
5858
59- var itemCount = $ ( '#the-list tr' ) . length ;
59+ var currentCount = parseInt ( $ ( '.tablenav-pages .displaying-num' ) . first ( ) . text ( ) . match ( / \d + / ) ) || 0 ;
60+ var itemCount = currentCount - 1 || 0 ;
6061 var itemText = itemCount === 1 ? wp . i18n . __ ( 'item' ) : wp . i18n . __ ( 'items' ) ;
6162 $ ( '.tablenav-pages .displaying-num' ) . text ( itemCount + ' ' + itemText ) ;
6263 } ) ;
@@ -177,7 +178,8 @@ jQuery( function($) {
177178
178179 $ ( 'input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):visible, textarea:visible' , form ) . val ( '' ) ;
179180
180- var itemCount = $ ( '#the-list tr' ) . length ;
181+ var currentCount = parseInt ( $ ( '.tablenav-pages .displaying-num' ) . first ( ) . text ( ) . match ( / \d + / ) ) || 0 ;
182+ var itemCount = currentCount + 1 || 0 ;
181183 var itemText = itemCount === 1 ? wp . i18n . __ ( 'item' ) : wp . i18n . __ ( 'items' ) ;
182184 $ ( '.tablenav-pages .displaying-num' ) . text ( itemCount + ' ' + itemText ) ;
183185
You can’t perform that action at this time.
0 commit comments