Changeset 35781 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 12/06/2015 06:09:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r35724 r35781 1038 1038 * 1039 1039 * @since 3.4.0 1040 * 1041 * @param WP_Customize_Setting|string $id Customize Setting object, or ID. 1042 * @param array $args Setting arguments; passed to WP_Customize_Setting 1043 * constructor. 1040 * @since 4.5.0 Return added WP_Customize_Setting instance. 1041 * @access public 1042 * 1043 * @param WP_Customize_Setting|string $id Customize Setting object, or ID. 1044 * @param array $args Setting arguments; passed to WP_Customize_Setting 1045 * constructor. 1046 * @return WP_Customize_Setting The instance of the setting that was added. 1044 1047 */ 1045 1048 public function add_setting( $id, $args = array() ) { … … 1049 1052 $setting = new WP_Customize_Setting( $this, $id, $args ); 1050 1053 } 1054 1051 1055 $this->settings[ $setting->id ] = $setting; 1056 return $setting; 1052 1057 } 1053 1058 … … 1062 1067 * 1063 1068 * @since 4.2.0 1069 * @access public 1064 1070 * 1065 1071 * @param array $setting_ids The setting IDs to add. … … 1142 1148 * 1143 1149 * @since 4.0.0 1150 * @since 4.5.0 Return added WP_Customize_Panel instance. 1144 1151 * @access public 1145 1152 * 1146 1153 * @param WP_Customize_Panel|string $id Customize Panel object, or Panel ID. 1147 1154 * @param array $args Optional. Panel arguments. Default empty array. 1155 * 1156 * @return WP_Customize_Panel The instance of the panel that was added. 1148 1157 */ 1149 1158 public function add_panel( $id, $args = array() ) { … … 1155 1164 1156 1165 $this->panels[ $panel->id ] = $panel; 1166 return $panel; 1157 1167 } 1158 1168 … … 1217 1227 * 1218 1228 * @since 3.4.0 1229 * @since 4.5.0 Return added WP_Customize_Section instance. 1230 * @access public 1219 1231 * 1220 1232 * @param WP_Customize_Section|string $id Customize Section object, or Section ID. 1221 1233 * @param array $args Section arguments. 1234 * 1235 * @return WP_Customize_Section The instance of the section that was added. 1222 1236 */ 1223 1237 public function add_section( $id, $args = array() ) { … … 1227 1241 $section = new WP_Customize_Section( $this, $id, $args ); 1228 1242 } 1243 1229 1244 $this->sections[ $section->id ] = $section; 1245 return $section; 1230 1246 } 1231 1247 … … 1287 1303 * 1288 1304 * @since 3.4.0 1305 * @since 4.5.0 Return added WP_Customize_Control instance. 1306 * @access public 1289 1307 * 1290 1308 * @param WP_Customize_Control|string $id Customize Control object, or ID. 1291 1309 * @param array $args Control arguments; passed to WP_Customize_Control 1292 1310 * constructor. 1311 * @return WP_Customize_Control The instance of the control that was added. 1293 1312 */ 1294 1313 public function add_control( $id, $args = array() ) { … … 1298 1317 $control = new WP_Customize_Control( $this, $id, $args ); 1299 1318 } 1319 1300 1320 $this->controls[ $control->id ] = $control; 1321 return $control; 1301 1322 } 1302 1323
Note: See TracChangeset
for help on using the changeset viewer.