Prepares setting validity for exporting to the client (JS).
Description
Converts WP_Error instance into array suitable for passing into the wp.customize.Notification JS model.
Parameters
$validitytrue|WP_Error
Setting validity.
Return
true|array
If $validity was a WP_Error, the error codes will be array-mapped to their respective message and data to pass into the wp.customize.Notification JS model.
Uses · 1
is_wp_error()Checks whether the given variable is a WordPress Error.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/class-wp-customize-manager.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.