本文整理匯總了PHP中parent::log_path方法的典型用法代碼示例。如果您正苦於以下問題:PHP parent::log_path方法的具體用法?PHP parent::log_path怎麽用?PHP parent::log_path使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類parent
的用法示例。
在下文中一共展示了parent::log_path方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: validate_options
public function validate_options($input = array())
{
if ($_REQUEST['download_log_file']) {
$this->download_log_file();
exit;
}
if (empty($input) && $_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST[self::$_plugin_action_slug])) {
$input = $_POST[self::$_plugin_action_slug];
}
$saved_option = parent::get_option('ac_inspector_log_path');
if (!empty($input['log_path'])) {
if ($saved_option === FALSE) {
parent::add_option('ac_inspector_log_path', $input['log_path']);
} else {
parent::update_option('ac_inspector_log_path', $input['log_path']);
}
parent::$log_path = $input['log_path'];
}
$routines = (array) ACI_Routine_Handler::get_all();
foreach (array_keys($routines) as $routine) {
$routine_settings = ACI_Routine_Handler::get_options($routine);
if (!empty($input[$routine]) && is_array($input[$routine])) {
$new_routine_settings = $input[$routine];
} else {
$new_routine_settings = array();
}
foreach ($new_routine_settings as $opt => $val) {
$routine_settings[$opt] = $new_routine_settings[$opt];
}
$routine_settings = apply_filters($routine . '_settings', $routine_settings);
ACI_Routine_Handler::set_options($routine, $routine_settings);
}
if (is_multisite() && is_plugin_active_for_network(ACI_PLUGIN_BASENAME)) {
// redirect to settings page in network
wp_redirect(add_query_arg(array('page' => ACI_PLUGIN_SLUG, 'updated' => 'true'), network_admin_url('settings.php')));
exit;
}
return $input;
}