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/content-.../inc/freemius/template...
File: clone-resolution-js.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Freemius
[2] Fix | Delete
* @copyright Copyright (c) 2015, Freemius, Inc.
[3] Fix | Delete
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
[4] Fix | Delete
* @since 2.5.0
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[8] Fix | Delete
exit;
[9] Fix | Delete
}
[10] Fix | Delete
?>
[11] Fix | Delete
<script type="text/javascript">
[12] Fix | Delete
( function( $ ) {
[13] Fix | Delete
var $errorMessage = null;
[14] Fix | Delete
[15] Fix | Delete
$( document ).ready( function() {
[16] Fix | Delete
var $cloneResolutionNotice = $( 'div[data-id="clone_resolution_options_notice"], div[data-id="temporary_duplicate_notice"]' );
[17] Fix | Delete
[18] Fix | Delete
if ( 0 === $cloneResolutionNotice.length ) {
[19] Fix | Delete
return;
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
$errorMessage = $cloneResolutionNotice.find( '#fs_clone_resolution_error_message' );
[23] Fix | Delete
[24] Fix | Delete
/**
[25] Fix | Delete
* Triggers an AJAX request when the license activation link or any of the buttons on the clone resolution options notice is clicked. The AJAX request will then handle the action the user has chosen.
[26] Fix | Delete
*/
[27] Fix | Delete
$cloneResolutionNotice.on( 'click', '.button, #fs_temporary_duplicate_license_activation_link', function( evt ) {
[28] Fix | Delete
evt.preventDefault();
[29] Fix | Delete
[30] Fix | Delete
var $this = $( this );
[31] Fix | Delete
[32] Fix | Delete
if ( $this.hasClass( 'disabled' ) ) {
[33] Fix | Delete
return;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
var $body = $( 'body' ),
[37] Fix | Delete
$optionsContainer = $this.parents( '.fs-clone-resolution-options-container' ),
[38] Fix | Delete
cursor = $body.css( 'cursor' ),
[39] Fix | Delete
beforeUnload = function() {
[40] Fix | Delete
return '<?php fs_esc_js_echo_inline( 'Please wait', 'please-wait' ) ?>';
[41] Fix | Delete
};
[42] Fix | Delete
[43] Fix | Delete
$.ajax( {
[44] Fix | Delete
// Get the parent options container from the child as `$cloneResolutionNotice` can have different AJAX URLs if both the manual clone resolution options and temporary duplicate notices are shown (for different subsites in a multisite network).
[45] Fix | Delete
url : $optionsContainer.data( 'ajax-url' ),
[46] Fix | Delete
method : 'POST',
[47] Fix | Delete
data : {
[48] Fix | Delete
action : '<?php echo $VARS['ajax_action'] ?>',
[49] Fix | Delete
security : '<?php echo wp_create_nonce( $VARS['ajax_action'] ) ?>',
[50] Fix | Delete
clone_action: $this.data( 'clone-action' ),
[51] Fix | Delete
blog_id : $optionsContainer.data( 'blog-id' )
[52] Fix | Delete
},
[53] Fix | Delete
beforeSend: function() {
[54] Fix | Delete
$body.css( { cursor: 'wait' } );
[55] Fix | Delete
[56] Fix | Delete
$this.addClass( 'disabled' );
[57] Fix | Delete
[58] Fix | Delete
if ( $this.attr( 'id' ) === 'fs_temporary_duplicate_license_activation_link' ) {
[59] Fix | Delete
$this.append( '<i class="fs-ajax-spinner"></i>' );
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
$( window ).on( 'beforeunload', beforeUnload );
[63] Fix | Delete
},
[64] Fix | Delete
success : function( resultObj ) {
[65] Fix | Delete
$( window ).off( 'beforeunload', beforeUnload );
[66] Fix | Delete
[67] Fix | Delete
if (
[68] Fix | Delete
resultObj.data &&
[69] Fix | Delete
resultObj.data.redirect_url &&
[70] Fix | Delete
'' !== resultObj.data.redirect_url
[71] Fix | Delete
) {
[72] Fix | Delete
window.location = resultObj.data.redirect_url;
[73] Fix | Delete
} else {
[74] Fix | Delete
window.location.reload();
[75] Fix | Delete
}
[76] Fix | Delete
},
[77] Fix | Delete
complete : function() {
[78] Fix | Delete
$body.css( { cursor: cursor } );
[79] Fix | Delete
$this.removeClass( 'disabled' );
[80] Fix | Delete
[81] Fix | Delete
$this.parent().find( '.fs-ajax-spinner' ).remove();
[82] Fix | Delete
}
[83] Fix | Delete
} );
[84] Fix | Delete
} );
[85] Fix | Delete
} );
[86] Fix | Delete
} )( jQuery );
[87] Fix | Delete
</script>
[88] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function