Commit Graph

7 Commits

Author SHA1 Message Date
Scott Taylor
627e7a56d3 Widgets: when passing a string arg value to dynamic_sidebar(), don't reset $index when the arg's sanitized value matches the sanitized name of a sidebar.
Adds unit test.

Props tyxla, fjarrett.
Fixes #23423.

Built from https://develop.svn.wordpress.org/trunk@34465


git-svn-id: http://core.svn.wordpress.org/trunk@34429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 00:30:24 +00:00
Drew Jaynes
783876bd1a Docs: The Widget API is singular.
See #33701.

Built from https://develop.svn.wordpress.org/trunk@34392


git-svn-id: http://core.svn.wordpress.org/trunk@34356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 12:28:27 +00:00
Scott Taylor
c1bb5b5ce3 After [33843], update the location of some files in This filter is documented in docs
Props dimadin.
See #33413.

Built from https://develop.svn.wordpress.org/trunk@33954


git-svn-id: http://core.svn.wordpress.org/trunk@33923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 22:17:26 +00:00
Drew Jaynes
0ce0241740 Docs: Clarify the file header summary for widget-functions.php, introduced in [33746].
See #33413. See #33701.

Built from https://develop.svn.wordpress.org/trunk@33871


git-svn-id: http://core.svn.wordpress.org/trunk@33839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 02:58:20 +00:00
Scott Taylor
9b8169bd30 Move widget classes to their own files in wp-includes/widgets:
* `default-widgets.php` now requires all of the individual classes
* Move the functions scattered about this file to `widget-functions.php`, which loads before `default-widgets.php`, which only conditionally loads anyway in `wp_maybe_load_widgets()`, which is hooked on `plugins_loaded` 

See #33413, #23012.

Built from https://develop.svn.wordpress.org/trunk@33843


git-svn-id: http://core.svn.wordpress.org/trunk@33811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-01 13:49:21 +00:00
Drew Jaynes
f21cb339db Docs: Add a file header description and @since version to wp-includes/widget-functions.php, introduced in [33746].
Also adds sub-section headers per the inline documentation standards for syntax.

See [33746]. See #33413.

Built from https://develop.svn.wordpress.org/trunk@33757


git-svn-id: http://core.svn.wordpress.org/trunk@33725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 07:57:20 +00:00
Scott Taylor
c3565b2cba Widgets: move classes into their own files, widgets.php loads the new files, so this is 100% BC if someone is loading widgets.php directly. New files created using svn cp.
Creates: 
`class-wp-widget.php` 
`class-wp-widget-factory.php` 
`widget-functions.php` 

`widgets.php` contains only top-level code. Class files only contain classes. Functions file only contains functions.

See #33413.

Built from https://develop.svn.wordpress.org/trunk@33746


git-svn-id: http://core.svn.wordpress.org/trunk@33714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 02:40:23 +00:00