Esempio n. 1
0
				<p><strong><?php 
    echo esc_html($msg);
    ?>
</strong></p>
			</div>
		<?php 
}
$options = array('ig_pb_settings_cache', 'ig_pb_settings_boostrap_js', 'ig_pb_settings_boostrap_css');
// submit handle
if (!empty($_POST)) {
    foreach ($options as $key) {
        $value = !empty($_POST[$key]) ? 'enable' : 'disable';
        update_option($key, $value);
    }
    unset($_POST);
    IG_Pb_Helper_Functions::alert_msg(array('success', __('Your settings are saved successfully', IGPBL)));
}
// get saved options value
foreach ($options as $key) {
    ${$key} = get_option($key, 'enable');
}
// show options form
?>
		<form method="POST" action="options.php">
			<?php 
$page = 'ig-pb-settings';
settings_fields($page);
do_settings_sections($page);
submit_button();
?>
		</form>