mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572 git-svn-id: https://develop.svn.wordpress.org/trunk@48473 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4149,7 +4149,7 @@ function wp_send_json_error( $data = null, $status_code = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that a JSONP callback is a valid JavaScript callback.
|
||||
* Checks that a JSONP callback is a valid JavaScript callback name.
|
||||
*
|
||||
* Only allows alphanumeric characters and the dot character in callback
|
||||
* function names. This helps to mitigate XSS attacks caused by directly
|
||||
@@ -4157,8 +4157,8 @@ function wp_send_json_error( $data = null, $status_code = null ) {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param string $callback Supplied JSONP callback function.
|
||||
* @return bool True if valid callback, otherwise false.
|
||||
* @param string $callback Supplied JSONP callback function name.
|
||||
* @return bool Whether the callback function name is valid.
|
||||
*/
|
||||
function wp_check_jsonp_callback( $callback ) {
|
||||
if ( ! is_string( $callback ) ) {
|
||||
|
||||
Reference in New Issue
Block a user