echo esc_html($msg); ?> </strong> </p> </div> <?php } $options = array('wr_pb_settings_cache', 'wr_pb_settings_boostrap_js', 'wr_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); WR_Pb_Helper_Functions::alert_msg(array('success', __('Your settings are saved successfully', WR_PBL))); } // get saved options value foreach ($options as $key) { ${$key} = get_option($key, 'enable'); } // show options form ?> <form method="POST" action="options.php"> <?php $page = 'wr-pb-settings'; settings_fields($page); do_settings_sections($page); submit_button(); ?> </form>