mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-10 22:06:55 +01:00
Document the default arguments for register_sidebars()
in the hash notation style.
Props coffee2code. See #28298. Built from https://develop.svn.wordpress.org/trunk@30769 git-svn-id: http://core.svn.wordpress.org/trunk@30759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7c01a454ce
commit
2a9c5910c6
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-beta2-30768';
|
$wp_version = '4.1-beta2-30769';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
@ -627,22 +627,26 @@ function unregister_widget($widget_class) {
|
|||||||
*
|
*
|
||||||
* If you wanted to quickly create multiple sidebars for a theme or internally.
|
* If you wanted to quickly create multiple sidebars for a theme or internally.
|
||||||
* This function will allow you to do so. If you don't pass the 'name' and/or
|
* This function will allow you to do so. If you don't pass the 'name' and/or
|
||||||
* 'id' in $args, then they will be built for you.
|
* 'id' in `$args`, then they will be built for you.
|
||||||
*
|
|
||||||
* The default for the name is "Sidebar #", with '#' being replaced with the
|
|
||||||
* number the sidebar is currently when greater than one. If first sidebar, the
|
|
||||||
* name will be just "Sidebar". The default for id is "sidebar-" followed by the
|
|
||||||
* number the sidebar creation is currently at. If the id is provided, and multiple
|
|
||||||
* sidebars are being defined, the id will have "-2" appended, and so on.
|
|
||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here.
|
* @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here.
|
||||||
*
|
*
|
||||||
* @param int $number Number of sidebars to create.
|
* @param int $number Optional. Number of sidebars to create. Default 1.
|
||||||
* @param string|array $args Builds Sidebar based off of 'name' and 'id' values.
|
* @param array|string $args {
|
||||||
|
* Optional. Array or string of arguments for building a sidebar.
|
||||||
|
*
|
||||||
|
* @type string $id The base string of the unique identifier for each sidebar. If provided, and multiple
|
||||||
|
* sidebars are being defined, the id will have "-2" appended, and so on.
|
||||||
|
* Default 'sidebar-' followed by the number the sidebar creation is currently at.
|
||||||
|
* @type string $name The name or title for the sidebars displayed in the admin dashboard. If registering
|
||||||
|
* more than one sidebar, include '%d' in the string as a placeholder for the uniquely
|
||||||
|
* assigned number for each sidebar.
|
||||||
|
* Default 'Sidebar' for the first sidebar, otherwise 'Sidebar %d'.
|
||||||
|
* }
|
||||||
*/
|
*/
|
||||||
function register_sidebars($number = 1, $args = array()) {
|
function register_sidebars( $number = 1, $args = array() ) {
|
||||||
global $wp_registered_sidebars;
|
global $wp_registered_sidebars;
|
||||||
$number = (int) $number;
|
$number = (int) $number;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user