How to Escape Custom Function Parameters
-
How do I escape my custom function parameters?
Code
//function defination function get_filter_list($ids, $filters, $selected_filters) { //some operation return $ouput; } //function call get_filter_list($ids, $filters, $selected_filters); //
Prarmeter Data Type
$ids
= array of numeric ids
$filters
= associative array of filters ids and names
$selected_filters
= array of numeric idsLike, which escaping functions should apply on function parameters
$ids
,$filters
and$selected_filters
: esc_attr(), esc_html(), wp_kses() and wp_kses_data()get_filter_list($ids, $filters, $selected_filters); // escape pararmetes
Any help appreciated.
Reference: https://developer.www.ads-software.com/plugins/security/securing-output/
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to Escape Custom Function Parameters’ is closed to new replies.