Andrew Nacin
90f95e0204
new does not require by reference.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18995 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-18 20:20:59 +00:00
Ryan Boren
8e77c91883
* Move the old sidebars_widgets array upgrade code to wp-admin/includes/upgrade.php
...
* Avoid infinite loop with wp_get_sidebars_widgets()
* Remove two unneeded wp_get_sidebars_widgets() calls
* Remove unused $wp_registered_sidebars variable from wp_get_sidebars_widgets().
* Combine a couple of !empty( $sidebars_widgets ) checks in retrieve_widgets()
Props SergeyBiryukov, lancewillett. fixes #17979 #18598
git-svn-id: https://develop.svn.wordpress.org/trunk@18821 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 21:41:22 +00:00
Peter Westwood
321e31c58b
A little bit of whitespace keeps the code readable.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18678 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-15 10:09:45 +00:00
Andrew Ozz
7b2c49d219
Make check_theme_switched() run an action so this enhancement is available to plugins and themes too, see #17979
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18655 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 20:07:15 +00:00
Andrew Ozz
808ea899ad
Use theme mods instead of transients for storing the previous theme's widgets config, props aaroncampbell, see #17979
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18654 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 19:25:20 +00:00
Jon Cave
82c0f09c09
Fix typos in documentation (wp-includes/[i-z]). See #18560 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18639 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-05 19:08:15 +00:00
Andrew Ozz
4782c3dc6f
Avoid losing widgets when switching themes - take one, props aaroncampbell, see #17979
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18630 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-02 22:13:55 +00:00
Nikolay Bachiyski
13181c96c8
Explicitly globalize some variables, so that unit tests can run WordPress inside a function. Fixes #17749
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18532 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-11 04:45:14 +00:00
Andrew Nacin
959f4e03c4
s/displayied/displayed/. props kawauso, fixes #17633 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18096 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-01 16:44:13 +00:00
Ryan Boren
e7a943c60c
Remove PHP4 constructors. Props scribu. fixes #16768
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17655 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-18 21:46:57 +00:00
Andrew Nacin
fd76a68a2d
Bail early in dynamic_sidebar() if there are no sidebars. fixes #14816 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17545 602fd350-edb4-49c9-b593-d223f7449a82
2011-03-23 18:59:52 +00:00
Andrew Nacin
9a53e46ff5
Revert [15994] for now, as the default widgets then go through an identity crisis. see #14876 , #15493 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@16521 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-21 13:48:35 +00:00
Andrew Nacin
bcbb15ca21
Return empty array in wp_get_sidebars_widgets() if no sidebars are defined. fixes #14876 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@15994 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-27 01:56:54 +00:00
Andrew Nacin
9494e4ce7e
Phpdoc argument/@param cleanups. props duck_, see #14783 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@15590 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 11:21:11 +00:00
Ryan Boren
d783952469
Strip trailing whites.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@14404 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:26:11 +00:00
Ryan Boren
1796f678ff
Hooks for the widgets api. Props ptahdunbar. fixes #12546
...
git-svn-id: https://develop.svn.wordpress.org/trunk@14382 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 19:01:43 +00:00
Mark Jaquith
0a658396a5
Make sure sidebars_widgets is an array. If it is a string (no idea how, but it happens), we get a fatal error
...
git-svn-id: https://develop.svn.wordpress.org/trunk@14320 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-30 17:37:42 +00:00
Andrew Nacin
7369d04015
Use wp_parse_args in register_sidebar. fixes #11836 , props scribu.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@14154 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-18 15:32:39 +00:00
Ryan Boren
eeb49f6bef
Enable nav menu admin if theme supports widgets. Show notice if theme supports widgets but not nav-menus. see #11817
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13810 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-24 18:35:31 +00:00
Andrew Nacin
dd306def81
Remove redundant isset() and empty() checks.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13770 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-19 21:29:21 +00:00
Dion Hulse
f80cc183fa
Restore backwards compatibility of integer sidebars("sidebar-$i"). See #12606
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13701 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-14 12:12:23 +00:00
Dion Hulse
20a430c8fb
Revert [13699], It breaks dynamic_sidebar(<int>) compatibility. Use a safer loop for clashes. See #12606
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13700 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-14 11:58:53 +00:00
Dion Hulse
bd619cdb60
Simplify the Id uniqueness loops. Guard against more use-cases which might cause ID conflicts. See #12606
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13699 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-14 11:34:51 +00:00
Dion Hulse
a486d9ed55
Ensure that for multiple sidebar additions, the ID is unique (even if specified). Append -2.. for > 1 sidebars. Props minusfive. Fixes #12606
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13698 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-14 10:55:17 +00:00
Andrew Nacin
03695fa9ae
Move deprecated pre-2.8 widget API to deprecated.php. Deprecate register_sidebar_widget, unregister_sidebar_widget, register_widget_control, unregister_widget_control, in favor of their wp_* counterparts. See #11388
...
git-svn-id: https://develop.svn.wordpress.org/trunk@13098 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-13 07:55:28 +00:00
Peter Westwood
2e2ad12171
Add missing version numbers to _deprecated_argument() calls.
...
Remove deprecated argument from xfn_check() calls.
Pass version number to deprecated_file_included, deprecated_function_run and deprecated_argument_run actions.
Fixes #11386 props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@12680 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-09 10:03:55 +00:00
Peter Westwood
a752e6b561
Updates and improvements to _depreceated_argument. See #11386 props nacin.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12584 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-30 16:23:39 +00:00
Peter Westwood
b607185b4e
Fix typo in _deprecated_argument() and start using _deprecated_argument() in wp-includes files. See #11386 props nacin.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12537 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-24 11:12:04 +00:00
Andrew Ozz
b15bee6f1a
Always register all widgets, props hakre, fixes #10954
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12249 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-21 03:40:55 +00:00
Andrew Ozz
7c3f9cf02b
Add sidebar descriptions to sidebar settings and widget admin screen, props jeremyclarke scribu, fixes #11157
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12213 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-19 09:12:16 +00:00
Andrew Ozz
987dcbda89
Fix warning in wp-admin/widgets.php when using Accessibility Mode on brand new install, fixes #10610
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11824 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-16 01:56:21 +00:00
Andrew Ozz
484f514706
Convert the old style widgets order array only when loading the widgets screen, fixes #10300 for trunk
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11691 602fd350-edb4-49c9-b593-d223f7449a82
2009-07-04 12:49:54 +00:00
Andrew Ozz
59b44738e0
is_active_sidebar() should use wp_get_sidebars_widgets(), props greenshady and Denis-de-Bernardy, fixes #10136
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11562 602fd350-edb4-49c9-b593-d223f7449a82
2009-06-14 08:37:07 +00:00
Andrew Ozz
cc77d3b710
Improve widgets hooks, props Denis-de-Bernardy, fixes #10013
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11510 602fd350-edb4-49c9-b593-d223f7449a82
2009-06-03 11:33:17 +00:00
Andrew Ozz
f1b8716b93
Reload the widget form with the ajax response after save, add Close link to the widgets, don't auto-close on save to show possible errors returned from validation
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11498 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-31 11:34:08 +00:00
Ryan Boren
e72a01fdc8
Fix widget unregister back-compat. fixes #9952
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11484 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-29 16:32:20 +00:00
Ryan Boren
e12c642c54
Trim tailing whitespace
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11450 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-24 23:47:49 +00:00
Andrew Ozz
29ed683636
Fix saving and deleting of widgets settings for no-js and for some non-standard widgets, run the actions from the widgets screen when saving with ajax, see #9511
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11427 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-22 12:08:51 +00:00
Mark Jaquith
f0336cfa7d
deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11380 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-18 15:11:07 +00:00
Andrew Ozz
4bf2deac13
Add param to the widget_display_callback hook, props Denis-de-Bernardy, fixes #9852
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11374 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-17 19:36:28 +00:00
Andrew Ozz
765f9798d4
Add a function to output a generic widget anywhere in a template, props Denis-de-Bernardy, fixes #9701
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11317 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-13 20:43:49 +00:00
Ryan Boren
c3d1eafb7d
Fix widget registration with PHP 4. see #9800
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11310 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-12 19:17:30 +00:00
Andrew Ozz
58a1c4ac9e
Lowercase widgets $id_base, props Denis-de-Bernardy, fixes #9797
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11308 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-12 17:56:04 +00:00
Peter Westwood
8e3c9121f8
Fix notices when an in-use widget is deleted. See #9393 props nbachiyski
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11229 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-07 06:59:06 +00:00
Andrew Ozz
a2bbfe9f26
Make is_active_widget() optionally look in 'wp_inactive_widgets' for use in the admin
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11164 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-03 23:20:26 +00:00
Andrew Ozz
d578c68a73
Widgets UI styling, see #9511
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11160 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-03 05:27:13 +00:00
Andrew Ozz
d9e724974f
Add action "in_widget_form" allowing plugins to add extra fields, don't show "Save" button if a widget doesn't have settings form, fixes #9651
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11155 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-02 00:21:16 +00:00
Andrew Ozz
b1c90ff067
Add is_active_sidebar(), props filosofo, fixes #4594
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11134 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-30 04:26:34 +00:00
Ryan Boren
eedcfbbc2b
Remove call-time pass-by-ref. Props jbsil. see #9651
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11097 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-27 16:09:49 +00:00
Andrew Ozz
93ce9fc60b
Add hooks to WP_Widget, props ceenz, fixes #9651 , see #8441
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11095 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-27 10:56:29 +00:00