WC_REST_Products_Catalog_Controller::sanitize_fields_arg
Sanitize fields argument.
Метод класса: WC_REST_Products_Catalog_Controller{}
Хуков нет.
Возвращает
Массив. Sanitized and canonicalized fields array.
Использование
$WC_REST_Products_Catalog_Controller = new WC_REST_Products_Catalog_Controller(); $WC_REST_Products_Catalog_Controller->sanitize_fields_arg( $value );
- $value(разное) (обязательный)
- The value to sanitize. Can be an array or comma-separated string.
Код WC_REST_Products_Catalog_Controller::sanitize_fields_arg() WC REST Products Catalog Controller::sanitize fields arg WC 10.5.2
public function sanitize_fields_arg( $value ) {
if ( is_string( $value ) ) {
$value = array_map( 'trim', explode( ',', $value ) );
}
return $this->canonicalize_fields( is_array( $value ) ? $value : array() );
}