GC_Customize_Widgets::get_post_value()
最后更新于:2021-11-27 10:47:05
GC_Customize_Widgets::get_post_value( string$name, mixed$default=null)Retrieves an unslashed post value or return a default.
参数
- $name
-
(string) (Required) Post value.
- $default
-
(mixed) (Optional) Default post value.
Default value: null
响应
(mixed) Unslashed post value or default value.
源文件
文件: gc-includes/class-gc-customize-widgets.php
protected function get_post_value( $name, $default = null ) {
if ( ! isset( $_POST[ $name ] ) ) {
return $default;
}
return gc_unslash( $_POST[ $name ] );
}