Plugin / Asynchronous Widgets

Frequently Asked Questions (FAQ)

The plugin replaces the callback a widget has registered with the WordPress.org engine with one of its own. When that callback is invoked, instead of outputting the widget content, it outputs a customized chunk of HTML. That chunk contains information that will be parsed on the client side, after the page is loaded, by a short bit of JavaScript this plugin also injects on the page. This will result in an AJAX call to the server delivering the actual widget content (one call for each widget). The HTML also contains a
Good question. I don’t know. It seemed like a froody idea. More seriously though, the main motivation for writing this was an instance where I wanted the contents of a specific widget NOT appear to search engine crawlers. Since with this plugin, the widget content won’t be visible unless JavaScript is enabled, this seemed the perfect way to achieve that goal. I’m anxious to see whether it can have any other uses, though. I am also aware that the purpose stated above isn’t entirely uncontroversial. In terms of performance, this plugin will most definitely increase your pages’ delivery speed (in proportion to how many and how “heavy” widgets you have), andprobably not increase your server’s load average significantly.
Yet another good question. I’m not sure, but I’m trusting you to help me find out. I’ve tested it successfully with a very few custom widgets. But there might be problems, due to one significant change this plugin introduces. Namely, the fact that it detaches the widget display callback from the rest of the WordPress loop (the widget callback is invoked asynchronously, thus outside of the loop). If a custom widget makes some non-persistent changes somewhere in the loop AND relies on those changes in its display callback, there MAY be compatibility problems. One specific instance I’ve encountered was with the WP Widget Cache plugin (https://wordpress.org/extend/plugins/wp-widget-cache/) (which doesn’t work with WordPress 2.9, anyway). I had to integrate a little hack (essentially, making the changes WidgetCache performs persistent) to ensure compatibility with it. Other such conficts might arise. If you encounter one, please provide some feedback.
This plugin has been developped with PHP version 5.3.1.
You can hook on the action that outputs the proxy HMTL code: async_widgets_output_proxy_html. You can filter on the action that outputs the proxy HTML code: async_widgets_output_proxy_html_filter. Each of these take one argument: the “widget settings” array as would normally be passed to the widget display callback (they’ll be invoked once for each widget). If using the filter, you MUST return that value, lest you want to supress the widget’s output.
No. Go buy yourself something nice.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.