PUM_Admin_Settings::page()

Render settings page with tabs.


Description Description


Source Source

File: classes/Admin/Settings.php

	public static function page() {

		$settings = PUM_Utils_Options::get_all();

		if ( empty( $settings ) ) {
			$settings = self::defaults();
		}

		?>

		<div class="wrap">

			<form id="pum-settings" method="post" action="">

				<?php wp_nonce_field( basename( __FILE__ ), 'pum_settings_nonce' ); ?>
				<h1><?php _e( 'Popup Maker Settings', 'popup-maker' ); ?></h1>
				<div id="pum-settings-container" class="pum-settings-container">
					<div class="pum-no-js" style="padding: 0 12px;">
						<p><?php printf( __( 'If you are seeing this, the page is still loading or there are Javascript errors on this page. %sView troubleshooting guide%s', 'popup-maker' ), '<a href="https://docs.wppopupmaker.com/article/373-checking-for-javascript-errors" target="_blank">', '</a>' ); ?></p>
					</div>
				</div>

				<script type="text/javascript">
					window.pum_settings_editor = <?php echo PUM_Utils_Array::safe_json_encode( apply_filters( 'pum_settings_editor_args', array(
						'form_args'      => array(
							'id'       => 'pum-settings',
							'tabs'     => self::tabs(),
							'sections' => self::sections(),
							'fields'   => self::fields(),
							'maintabs' => array(
								'meta' => array(
									'data-min-height' => 0,
								),
							),
						),
						'active_tab'     => self::get_active_tab(),
						'active_section' => self::get_active_section(),
						'current_values' => self::parse_values( $settings ),
					) ) ); ?>;
				</script>

				<button class="button-primary bottom" style="margin-left: 156px;"><?php _e( 'Save', 'popup-maker' ); ?></button>

			</form>

		</div>

		<?php
	}


Top ↑

User Contributed Notes User Contributed Notes

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