Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/uploads/flags/comment-likes.tar
Назад
comment-like-count.js 0000644 00000002060 14722070656 0010623 0 ustar 00 jQuery( document ).ready( function ( $ ) { var jsonAPIbase = 'https://public-api.wordpress.com/rest/v1', APIqueue = []; function getCommentLikeCounts() { $( '.comment-like-count' ).each( function () { var blogId = $( this ).attr( 'data-blog-id' ), commentId = $( this ).attr( 'data-comment-id' ); APIqueue.push( '/sites/' + blogId + '/comments/' + commentId + '/likes' ); } ); return $.ajax( { type: 'GET', url: jsonAPIbase + '/batch', dataType: 'jsonp', data: 'urls[]=' + APIqueue.map( encodeURIComponent ).join( '&urls[]=' ), success: function ( response ) { for ( var path in response ) { if ( ! response[ path ].error_data ) { var urlPieces = path.split( '/' ), commentId = urlPieces[ 4 ], likeCount = response[ path ].found; if ( likeCount < 1 ) { return; } $( '#comment-like-count-' + commentId ) .find( '.like-count' ) .hide() .text( likeCount ) .fadeIn(); } } }, error: function () {}, } ); } getCommentLikeCounts(); } ); admin-style.css 0000644 00000001641 14722070656 0007517 0 ustar 00 .fixed .column-comment_likes { width: 5.5em; padding: 8px 0; text-align: center; } .fixed .column-stats { width: 5em; } .fixed .column-comment_likes .comment-like-count { box-sizing: border-box; display: inline-block; padding: 0 8px; height: 2em; margin-top: 5px; -webkit-border-radius: 5px; border-radius: 5px; background-color: #787c82; color: #fff; font-size: 11px; line-height: 21px; } .fixed .column-comment_likes .comment-like-count:after { border: none; } .fixed .column-comment_likes .comment-like-count:hover { background-color: #2271b1; } .fixed .column-comment_likes .vers:before { font: normal 20px/1 dashicons; content: '\f155'; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @media screen and (max-width: 782px) { .fixed .column-comment_likes { display: none; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка