0
이 함수를 사용하려면 update_options를 가져 오려고합니다. 기본적으로 사용자는 활성화 코드를 입력하고 플러그인 옵션 페이지를 통해 제출합니다. 코드가 제 3 자에게 보내지고 성공하면 상태가 반환됩니다. 이것은 모두 작동하지만 update_options를 사용하여 문제의 옵션 상태를 변경할 수는 없습니다.Wordpress OOP 프레임 워크가 update_options 함수와 함께 작동하지 않습니다.
private function _admin_options_update() {
// Verify submission for processing using wp_nonce
if(wp_verify_nonce($_REQUEST['_wpnonce'], "{$this->namespace}-update-options")) {
$data = array();
/**
* Loop through each POSTed value and sanitize it to protect against malicious code. Please
* note that rich text (or full HTML fields) should not be processed by this function and
* dealt with directly.
*/
foreach($_POST['data'] as $key => $val) {
$data[$key] = $this->_sanitize($val);
}
/**
* Place your options processing and storage code here
*/
// Update the options value with the data submitted
update_option($this->option_name, $data);
// Redirect back to the options page with the message flag to show the saved message
wp_safe_redirect($_REQUEST['_wp_http_referer'] . '&update=1');
exit;
}
}
나는이 기능을 실행하기 위해 노력하고있어 :
update_option ($ WPBackitup-> 옵션 [ '을 여기에
은 (내가 사용 OOP 프레임 워크의 일부) 업데이트 기능입니다 status '], $ license_data-> license);