Changeset 32535
- Timestamp:
- 05/21/2015 10:04:29 PM (9 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-control.php
r32382 r32535 216 216 * @access public 217 217 * 218 * @return boolAlways true.218 * @return true Always true. 219 219 */ 220 220 public function active_callback() { … … 680 680 * 681 681 * @param WP_Customize_Manager $manager {@see WP_Customize_Manager} instance. 682 * @param string $id 683 * @param array $args 682 684 */ 683 685 public function __construct( $manager, $id, $args = array() ) { … … 1124 1126 } 1125 1127 1128 /** 1129 * @return string|null 1130 */ 1126 1131 public function get_current_image_src() { 1127 1132 $src = $this->value(); … … 1130 1135 return $src; 1131 1136 } 1132 return null;1133 1137 } 1134 1138 -
trunk/src/wp-includes/class-wp-customize-manager.php
r32265 r32535 648 648 * 649 649 * @since 3.4.0 650 * 651 * @return mixed 650 652 */ 651 653 public function remove_preview_signature( $return = null ) { … … 842 844 * @since 4.2.0 843 845 * 844 * @param string$setting_ids The setting IDs to add.846 * @param array $setting_ids The setting IDs to add. 845 847 * @return WP_Customize_Setting The settings added. 846 848 */ … … 898 900 * 899 901 * @param string $id Customize Setting ID. 900 * @return WP_Customize_Setting 902 * @return WP_Customize_Setting|null The setting, if set. 901 903 */ 902 904 public function get_setting( $id ) { … … 943 945 * 944 946 * @param string $id Panel ID to get. 945 * @return WP_Customize_Panel Requested panel instance.947 * @return WP_Customize_Panel|null Requested panel instance, if set. 946 948 */ 947 949 public function get_panel( $id ) { … … 986 988 * 987 989 * @param string $id Section ID. 988 * @return WP_Customize_Section 990 * @return WP_Customize_Section|null The section, if set. 989 991 */ 990 992 public function get_section( $id ) { … … 1028 1030 * 1029 1031 * @param string $id ID of the control. 1030 * @return WP_Customize_Control $control The control object.1032 * @return WP_Customize_Control|null The control object, if set. 1031 1033 */ 1032 1034 public function get_control( $id ) { … … 1514 1516 * 1515 1517 * @param string $color 1516 * @return string1518 * @return mixed 1517 1519 */ 1518 1520 public function _sanitize_header_textcolor( $color ) { … … 1546 1548 if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) 1547 1549 return $color; 1548 1549 return null;1550 1550 } 1551 1551 -
trunk/src/wp-includes/class-wp-customize-section.php
r32127 r32535 208 208 * @access public 209 209 * 210 * @return boolAlways true.210 * @return true Always true. 211 211 */ 212 212 public function active_callback() { -
trunk/src/wp-includes/class-wp-customize-setting.php
r32034 r32535 134 134 public function is_current_blog_previewed() { 135 135 if ( ! isset( $this->_previewed_blog_id ) ) { 136 return null;136 return; 137 137 } 138 138 return ( get_current_blog_id() === $this->_previewed_blog_id ); … … 276 276 * @since 3.4.0 277 277 * 278 * @param mixed$value The value to sanitize.279 * @return mixedNull if an input isn't valid, otherwise the sanitized value.278 * @param string|array $value The value to sanitize. 279 * @return string|array|null Null if an input isn't valid, otherwise the sanitized value. 280 280 */ 281 281 public function sanitize( $value ) { … … 332 332 * 333 333 * @param mixed $value The value to update. 334 * @return mixed The result of saving the value.335 334 */ 336 335 protected function _update_theme_mod( $value ) { 337 336 // Handle non-array theme mod. 338 if ( empty( $this->id_data[ 'keys' ] ) ) 339 return set_theme_mod( $this->id_data[ 'base' ], $value ); 340 337 if ( empty( $this->id_data[ 'keys' ] ) ) { 338 set_theme_mod( $this->id_data[ 'base' ], $value ); 339 return; 340 } 341 341 // Handle array-based theme mod. 342 342 $mods = get_theme_mod( $this->id_data[ 'base' ] ); 343 343 $mods = $this->multidimensional_replace( $mods, $this->id_data[ 'keys' ], $value ); 344 if ( isset( $mods ) ) 345 return set_theme_mod( $this->id_data[ 'base' ], $mods ); 344 if ( isset( $mods ) ) { 345 set_theme_mod( $this->id_data[ 'base' ], $mods ); 346 } 346 347 } 347 348 … … 352 353 * 353 354 * @param mixed $value The value to update. 354 * @return bool |nullThe result of saving the value.355 * @return bool The result of saving the value. 355 356 */ 356 357 protected function _update_option( $value ) { -
trunk/src/wp-includes/class-wp-customize-widgets.php
r32243 r32535 123 123 } 124 124 } 125 return null;126 125 } 127 126 … … 237 236 * 238 237 * @param array $old_sidebars_widgets 238 * @return array 239 239 */ 240 240 public function filter_customize_value_old_sidebars_widgets_data( $old_sidebars_widgets ) { … … 254 254 * 255 255 * @param array $sidebars_widgets 256 * @return array 256 257 */ 257 258 public function filter_option_sidebars_widgets_for_theme_switch( $sidebars_widgets ) { … … 919 920 * 920 921 * @param array $sidebars_widgets List of widgets for the current sidebar. 922 * @return array 921 923 */ 922 924 public function preview_sidebars_widgets( $sidebars_widgets ) { … … 1041 1043 * @param bool $is_active Whether the sidebar is active. 1042 1044 * @param string $sidebar_id Sidebar ID. 1045 * @return bool 1043 1046 */ 1044 1047 public function tally_sidebars_via_is_active_sidebar_calls( $is_active, $sidebar_id ) { … … 1066 1069 * @param bool $has_widgets Whether the current sidebar has widgets. 1067 1070 * @param string $sidebar_id Sidebar ID. 1071 * @return bool 1068 1072 */ 1069 1073 public function tally_sidebars_via_dynamic_sidebar_calls( $has_widgets, $sidebar_id ) { … … 1106 1110 * 1107 1111 * @param array $value Widget instance to sanitize. 1108 * @return array Sanitized widget instance.1112 * @return array|null Sanitized widget instance. 1109 1113 */ 1110 1114 public function sanitize_widget_instance( $value ) { … … 1117 1121 || empty( $value['encoded_serialized_instance'] ) ) 1118 1122 { 1119 return null;1123 return; 1120 1124 } 1121 1125 1122 1126 $decoded = base64_decode( $value['encoded_serialized_instance'], true ); 1123 1127 if ( false === $decoded ) { 1124 return null;1128 return; 1125 1129 } 1126 1130 1127 1131 if ( $this->get_instance_hash_key( $decoded ) !== $value['instance_hash_key'] ) { 1128 return null;1132 return; 1129 1133 } 1130 1134 1131 1135 $instance = unserialize( $decoded ); 1132 1136 if ( false === $instance ) { 1133 return null;1137 return; 1134 1138 } 1135 1139
Note: See TracChangeset
for help on using the changeset viewer.