Changeset 30769
- Timestamp:
- 12/07/2014 11:00:57 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r30745 r30769 628 628 * If you wanted to quickly create multiple sidebars for a theme or internally. 629 629 * This function will allow you to do so. If you don't pass the 'name' and/or 630 * 'id' in $args, then they will be built for you. 631 * 632 * The default for the name is "Sidebar #", with '#' being replaced with the 633 * number the sidebar is currently when greater than one. If first sidebar, the 634 * name will be just "Sidebar". The default for id is "sidebar-" followed by the 635 * number the sidebar creation is currently at. If the id is provided, and multiple 636 * sidebars are being defined, the id will have "-2" appended, and so on. 630 * 'id' in `$args`, then they will be built for you. 637 631 * 638 632 * @since 2.2.0 … … 640 634 * @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here. 641 635 * 642 * @param int $number Number of sidebars to create. 643 * @param string|array $args Builds Sidebar based off of 'name' and 'id' values. 644 */ 645 function register_sidebars($number = 1, $args = array()) { 636 * @param int $number Optional. Number of sidebars to create. Default 1. 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 * } 648 */ 649 function register_sidebars( $number = 1, $args = array() ) { 646 650 global $wp_registered_sidebars; 647 651 $number = (int) $number;
Note: See TracChangeset
for help on using the changeset viewer.