yoast_free_bulk_sanitize_input_fields()
Sanitizes the parameters that have been sent.
Хуков нет.
Возвращает
Массив
. The sanitized fields.
Использование
yoast_free_bulk_sanitize_input_fields();
Код yoast_free_bulk_sanitize_input_fields() yoast free bulk sanitize input fields Yoast 23.5
function yoast_free_bulk_sanitize_input_fields() { $possible_params = [ 'type', 'paged', 'post_type_filter', 'post_status', 'order', 'orderby', ]; $input_get = []; foreach ( $possible_params as $param_name ) { if ( isset( $_GET[ $param_name ] ) ) { $input_get[ $param_name ] = sanitize_text_field( wp_unslash( $_GET[ $param_name ] ) ); } } return $input_get; }