mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 1/2. See #37318. git-svn-id: https://develop.svn.wordpress.org/trunk@38121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -464,11 +464,12 @@ class WP_Customize_Setting {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check user capabilities and theme supports, and then save
|
||||
* Checks user capabilities and theme supports, and then saves
|
||||
* the value of the setting.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.6.0 Return the result of updating the value.
|
||||
* @access public
|
||||
*
|
||||
* @return false|void False if cap check fails or value isn't set or is invalid.
|
||||
*/
|
||||
@@ -528,14 +529,15 @@ class WP_Customize_Setting {
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate an input.
|
||||
* Validates an input.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_REST_Request::has_valid_params()
|
||||
*
|
||||
* @param mixed $value Value to validate.
|
||||
* @return true|WP_Error
|
||||
* @return true|WP_Error True if the input was validated, otherwise WP_Error.
|
||||
*/
|
||||
public function validate( $value ) {
|
||||
if ( is_wp_error( $value ) ) {
|
||||
@@ -548,10 +550,12 @@ class WP_Customize_Setting {
|
||||
$validity = new WP_Error();
|
||||
|
||||
/**
|
||||
* Validate a Customize setting value.
|
||||
* Validates a Customize setting value.
|
||||
*
|
||||
* Plugins should amend the `$validity` object via its `WP_Error::add()` method.
|
||||
*
|
||||
* The dynamic portion of the hook name, `$this->ID`, refers to the setting ID.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Error $validity Filtered from `true` to `WP_Error` when invalid.
|
||||
@@ -695,14 +699,14 @@ class WP_Customize_Setting {
|
||||
/**
|
||||
* Filters a Customize setting value not handled as a theme_mod or option.
|
||||
*
|
||||
* The dynamic portion of the hook name, `$this->id_date['base']`, refers to
|
||||
* the base slug of the setting name.
|
||||
* The dynamic portion of the hook name, `$id_base`, refers to
|
||||
* the base slug of the setting name, initialized from `$this->id_data['base']`.
|
||||
*
|
||||
* For settings handled as theme_mods or options, see those corresponding
|
||||
* functions for available hooks.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.6.0 Added the `$this` setting instance as the second param.
|
||||
* @since 4.6.0 Added the `$this` setting instance as the second parameter.
|
||||
*
|
||||
* @param mixed $default The setting default value. Default empty.
|
||||
* @param WP_Customize_Setting $this The setting instance.
|
||||
@@ -750,9 +754,10 @@ class WP_Customize_Setting {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data to export to the client via JSON.
|
||||
* Retrieves the data to export to the client via JSON.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Array of parameters passed to JavaScript.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user