public function upme_reset_module_settings() { global $upme_admin; if (upme_is_post() && upme_is_in_post('current_tab')) { if (isset($upme_admin->default_module_settings[upme_post_value('current_tab')])) { $current_options = get_option('upme_options'); foreach ($upme_admin->default_module_settings[upme_post_value('current_tab')] as $key => $value) { $current_options[$key] = $value; } update_option('upme_options', $current_options); echo json_encode(array('status' => 'success')); exit; } } }
function upme_reset_settings() { if (upme_is_post() && upme_is_in_post('current_tab')) { if (isset($this->default_settings[upme_post_value('current_tab')])) { $current_options = get_option('upme_options'); foreach ($this->default_settings[upme_post_value('current_tab')] as $key => $value) { $current_options[$key] = $value; } update_option('upme_options', $current_options); echo "success"; die; } } }
function check_search_input() { if (upme_is_post()) { if (upme_is_in_post('upme_combined_search') && upme_post_value('upme_combined_search') != '') { return true; } if (upme_is_in_post('upme_search')) { foreach ($_POST['upme_search'] as $key => $value) { if (is_array($value) && count($value) > 0) { return true; } else { if ($value != '' && $value != '0') { return true; } } } } } return false; }