Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Nacin
9223056bb3 Fix logic inversion in [28124] to ensure widgets stay with themes during a theme switch.
fixes #27897.


git-svn-id: https://develop.svn.wordpress.org/trunk@28161 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-19 18:11:24 +00:00
Andrew Nacin
a8efcb993f Customizer: Properly handle widget settings when activating a previewed theme.
props westonruter, ocean90, gcorne.
fixes #27767.


git-svn-id: https://develop.svn.wordpress.org/trunk@28124 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-14 22:45:40 +00:00
Dominik Schilling (ocean90)
bccc4ea750 Fix whitespace around $GLOBALS['_wp_deprecated_widgets_callbacks'] .
git-svn-id: https://develop.svn.wordpress.org/trunk@27967 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-06 18:49:48 +00:00
Dominik Schilling (ocean90)
a2c020e068 WP_Widget: Introduce is_preview() method.
With the Widget Customizer it's possible that previewed widgets can leak data outside of Customizer, when the widget uses the cache API.
The Customizer calls the regular update callback which should already refresh the cache. Since cache additions aren't blocked yet the cache can be filled with preview data.
To prevent this issue `WP_Widget::is_preview()` will return true, when `$wp_customize->is_preview()` returns true. If `is_preview()` is true, cache additions are suspended via `wp_suspend_cache_addition()`. Make sure your object cache drop-in has implemented `wp_suspend_cache_addition()`.

`is_preview()` can/should also be used inside `WP_Widget::widget()`, see WP_Widget_Recent_Posts or WP_Widget_Recent_Comments for examples.

For more info see IRC logs: http://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2014-04-02&sort=asc#m824279

props westonruter.
fixes #27538.

git-svn-id: https://develop.svn.wordpress.org/trunk@27966 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-06 18:47:46 +00:00
Drew Jaynes (DrewAPicture)
cfaf65d392 Inline documentation for hooks in wp-includes/widgets.php.
Props eliorivero and Nessworthy for the initial patches. Props kpdesign.
Fixes #27129.


git-svn-id: https://develop.svn.wordpress.org/trunk@27870 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-31 07:29:29 +00:00
Dominik Schilling (ocean90)
a339826668 Widget Customizer: Make temp hooks final and add inline docs.
New hooks are `dynamic_sidebar_before`, `dynamic_sidebar_after`, `dynamic_sidebar_has_widgets ` and `is_active_sidebar`.
Remove obsolete use of hacky dynamic_sidebar hook.

props westonruter, DrewAPicture.
fixes #25368.

git-svn-id: https://develop.svn.wordpress.org/trunk@27543 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-14 20:30:54 +00:00
Sergey Biryukov
ddb1f3e7ca Remove unused code from WP_Widget::update_callback().
props OriginalEXE.
fixes #24733.

git-svn-id: https://develop.svn.wordpress.org/trunk@27224 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-21 18:50:08 +00:00
Drew Jaynes
bd39e26032 First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.


git-svn-id: https://develop.svn.wordpress.org/trunk@26868 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-24 18:56:05 +00:00
Andrew Nacin
53a59c01a8 Temporary hooks for the widgets feature team in dynamic_sidebar() and is_active_sidebar().
props westonruter.
fixes #25368.


git-svn-id: https://develop.svn.wordpress.org/trunk@25580 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-23 20:13:58 +00:00
Andrew Nacin
b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00