PluginProbe ʕ •ᴥ•ʔ
Post Views Counter / 1.3.8
Post Views Counter v1.3.8
1.7.13 1.7.12 1.7.11 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.2 1.3.2.1 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9
post-views-counter / js / admin-post.js
post-views-counter / js Last commit date
admin-dashboard.js 4 years ago admin-post.js 4 years ago admin-quick-edit.js 4 years ago admin-settings.js 4 years ago admin-widgets.js 4 years ago block-editor.min.js 4 years ago frontend.js 4 years ago gutenberg.min.js 6 years ago
admin-post.js
47 lines
1 ( function( $ ) {
2
3 // ready event
4 $( function() {
5 // post views input
6 $( '#post-views .edit-post-views' ).on( 'click', function() {
7 if ( $( '#post-views-input-container' ).is( ":hidden" ) ) {
8 $( '#post-views-input-container' ).slideDown( 'fast' );
9 $( this ).hide();
10 }
11
12 return false;
13 } );
14
15 // save post views
16 $( '#post-views .save-post-views' ).on( 'click', function() {
17 var views = ( $( '#post-views-display b' ).text() ).trim();
18
19 $( '#post-views-input-container' ).slideUp( 'fast' );
20 $( '#post-views .edit-post-views' ).show();
21
22 views = parseInt( $( '#post-views-input' ).val() );
23 // reassign value as integer
24 $( '#post-views-input' ).val( views );
25
26 $( '#post-views-display b' ).text( views );
27
28 return false;
29 } );
30
31 // cancel post views
32 $( '#post-views .cancel-post-views' ).on( 'click', function() {
33 var views = ( $( '#post-views-display b' ).text() ).trim();
34
35 $( '#post-views-input-container' ).slideUp( 'fast' );
36 $( '#post-views .edit-post-views' ).show();
37
38 views = parseInt( $( '#post-views-current' ).val() );
39
40 $( '#post-views-display b' ).text( views );
41 $( '#post-views-input' ).val( views );
42
43 return false;
44 } );
45 } );
46
47 } )( jQuery );