Make WordPress Core

Ticket #7661: 7661.r8954.diff

File 7661.r8954.diff, 4.9 KB (added by jacobsantos, 17 years ago)

Only 7 functions left to complete based off of r8954

  • widgets.php

     
    324324        call_user_func_array('wp_register_widget_control', $args);
    325325}
    326326
    327 /* $options: height, width, id_base
    328  *   height: never used
    329  *   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  */
    333327/**
    334328 * {@internal Missing Short Description}}
    335329 *
    336330 * {@internal Missing Long Description}}
    337331 *
     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 *
    338339 * @since 2.2.0
    339340 *
    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.
    344346 */
    345347function wp_register_widget_control($id, $name, $control_callback, $options = array()) {
    346348        global $wp_registered_widget_controls;
     
    398400}
    399401
    400402/**
    401  * {@internal Missing Short Description}}
     403 * Display dynamic sidebar.
    402404 *
    403405 * {@internal Missing Long Description}}
    404406 *
    405407 * @since 2.2.0
    406408 *
    407  * @param unknown_type $index
    408  * @return unknown
     409 * @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.
    409411 */
    410412function dynamic_sidebar($index = 1) {
    411413        global $wp_registered_sidebars, $wp_registered_widgets;
     
    461463}
    462464
    463465/**
    464  * {@internal Missing Short Description}}
     466 * Whether widget is registered using callback with widget ID.
    465467 *
    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.
    467471 *
    468472 * @since 2.2.0
    469473 *
    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.
    472477 */
    473478function is_active_widget($callback, $widget_id = false) {
    474479        global $wp_registered_widgets;
     
    486491}
    487492
    488493/**
    489  * {@internal Missing Short Description}}
     494 * Whether the dynamic sidebar is enabled and used by theme.
    490495 *
    491  * {@internal Missing Long Description}}
    492  *
    493496 * @since 2.2.0
    494497 *
    495  * @return unknown
     498 * @return bool True, if using widgets. False, if not using widgets.
    496499 */
    497500function is_dynamic_sidebar() {
    498501        global $wp_registered_widgets, $wp_registered_sidebars;
     
    510513/* Internal Functions */
    511514
    512515/**
    513  * {@internal Missing Short Description}}
     516 * Retrieve full list of sidebars and their widgets.
    514517 *
    515  * {@internal Missing Long Description}}
     518 * Will upgrade sidebar widget list, if needed. Will also save updated list, if
     519 * needed.
    516520 *
    517521 * @since 2.2.0
    518522 * @access private
    519523 *
    520  * @param unknown_type $update
    521  * @return unknown
     524 * @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.
    522526 */
    523527function wp_get_sidebars_widgets($update = true) {
    524528        global $wp_registered_widgets, $wp_registered_sidebars;
     
    599603}
    600604
    601605/**
    602  * {@internal Missing Short Description}}
     606 * Set the sidebar widget option to update sidebars.
    603607 *
    604  * {@internal Missing Long Description}}
    605  *
    606608 * @since 2.2.0
    607609 * @access private
    608  * @uses update_option()
    609610 *
    610  * @param unknown_type $sidebars_widgets
     611 * @param array $sidebars_widgets Sidebar widgets and their settings.
    611612 */
    612613function wp_set_sidebars_widgets( $sidebars_widgets ) {
    613614        update_option( 'sidebars_widgets', $sidebars_widgets );
    614615}
    615616
    616617/**
    617  * {@internal Missing Short Description}}
     618 * Retrieve default registered sidebars list.
    618619 *
    619  * {@internal Missing Long Description}}
    620  *
    621620 * @since 2.2.0
    622621 * @access private
    623622 *
    624  * @return unknown
     623 * @return array
    625624 */
    626625function wp_get_widget_defaults() {
    627626        global $wp_registered_sidebars;