Ticket #24720: 24720.patch
File 24720.patch, 1.5 KB (added by , 11 years ago) |
---|
-
wp-includes/widgets.php
833 833 /** 834 834 * Display dynamic sidebar. 835 835 * 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. 841 839 * 842 * It is confusing for the $index parameter, but just know that it should just843 * work. When you register the sidebar in the theme, you will use the same name844 * for this function or "Pay no heed to the man behind the curtain." Just accept845 * it as an oddity of WordPress sidebar register and display.846 *847 840 * @since 2.2.0 848 841 * 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. 850 843 * @return bool True, if widget sidebar was found and called. False if not found or not called. 851 844 */ 852 845 function dynamic_sidebar($index = 1) {