wp_check_jsonp_callback


wp_check_jsonp_callback ( $callback )

Parameters:
  • (string) $callback Supplied JSONP callback function.
Returns:
  • (bool) True if valid callback, otherwise false.
Defined at:

Description

Checks that a JSONP callback is a valid JavaScript callback.

Only allows alphanumeric characters and the dot character in callback function names. This helps to mitigate XSS attacks caused by directly outputting user input.

Related Functions

wp_check_post_lock, _wp_kses_split_callback, wp_rel_nofollow_callback, _sort_name_callback, _sort_uname_callback

Top Google Results

User discussions

wpseek mobile