Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/ninja-fo.../deprecat.../includes/admin/upgrades
File: upgrades.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
/**
[1] Fix | Delete
* Upgrade Screen
[2] Fix | Delete
*
[3] Fix | Delete
* @package Ninja Forms
[4] Fix | Delete
* @subpackage Admin/Upgrades
[5] Fix | Delete
* @copyright Copyright (c) 2014, WP Ninjas
[6] Fix | Delete
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
[7] Fix | Delete
* @since 2.7
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
// Exit if accessed directly
[11] Fix | Delete
if ( !defined( 'ABSPATH' ) ) exit;
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Render Upgrades Screen
[15] Fix | Delete
*
[16] Fix | Delete
* @since 2.7
[17] Fix | Delete
* @return void
[18] Fix | Delete
*/
[19] Fix | Delete
function nf_upgrades_screen() {
[20] Fix | Delete
$action = isset( $_GET['nf-upgrade'] ) ? sanitize_text_field( $_GET['nf-upgrade'] ) : '';
[21] Fix | Delete
$step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 1;
[22] Fix | Delete
$total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
[23] Fix | Delete
$custom = isset( $_GET['custom'] ) ? $_GET['custom'] : 0;
[24] Fix | Delete
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
[25] Fix | Delete
[26] Fix | Delete
if ( is_string( $custom ) ) {
[27] Fix | Delete
$custom = urlencode( $custom );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
?>
[31] Fix | Delete
<div class="wrap">
[32] Fix | Delete
<h2><?php _e( 'Ninja Forms - Processing', 'ninja-forms' ); ?></h2>
[33] Fix | Delete
[34] Fix | Delete
<?php if( ! empty( $action ) ) : ?>
[35] Fix | Delete
[36] Fix | Delete
<div id="nf-upgrade-status">
[37] Fix | Delete
<p><?php _e( 'The process has started, please be patient. This could take several minutes. You will be automatically redirected when the process is finished.', 'ninja-forms' ); ?></p>
[38] Fix | Delete
<?php if( ! empty( $total ) ) : ?>
[39] Fix | Delete
<p><strong><?php printf( __( 'Step %d of approximately %d running', 'ninja-forms' ), $step, $total + 1 ); ?></strong>
[40] Fix | Delete
<span class="spinner" id="nf-upgrade-loader"/></span></p>
[41] Fix | Delete
<?php endif; ?>
[42] Fix | Delete
</div>
[43] Fix | Delete
<script type="text/javascript">
[44] Fix | Delete
document.location.href = "index.php?nf_action=<?php echo $action; ?>&step=<?php echo $step; ?>&total=<?php echo $total; ?>&custom=<?php echo $custom; ?>&form_id=<?php echo $form_id; ?>";
[45] Fix | Delete
</script>
[46] Fix | Delete
[47] Fix | Delete
<?php else : ?>
[48] Fix | Delete
[49] Fix | Delete
<div id="nf-upgrade-status">
[50] Fix | Delete
<p>
[51] Fix | Delete
<?php _e( 'The process has started, please be patient. This could take several minutes. You will be automatically redirected when the process is finished.', 'edd' ); ?>
[52] Fix | Delete
<span class="spinner" id="nf-upgrade-loader"/></span>
[53] Fix | Delete
</p>
[54] Fix | Delete
</div>
[55] Fix | Delete
<script type="text/javascript">
[56] Fix | Delete
jQuery( document ).ready( function() {
[57] Fix | Delete
// Trigger upgrades on page load
[58] Fix | Delete
var data = { action: 'edd_trigger_upgrades' };
[59] Fix | Delete
jQuery.post( ajaxurl, data, function (response) {
[60] Fix | Delete
if( response == 'complete' ) {
[61] Fix | Delete
jQuery('#nf-upgrade-loader').hide();
[62] Fix | Delete
//document.location.href = 'index.php?page=edd-about'; // Redirect to the welcome page
[63] Fix | Delete
}
[64] Fix | Delete
});
[65] Fix | Delete
});
[66] Fix | Delete
</script>
[67] Fix | Delete
[68] Fix | Delete
<?php endif; ?>
[69] Fix | Delete
[70] Fix | Delete
</div>
[71] Fix | Delete
<?php
[72] Fix | Delete
}
[73] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function