Edit File by line
/home/barbar84/www/wp-conte.../plugins/ninja-fo.../lib/StepProc...
File: menu.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Register our step processing admin page.
[3] Fix | Delete
*
[4] Fix | Delete
* @since 2.7.6
[5] Fix | Delete
* @return void
[6] Fix | Delete
*/
[7] Fix | Delete
function nf_register_step_processing_page() {
[8] Fix | Delete
// Register our admin page
[9] Fix | Delete
$admin_page = add_submenu_page( NULL, esc_html__( 'Ninja Forms Processing', 'ninja-forms' ), esc_html__( 'Processing', 'ninja-forms' ), apply_filters( 'ninja_forms_admin_menu_capabilities', 'manage_options' ), 'nf-processing', 'nf_output_step_processing_page' );
[10] Fix | Delete
[11] Fix | Delete
add_action( 'admin_print_styles-' . $admin_page, 'nf_step_processing_css' );
[12] Fix | Delete
add_action( 'admin_print_styles-' . $admin_page, 'nf_step_processing_js' );
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
add_action( 'admin_menu', 'nf_register_step_processing_page' );
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* Enqueue our step processing CSS.
[19] Fix | Delete
*
[20] Fix | Delete
* @since 2.7.6
[21] Fix | Delete
* @return void
[22] Fix | Delete
*/
[23] Fix | Delete
function nf_step_processing_css() {
[24] Fix | Delete
wp_enqueue_style( 'jquery-smoothness', Ninja_Forms::$url .'deprecated/css/smoothness/jquery-smoothness.css');
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Enqueue our step processing JS.
[29] Fix | Delete
*
[30] Fix | Delete
* @since 2.7.6
[31] Fix | Delete
* @return void
[32] Fix | Delete
*/
[33] Fix | Delete
function nf_step_processing_js() {
[34] Fix | Delete
wp_enqueue_script( 'nf-processing',
[35] Fix | Delete
Ninja_Forms::$url . 'deprecated/assets/js/dev/step-processing.js',
[36] Fix | Delete
array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-progressbar' ) );
[37] Fix | Delete
[38] Fix | Delete
$step_labels = apply_filters( 'nf_step_processing_labels', array(
[39] Fix | Delete
'Lacing Our Tabis',
[40] Fix | Delete
'Cleaning The Dojo',
[41] Fix | Delete
'Doing Splits',
[42] Fix | Delete
'Buffing Bo Staff',
[43] Fix | Delete
'Intimidating Gaze',
[44] Fix | Delete
'Sparring',
[45] Fix | Delete
'Packing Smoke Bombs',
[46] Fix | Delete
'Polishing Shuriken',
[47] Fix | Delete
'Throwing Sais',
[48] Fix | Delete
'Calling Our Mom',
[49] Fix | Delete
'Practicing Katas',
[50] Fix | Delete
'Swinging Nunchucks',
[51] Fix | Delete
'Sharpening Swords',
[52] Fix | Delete
'Ironing Ninja Gi',
[53] Fix | Delete
'Eating Breakfast',
[54] Fix | Delete
'Cutting Stuff',
[55] Fix | Delete
'Doing Dishes',
[56] Fix | Delete
'Climbing Walls'
[57] Fix | Delete
) );
[58] Fix | Delete
[59] Fix | Delete
[60] Fix | Delete
wp_localize_script( 'nf-processing', 'nf_processing', array( 'step_labels' => $step_labels ) );
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Output our step processing admin page.
[65] Fix | Delete
*
[66] Fix | Delete
* @since 2.7.6
[67] Fix | Delete
* @return void
[68] Fix | Delete
*/
[69] Fix | Delete
function nf_output_step_processing_page() {
[70] Fix | Delete
$page_title = isset ( $_REQUEST['title'] ) ? urldecode( esc_html ( $_REQUEST['title'] ) ) : esc_html__( 'Ninja Forms - Processing', 'ninja-forms' );
[71] Fix | Delete
?>
[72] Fix | Delete
<style>
[73] Fix | Delete
.ui-progressbar {
[74] Fix | Delete
position: relative;
[75] Fix | Delete
width: 800px;
[76] Fix | Delete
max-width: 100%;
[77] Fix | Delete
height: 20px;
[78] Fix | Delete
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
.progress-label {
[82] Fix | Delete
line-height: 12px;
[83] Fix | Delete
position: absolute;
[84] Fix | Delete
left: 40%;
[85] Fix | Delete
top: 4px;
[86] Fix | Delete
font-weight: bold;
[87] Fix | Delete
text-shadow: 1px 1px 0 #fff;
[88] Fix | Delete
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
.ui-progressbar-value {
[92] Fix | Delete
/*background-size: 100% auto;*/
[93] Fix | Delete
background-color: #FFF;
[94] Fix | Delete
background-repeat: repeat;
[95] Fix | Delete
background-image: url(<?php echo NF_PLUGIN_URL . 'assets/img/pbar-ani.gif'; ?>);
[96] Fix | Delete
}
[97] Fix | Delete
[98] Fix | Delete
</style>
[99] Fix | Delete
<script type="text/javascript">
[100] Fix | Delete
[101] Fix | Delete
<?php
[102] Fix | Delete
if ( isset ( $_REQUEST['action'] ) && ! empty ( $_REQUEST['action'] ) ) {
[103] Fix | Delete
$action = esc_html__( 'Loading...', 'ninja-forms' );
[104] Fix | Delete
?>
[105] Fix | Delete
var nfProcessingAction = 'nf_<?php echo esc_html( $_REQUEST['action'] ); ?>';
[106] Fix | Delete
<?php
[107] Fix | Delete
} else {
[108] Fix | Delete
$action = esc_html__( 'No Action Specified...', 'ninja-forms' );
[109] Fix | Delete
?>
[110] Fix | Delete
var nfProcessingAction = 'none';
[111] Fix | Delete
<?php
[112] Fix | Delete
}
[113] Fix | Delete
[114] Fix | Delete
$tmp_array = array();
[115] Fix | Delete
$url_params = parse_url( esc_url_raw( add_query_arg( array() ) ) );
[116] Fix | Delete
$query = $url_params['query'];
[117] Fix | Delete
$query = parse_str( $query, $tmp_array );
[118] Fix | Delete
unset ( $tmp_array['action'] );
[119] Fix | Delete
unset ( $tmp_array['page'] );
[120] Fix | Delete
?>
[121] Fix | Delete
[122] Fix | Delete
var nfProcessingArgs = <?php echo json_encode( $tmp_array ); ?>
[123] Fix | Delete
[124] Fix | Delete
</script>
[125] Fix | Delete
[126] Fix | Delete
<?php
[127] Fix | Delete
[128] Fix | Delete
?>
[129] Fix | Delete
[130] Fix | Delete
<div class="wrap">
[131] Fix | Delete
<h2><?php echo $page_title ?></h2>
[132] Fix | Delete
<div id="nf-upgrade-status">
[133] Fix | Delete
<p><?php esc_html_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>
[134] Fix | Delete
<div id="progressbar">
[135] Fix | Delete
<div class="progress-label">
[136] Fix | Delete
<?php echo $action; ?>
[137] Fix | Delete
</div>
[138] Fix | Delete
</div>
[139] Fix | Delete
</div>
[140] Fix | Delete
</div>
[141] Fix | Delete
[142] Fix | Delete
<!-- DISPLAY ERRORS -->
[143] Fix | Delete
<div id="nf-upgrade-errors" class="hidden nf-upgrade-errors">
[144] Fix | Delete
[145] Fix | Delete
<h3 class="nf-upgrade-errors-header">Error Log</h3>
[146] Fix | Delete
[147] Fix | Delete
<ul class="nf-upgrade-errors-list"></ul>
[148] Fix | Delete
[149] Fix | Delete
</div>
[150] Fix | Delete
[151] Fix | Delete
<?php
[152] Fix | Delete
}
[153] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function