Ticket #7661: 7661.r8954.diff
| File 7661.r8954.diff, 4.9 KB (added by , 17 years ago) |
|---|
-
widgets.php
324 324 call_user_func_array('wp_register_widget_control', $args); 325 325 } 326 326 327 /* $options: height, width, id_base328 * height: never used329 * width: width of fully expanded control form. Try hard to use the default width.330 * id_base: for multi-widgets (widgets which allow multiple instances such as the text widget), an id_base must be provided.331 * the widget id will ennd up looking like {$id_base}-{$unique_number}332 */333 327 /** 334 328 * {@internal Missing Short Description}} 335 329 * 336 330 * {@internal Missing Long Description}} 337 331 * 332 * The options contains the 'height', 'width', and 'id_base' keys. The 'height' 333 * option is never used. The 'width' option is the width of the fully expanded 334 * control form, but try hard to use the default width. The 'id_base' is for 335 * multi-widgets (widgets which allow multiple instances such as the text 336 * widget), an id_base must be provided. The widget id will end up looking like 337 * {$id_base}-{$unique_number}. 338 * 338 339 * @since 2.2.0 339 340 * 340 * @param int $id {@internal Missing Description}} 341 * @param string $name {@internal Missing Description}} 342 * @param callback $control_callback {@internal Missing Description}} 343 * @param array|string $options {@internal Missing Description}} 341 * @param int|string $id Sidebar ID. 342 * @param string $name Sidebar display name. 343 * @param callback $control_callback Run when sidebar is displayed. 344 * @param array|string $options Optional. Widget options. See above long description. 345 * @param mixed $params,... Optional. Additional parameters to add to widget. 344 346 */ 345 347 function wp_register_widget_control($id, $name, $control_callback, $options = array()) { 346 348 global $wp_registered_widget_controls; … … 398 400 } 399 401 400 402 /** 401 * {@internal Missing Short Description}}403 * Display dynamic sidebar. 402 404 * 403 405 * {@internal Missing Long Description}} 404 406 * 405 407 * @since 2.2.0 406 408 * 407 * @param unknown_type $index408 * @return unknown409 * @param int|string $index Optional, default is 1. Name or ID of dynamic sidebar. 410 * @return bool True, if widget sidebar was found and called. False if not found or not called. 409 411 */ 410 412 function dynamic_sidebar($index = 1) { 411 413 global $wp_registered_sidebars, $wp_registered_widgets; … … 461 463 } 462 464 463 465 /** 464 * {@internal Missing Short Description}}466 * Whether widget is registered using callback with widget ID. 465 467 * 466 * {@internal Missing Long Description}} 468 * Will only check if both parameters are used. Used to find which sidebar the 469 * widget is located in, but requires that both the callback and the widget ID 470 * be known. 467 471 * 468 472 * @since 2.2.0 469 473 * 470 * @param unknown_type $callback 471 /* @return mixed false if widget is not active or id of sidebar in which the widget is active 474 * @param callback $callback Widget callback to check. 475 * @param int $widget_id Optional, but needed for checking. Widget ID. 476 /* @return mixed false if widget is not active or id of sidebar in which the widget is active. 472 477 */ 473 478 function is_active_widget($callback, $widget_id = false) { 474 479 global $wp_registered_widgets; … … 486 491 } 487 492 488 493 /** 489 * {@internal Missing Short Description}}494 * Whether the dynamic sidebar is enabled and used by theme. 490 495 * 491 * {@internal Missing Long Description}}492 *493 496 * @since 2.2.0 494 497 * 495 * @return unknown498 * @return bool True, if using widgets. False, if not using widgets. 496 499 */ 497 500 function is_dynamic_sidebar() { 498 501 global $wp_registered_widgets, $wp_registered_sidebars; … … 510 513 /* Internal Functions */ 511 514 512 515 /** 513 * {@internal Missing Short Description}}516 * Retrieve full list of sidebars and their widgets. 514 517 * 515 * {@internal Missing Long Description}} 518 * Will upgrade sidebar widget list, if needed. Will also save updated list, if 519 * needed. 516 520 * 517 521 * @since 2.2.0 518 522 * @access private 519 523 * 520 * @param unknown_type $update521 * @return unknown524 * @param bool $update Optional, default is true. Whether to save upgrade of widget array list. 525 * @return array Upgraded list of widgets to version 2 array format. 522 526 */ 523 527 function wp_get_sidebars_widgets($update = true) { 524 528 global $wp_registered_widgets, $wp_registered_sidebars; … … 599 603 } 600 604 601 605 /** 602 * {@internal Missing Short Description}}606 * Set the sidebar widget option to update sidebars. 603 607 * 604 * {@internal Missing Long Description}}605 *606 608 * @since 2.2.0 607 609 * @access private 608 * @uses update_option()609 610 * 610 * @param unknown_type $sidebars_widgets611 * @param array $sidebars_widgets Sidebar widgets and their settings. 611 612 */ 612 613 function wp_set_sidebars_widgets( $sidebars_widgets ) { 613 614 update_option( 'sidebars_widgets', $sidebars_widgets ); 614 615 } 615 616 616 617 /** 617 * {@internal Missing Short Description}}618 * Retrieve default registered sidebars list. 618 619 * 619 * {@internal Missing Long Description}}620 *621 620 * @since 2.2.0 622 621 * @access private 623 622 * 624 * @return unknown623 * @return array 625 624 */ 626 625 function wp_get_widget_defaults() { 627 626 global $wp_registered_sidebars;