Changeset 40804 for trunk/src/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 05/19/2017 08:24:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r40036 r40804 19 19 class WP_Customize_Setting { 20 20 /** 21 * Customizer bootstrap instance. 22 * 23 * @since 3.4.0 21 24 * @access public 22 25 * @var WP_Customize_Manager … … 27 30 * Unique string identifier for the setting. 28 31 * 32 * @since 3.4.0 29 33 * @access public 30 34 * @var string … … 33 37 34 38 /** 39 * Type of customize settings. 40 * 41 * @since 3.4.0 35 42 * @access public 36 43 * @var string … … 41 48 * Capability required to edit this setting. 42 49 * 50 * @since 3.4.0 51 * @access public 52 * @var string|array 53 */ 54 public $capability = 'edit_theme_options'; 55 56 /** 57 * Feature a theme is required to support to enable this setting. 58 * 59 * @since 3.4.0 60 * @access public 43 61 * @var string 44 62 */ 45 public $capability = 'edit_theme_options'; 46 47 /** 48 * Feature a theme is required to support to enable this setting. 49 * 63 public $theme_supports = ''; 64 65 /** 66 * The default value for the setting. 67 * 68 * @since 3.4.0 50 69 * @access public 51 70 * @var string 52 71 */ 53 public $theme_supports = ''; 54 public $default = ''; 55 public $transport = 'refresh'; 56 57 /** 58 * Server-side sanitization callback for the setting's value. 59 * 60 * @var callback 61 */ 62 public $validate_callback = ''; 63 public $sanitize_callback = ''; 72 public $default = ''; 73 74 /** 75 * Options for rendering the live preview of changes in Theme Customizer. 76 * 77 * Set this value to 'postMessage' to enable a custom Javascript handler to render changes to this setting 78 * as opposed to reloading the whole page. 79 * 80 * @link https://developer.wordpress.org/themes/customize-api 81 * 82 * @since 3.4.0 83 * @access public 84 * @var string 85 */ 86 public $transport = 'refresh'; 87 88 /** 89 * Server-side validation callback for the setting's value. 90 * 91 * @since 4.6.0 92 * @access public 93 * @var callable 94 */ 95 public $validate_callback = ''; 96 97 /** 98 * Callback to filter a Customize setting value in un-slashed form. 99 * 100 * @since 3.4.0 101 * @access public 102 * @var callable 103 */ 104 public $sanitize_callback = ''; 105 106 /** 107 * Callback to convert a Customize PHP setting value to a value that is JSON serializable. 108 * 109 * @since 3.4.0 110 * @access public 111 * @var string 112 */ 64 113 public $sanitize_js_callback = ''; 65 114 … … 79 128 80 129 /** 130 * ID Data. 131 * 132 * @since 3.4.0 133 * @access protected 81 134 * @var array 82 135 */ … … 96 149 * 97 150 * @since 4.4.0 151 * @static 98 152 * @access protected 99 153 * @var array 100 * @static101 154 */ 102 155 protected static $aggregated_multidimensionals = array(); … … 169 222 * 170 223 * @since 4.4.0 171 * @access public172 224 * 173 225 * @return array { … … 189 241 * 190 242 * @since 4.4.0 191 * @access protected192 243 */ 193 244 protected function aggregate_multidimensional() { … … 217 268 * 218 269 * @since 4.5.0 219 * @access public220 270 * @ignore 221 271 */ … … 237 287 * 238 288 * @since 4.2.0 239 * @access public240 289 * 241 290 * @return bool If preview() has been called. … … 253 302 * @see WP_Customize_Setting::preview() 254 303 * @since 4.1.1 304 * @access protected 255 305 * @var mixed 256 306 */ … … 266 316 * @since 3.4.0 267 317 * @since 4.4.0 Added boolean return value. 268 * @access public269 318 * 270 319 * @return bool False when preview short-circuits due no change needing to be previewed. … … 380 429 * 381 430 * @since 4.4.0 382 * @access private431 * 383 432 * @see WP_Customize_Manager::set_post_value() 384 433 * @see WP_Customize_Setting::_multidimensional_preview_filter() … … 427 476 * 428 477 * @since 4.4.0 429 * @access private430 478 * 431 479 * @see WP_Customize_Setting::$aggregated_multidimensionals … … 470 518 * @since 3.4.0 471 519 * 472 * @access public473 *474 520 * @return false|void False if cap check fails or value isn't set or is invalid. 475 521 */ … … 537 583 * 538 584 * @since 4.6.0 539 * @access public540 585 * 541 586 * @see WP_REST_Request::has_valid_params() … … 579 624 * 580 625 * @since 4.4.0 581 * @access protected582 626 * 583 627 * @param mixed $default Value to return if root does not exist. … … 604 648 * 605 649 * @since 4.4.0 606 * @access protected607 650 * 608 651 * @param mixed $value Value to set as root of multidimensional setting. … … 771 814 * 772 815 * @since 4.6.0 773 * @access public774 816 * 775 817 * @return array Array of parameters passed to JavaScript. … … 908 950 } 909 951 910 /** WP_Customize_Filter_Setting class */ 952 /** 953 * WP_Customize_Filter_Setting class. 954 */ 911 955 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php' ); 912 956 913 /** WP_Customize_Header_Image_Setting class */ 957 /** 958 * WP_Customize_Header_Image_Setting class. 959 */ 914 960 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php' ); 915 961 916 /** WP_Customize_Background_Image_Setting class */ 962 /** 963 * WP_Customize_Background_Image_Setting class. 964 */ 917 965 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php' ); 918 966 919 /** WP_Customize_Nav_Menu_Item_Setting class */ 967 /** 968 * WP_Customize_Nav_Menu_Item_Setting class. 969 */ 920 970 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php' ); 921 971 922 /** WP_Customize_Nav_Menu_Setting class */ 972 /** 973 * WP_Customize_Nav_Menu_Setting class. 974 */ 923 975 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php' );
Note: See TracChangeset
for help on using the changeset viewer.