Changeset 38121 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 07/20/2016 04:56:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r38028 r38121 652 652 653 653 /** 654 * Return the sanitized value for a given setting from the request's POST data. 655 * 656 * @since 3.4.0 657 * @since 4.1.1 Introduced `$default` parameter. 658 * @since 4.6.0 Return `$default` when setting post value is invalid. 654 * Returns the sanitized value for a given setting from the request's POST data. 655 * 656 * @since 3.4.0 657 * @since 4.1.1 Introduced the `$default` parameter. 658 * @since 4.6.0 `$default` is now returned early when the setting post value is invalid. 659 * @access public 660 * 659 661 * @see WP_REST_Server::dispatch() 660 662 * @see WP_Rest_Request::sanitize_params() … … 988 990 989 991 /** 990 * Validate setting values.992 * Validates setting values. 991 993 * 992 994 * Sanitization is applied to the values before being passed for validation. … … 996 998 * @since 4.6.0 997 999 * @access public 1000 * 998 1001 * @see WP_REST_Request::has_valid_params() 999 1002 * @see WP_Customize_Setting::validate() … … 1027 1030 1028 1031 /** 1029 * Prepare setting validity for exporting to the client (JS).1032 * Prepares setting validity for exporting to the client (JS). 1030 1033 * 1031 1034 * Converts `WP_Error` instance into array suitable for passing into the … … 1036 1039 * 1037 1040 * @param true|WP_Error $validity Setting validity. 1038 * @return true|array If `$validity` was `WP_Error` then array mapping the error1039 * codes to their respective `message` and `data` to pass1040 * into the`wp.customize.Notification` JS model.1041 * @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped 1042 * to their respective `message` and `data` to pass into the 1043 * `wp.customize.Notification` JS model. 1041 1044 */ 1042 1045 public function prepare_setting_validity_for_js( $validity ) { … … 1081 1084 * Fires before save validation happens. 1082 1085 * 1083 * Plugins can add just-in-time `customize_validate_{$setting_id}`filters1086 * Plugins can add just-in-time {@see 'customize_validate_{$this->ID}'} filters 1084 1087 * at this point to catch any settings registered after `customize_register`. 1088 * The dynamic portion of the hook name, `$this->ID` referrs to the setting ID. 1085 1089 * 1086 1090 * @since 4.6.0
Note: See TracChangeset
for help on using the changeset viewer.