Make WordPress Core

Ticket #28298: 28298.register_sidebar.diff

File 28298.register_sidebar.diff, 2.4 KB (added by coffee2code, 9 years ago)

Convert documentation for default arguments in register_sidebar() to a hash notation.

  • src/wp-includes/widgets.php

     
    689689 * If theme support for 'widgets' has not yet been added when this function is
    690690 * called, it will be automatically enabled through the use of add_theme_support()
    691691 *
    692  * Arguments passed as a string should be separated by '&':
    693  *
    694  *     e.g. 'name=Sidebar&id=my_prefix_sidebar'
    695  *
    696  * The same arguments passed as an array:
    697  *
    698  *     array(
    699  *         'name' => 'Sidebar',
    700  *         'id'   => 'my_prefix_sidebar',
    701  *     )
    702  *
    703  * Arguments:
    704  *     name          - The name or title of the sidebar displayed in the admin dashboard.
    705  *     id            - The unique identifier by which the sidebar will be called.
    706  *     before_widget - HTML content that will be prepended to each widget's HTML output
    707  *                     when assigned to this sidebar.
    708  *     after_widget  - HTML content that will be appended to each widget's HTML output
    709  *                     when assigned to this sidebar.
    710  *     before_title  - HTML content that will be prepended to the sidebar title when displayed.
    711  *     after_title   - HTML content that will be appended to the sidebar title when displayed.
    712  *
    713692 * @since 2.2.0
    714693 * @uses $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID.
    715694 *
    716  * @param string|array $args Arguments for the sidebar being registered.
     695 * @param array|string $args {
     696 *     Optional. Array or string of arguments for the sidebar being registered.
     697 *
     698 *     @type string $name          The name or title of the sidebar displayed in the admin dashboard.
     699 *     @type string $id            The unique identifier by which the sidebar will be called.
     700 *     @type string $before_widget HTML content that will be prepended to each widget's HTML output
     701 *                                 when assigned to this sidebar.
     702 *     @type string $after_widget  HTML content that will be appended to each widget's HTML output
     703 *                                 when assigned to this sidebar.
     704 *     @type string $before_title  HTML content that will be prepended to the sidebar title when displayed.
     705 *     @type string $after_title   HTML content that will be appended to the sidebar title when displayed.
     706 * }
    717707 * @return string Sidebar ID added to $wp_registered_sidebars global.
    718708 */
    719709function register_sidebar($args = array()) {