PluginProbe ʕ •ᴥ•ʔ
Post Views Counter / 1.3.1
Post Views Counter v1.3.1
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 6 years ago admin-post.js 6 years ago admin-quick-edit.js 6 years ago admin-settings.js 6 years ago admin-widgets.js 6 years ago chart.min.js 6 years ago frontend.js 6 years ago gutenberg.min.js 6 years ago
admin-post.js
46 lines
1 ( function( $ ) {
2
3 $( document ).ready( function() {
4 // post views input
5 $( '#post-views .edit-post-views' ).click( function() {
6 if ( $( '#post-views-input-container' ).is( ":hidden" ) ) {
7 $( '#post-views-input-container' ).slideDown( 'fast' );
8 $( this ).hide();
9 }
10
11 return false;
12 } );
13
14 // save post views
15 $( '#post-views .save-post-views' ).click( function() {
16 var views = $.trim( $( '#post-views-display b' ).text() );
17
18 $( '#post-views-input-container' ).slideUp( 'fast' );
19 $( '#post-views .edit-post-views' ).show();
20
21 views = parseInt( $( '#post-views-input' ).val() );
22 // reassign value as integer
23 $( '#post-views-input' ).val( views );
24
25 $( '#post-views-display b' ).text( views );
26
27 return false;
28 } );
29
30 // cancel post views
31 $( '#post-views .cancel-post-views' ).click( function() {
32 var views = $.trim( $( '#post-views-display b' ).text() );
33
34 $( '#post-views-input-container' ).slideUp( 'fast' );
35 $( '#post-views .edit-post-views' ).show();
36
37 views = parseInt( $( '#post-views-current' ).val() );
38
39 $( '#post-views-display b' ).text( views );
40 $( '#post-views-input' ).val( views );
41
42 return false;
43 } );
44 } );
45
46 } )( jQuery );