PUM_Utils_Upgrades::render_form()

Renders the upgrade processing form for reuse.


Description Description


Source Source

File: classes/Utils/Upgrades.php

	public function render_form() {
		$args = array(
			'upgrade_id' => $this->get_current_upgrade_id(),
			'step'       => 1,
		);

		$resume_upgrade = $this->maybe_resume_upgrade();

		if ( $resume_upgrade && is_array( $resume_upgrade ) ) {
			$args = wp_parse_args( $resume_upgrade, $args );
		} ?>

		<form method="post" class="pum-form  pum-batch-form  pum-upgrade-form" data-ays="<?php _e( 'This can sometimes take a few minutes, are you ready to begin?', 'popup-maker' ); ?>" data-upgrade_id="<?php echo $args['upgrade_id']; ?>" data-step="<?php echo (int) $args['step']; ?>" data-nonce="<?php echo esc_attr( wp_create_nonce( 'pum_upgrade_ajax_nonce' ) ); ?>">

			<div class="pum-field  pum-field-button  pum-field-submit">
				<p>
					<small><?php _e( 'The button below will process these changes automatically for you.', 'popup-maker' ); ?></small>
				</p>
				<?php submit_button( ! empty( $resume_upgrade ) ? __( 'Finish Upgrades', 'popup-maker' ) : __( 'Process Changes', 'popup-maker' ), 'secondary', 'submit', false ); ?>
			</div>

			<div class="pum-batch-progress">
				<progress class="pum-overall-progress" max="100">
					<div class="progress-bar"><span></span></div>
				</progress>

				<progress class="pum-task-progress" max="100">
					<div class="progress-bar"><span></span></div>
				</progress>

				<div class="pum-upgrade-messages"></div>
			</div>

		</form>
		<?php
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.