scossdl_off_update()
Update CDN settings to the options database table.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
scossdl_off_update();
Код scossdl_off_update() scossdl off update WPSCache 1.12.4
function scossdl_off_update() { if ( isset( $_POST['action'], $_POST['_wpnonce'] ) && 'update_ossdl_off' === $_POST['action'] // WPCS: sanitization ok. && wp_verify_nonce( $_POST['_wpnonce'], 'wp-cache' ) ) { update_option( 'ossdl_off_cdn_url', untrailingslashit( wp_unslash( $_POST['ossdl_off_cdn_url'] ) ) ); // WPSC: sanitization ok. update_option( 'ossdl_off_blog_url', untrailingslashit( wp_unslash( $_POST['ossdl_off_blog_url'] ) ) ); // WPSC: sanitization ok. if ( empty( $_POST['ossdl_off_include_dirs'] ) ) { $include_dirs = implode( ',', scossdl_off_default_inc_dirs() ); } else { $include_dirs = sanitize_text_field( wp_unslash( $_POST['ossdl_off_include_dirs'] ) ); // WPSC: validation ok,sanitization ok. } update_option( 'ossdl_off_include_dirs', $include_dirs ); update_option( 'ossdl_off_exclude', sanitize_text_field( wp_unslash( $_POST['ossdl_off_exclude'] ) ) ); // WPSC: sanitization ok. update_option( 'ossdl_cname', sanitize_text_field( wp_unslash( $_POST['ossdl_cname'] ) ) ); // WPSC: sanitization ok. $ossdl_https = empty( $_POST['ossdl_https'] ) ? 0 : 1; $ossdlcdn = empty( $_POST['ossdlcdn'] ) ? 0 : 1; update_option( 'ossdl_https', $ossdl_https ); wp_cache_setting( 'ossdlcdn', $ossdlcdn ); } }