Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-revie.../public/js
File: main.js
/*
[0] Fix | Delete
* Plugin Name: WP Review
[1] Fix | Delete
* Plugin URI: http://mythemeshop.com/plugins/wp-review/
[2] Fix | Delete
* Description: Create reviews! Choose from Stars, Percentages, Circles or Points for review scores. Supports Retina Display, WPMU & Unlimited Color Schemes.
[3] Fix | Delete
* Author: MyThemesShop
[4] Fix | Delete
* Author URI: http://mythemeshop.com/
[5] Fix | Delete
*/
[6] Fix | Delete
( function( $ ) {
[7] Fix | Delete
"use strict";
[8] Fix | Delete
[9] Fix | Delete
$( document ).ready( function() {
[10] Fix | Delete
$( '[data-wp-review-tabs] .tab-title:first-child' ).addClass( 'active' );
[11] Fix | Delete
$( '[data-wp-review-tabs] .tab-content:first-of-type' ).fadeIn();
[12] Fix | Delete
[13] Fix | Delete
$( '[data-wp-review-tabs] .tab-title button' ).on( 'click', function( ev ) {
[14] Fix | Delete
ev.preventDefault();
[15] Fix | Delete
var $btn, $tabs, href;
[16] Fix | Delete
$btn = $( this );
[17] Fix | Delete
$tabs = $btn.closest( '[data-wp-review-tabs]' );
[18] Fix | Delete
href = $btn.attr( 'data-href' );
[19] Fix | Delete
$tabs.find( '.tab-title' ).removeClass( 'active' );
[20] Fix | Delete
$btn.closest( '.tab-title' ).addClass( 'active' );
[21] Fix | Delete
$tabs.find( '.tab-content' ).hide();
[22] Fix | Delete
$tabs.find( href ).fadeIn();
[23] Fix | Delete
});
[24] Fix | Delete
[25] Fix | Delete
// Show login required message.
[26] Fix | Delete
$( document ).on( 'click', '.wpr-login-required', function( ev ) {
[27] Fix | Delete
ev.preventDefault();
[28] Fix | Delete
[29] Fix | Delete
var $this = $( this ),
[30] Fix | Delete
$message = $this.children( '.wpr-login-required-message' );
[31] Fix | Delete
[32] Fix | Delete
if ( ! $message.length ) {
[33] Fix | Delete
$message = $( '<div class="wpr-login-required-message">' + wpreview.loginRequiredMessage + '</div>' );
[34] Fix | Delete
$this.append( $message );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
$message.show();
[38] Fix | Delete
[39] Fix | Delete
return false;
[40] Fix | Delete
});
[41] Fix | Delete
});
[42] Fix | Delete
})( jQuery );
[43] Fix | Delete
[44] Fix | Delete
function wp_review_rate( $elem ) {// rating, postId, nonce ) {
[45] Fix | Delete
var rating = $elem.find('.wp-review-user-rating-val').val();
[46] Fix | Delete
var postId = $elem.find('.wp-review-user-rating-postid').val();
[47] Fix | Delete
var token = $elem.find('.wp-review-user-rating-nonce').val();
[48] Fix | Delete
var $target = $elem;
[49] Fix | Delete
[50] Fix | Delete
if ( ! $target.is('.wp-review-user-rating') )
[51] Fix | Delete
$target = $elem.closest('.wp-review-user-rating');
[52] Fix | Delete
[53] Fix | Delete
if ( rating == 0 ) {
[54] Fix | Delete
return '';
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
jQuery.ajax ({
[58] Fix | Delete
beforeSend: function() {
[59] Fix | Delete
$target.addClass('wp-review-loading');
[60] Fix | Delete
},
[61] Fix | Delete
data: { action: 'wp_review_rate', post_id: postId, nonce: token, review: rating },
[62] Fix | Delete
type: 'post',
[63] Fix | Delete
dataType: 'json',
[64] Fix | Delete
url: wpreview.ajaxurl,
[65] Fix | Delete
success: function( response ){
[66] Fix | Delete
$target.removeClass('wp-review-loading');
[67] Fix | Delete
if (typeof response.html !== 'undefined' && response.html != '') {
[68] Fix | Delete
$target.empty().append(response.html).addClass('has-rated').removeClass('wp-review-user-rating');
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
// update text total
[72] Fix | Delete
if (typeof response.rating_total !== 'undefined' && response.rating_total != '') {
[73] Fix | Delete
$target.parent().find('.wp-review-user-rating-total').text(response.rating_total);
[74] Fix | Delete
}
[75] Fix | Delete
// update rating count
[76] Fix | Delete
if (typeof response.rating_count !== 'undefined' && response.rating_count != '') {
[77] Fix | Delete
$target.parent().find('.wp-review-user-rating-counter').text(response.rating_count);
[78] Fix | Delete
}
[79] Fix | Delete
if ( response.awaiting_moderation != undefined ) {
[80] Fix | Delete
$target.parent().find('.user-total-wrapper .awaiting-response-wrapper').text(response.awaiting_moderation);
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
// Update cookie.
[84] Fix | Delete
Cookies.set( 'wpr_visitor_has_reviewed_post_' + postId, 1, {
[85] Fix | Delete
expires: 315360000000 // 10 years.
[86] Fix | Delete
});
[87] Fix | Delete
}
[88] Fix | Delete
});
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function