Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dungps committed Mar 9, 2016
1 parent b49d62a commit c8681ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jQuery(document).ready(function($){
nonce: main.data('nonce'),
type: type[2],
post: main.data('post'),
vote_type: vote_type,
voted: voted
},
success: function(data) {
Expand Down
2 changes: 1 addition & 1 deletion dw-reactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function ajax() {

$post_id = intval( $_POST['post'] );
$type = sanitize_title( $_POST['type'] );
$vote_type = sanitize_title( $_POST['vote_type'] );
$vote_type = isset( $_POST['vote_type'] ) ? sanitize_title( $_POST['vote_type'] ) : 'vote';
$voted = isset( $_POST['voted'] ) ? sanitize_title( $_POST['voted'] ) : 'no';

if ( empty( $post_id ) ) {
Expand Down

0 comments on commit c8681ff

Please sign in to comment.