WP_Customize_Manager::prepare_setting_validity_for_js( true|WP_Error $validity )
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
- $validity
-
(Required) 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.
Source
File: wp-includes/class-wp-customize-manager.php
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |