Skip to content

Commit

Permalink
Remove linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravobernal committed Jul 25, 2024
1 parent 75fcdab commit 7c64378
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
/**
* Dynamic functionality for voting on user submitted notes.
*
* @param $
* @param wp
*/

( function ( $, wp ) {
$( '.comment-list' ).on( 'click', 'a.user-note-voting-up, a.user-note-voting-down', function ( event ) {
( function( $, wp ) {
$( '.comment-list' ).on( 'click', 'a.user-note-voting-up, a.user-note-voting-down', function( event ) {
event.preventDefault();

const $item = $( this ),
var $item = $( this ),
comment = $item.closest( '.comment' );

$.post(
wporg_note_voting.ajaxurl,
{
action: 'note_vote',
comment: $item.attr( 'data-id' ),
vote: $item.attr( 'data-vote' ),
_wpnonce: $item.parent().attr( 'data-nonce' ),
action: 'note_vote',
comment: $item.attr( 'data-id' ),
vote: $item.attr( 'data-vote' ),
_wpnonce: $item.parent().attr( 'data-nonce' )
},
function ( data ) {
function( data ) {
if ( '0' !== data ) {
$item.closest( '.user-note-voting' ).replaceWith( data );
wp.a11y.speak( $( '.user-note-voting-count', comment ).text() );
Expand Down

0 comments on commit 7c64378

Please sign in to comment.