Ticket #28298: 28298.register_sidebars.diff
File 28298.register_sidebars.diff, 1.9 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets.php
629 629 * This function will allow you to do so. If you don't pass the 'name' and/or 630 630 * 'id' in $args, then they will be built for you. 631 631 * 632 * The default for the name is "Sidebar #", with '#' being replaced with the633 * number the sidebar is currently when greater than one. If first sidebar, the634 * name will be just "Sidebar". The default for id is "sidebar-" followed by the635 * number the sidebar creation is currently at. If the id is provided, and multiple636 * sidebars are being defined, the id will have "-2" appended, and so on.637 *638 632 * @since 2.2.0 639 633 * 640 634 * @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here. 641 635 * 642 636 * @param int $number Number of sidebars to create. 643 * @param string|array $args Builds Sidebar based off of 'name' and 'id' values. 637 * @param array|string $args { 638 * Optional. Array or string of arguments for building a sidebar. 639 * 640 * @type string $id The base string of the unique identifier for each sidebar. If provided, and multiple 641 * sidebars are being defined, the id will have "-2" appended, and so on. 642 * Default 'sidebar-' followed by the number the sidebar creation is currently at. 643 * @type string $name The name or title for the sidebars displayed in the admin dashboard. If registering 644 * more than one sidebar, include '%d' in the string as a placeholder for the uniquely 645 * assigned number for each sidebar. 646 * Default 'Sidebar' for the first sidebar, otherwise 'Sidebar %d'. 647 * } 644 648 */ 645 649 function register_sidebars($number = 1, $args = array()) { 646 650 global $wp_registered_sidebars;