Make WordPress Core

Ticket #24720: 24720.patch

File 24720.patch, 1.5 KB (added by johnbillion, 11 years ago)
  • wp-includes/widgets.php

     
    833833/**
    834834 * Display dynamic sidebar.
    835835 *
    836  * By default it displays the default sidebar or 'sidebar-1'. The 'sidebar-1' is
    837  * not named by the theme, the actual name is '1', but 'sidebar-' is added to
    838  * the registered sidebars for the name. If you named your sidebar 'after-post',
    839  * then the parameter $index will still be 'after-post', but the lookup will be
    840  * for 'sidebar-after-post'.
     836 * By default this displays the default sidebar or 'sidebar-1'. If your theme specifies the 'id' or
     837 * 'name' parameter for its registered sidebars you can pass an id or name as the $index parameter.
     838 * Otherwise, you can pass in a numerical index to display the sidebar at that index.
    841839 *
    842  * It is confusing for the $index parameter, but just know that it should just
    843  * work. When you register the sidebar in the theme, you will use the same name
    844  * for this function or "Pay no heed to the man behind the curtain." Just accept
    845  * it as an oddity of WordPress sidebar register and display.
    846  *
    847840 * @since 2.2.0
    848841 *
    849  * @param int|string $index Optional, default is 1. Name or ID of dynamic sidebar.
     842 * @param int|string $index Optional, default is 1. Index, name or ID of dynamic sidebar.
    850843 * @return bool True, if widget sidebar was found and called. False if not found or not called.
    851844 */
    852845function dynamic_sidebar($index = 1) {