{"id":8266,"date":"2010-02-26T06:19:45","date_gmt":"2010-02-26T06:19:45","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/asynchronous-widgets\/"},"modified":"2012-03-31T23:19:22","modified_gmt":"2012-03-31T23:19:22","slug":"asynchronous-widgets","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/asynchronous-widgets\/","author":5814165,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.1","stable_tag":"1.1.1","tested":"3.3.2","requires":"2.8.6","requires_php":"","requires_plugins":"","header_name":"Asynchronous Widgets","header_author":"Daniele Futtorovic","header_description":"","assets_banners_color":"","last_updated":"2012-03-31 23:19:22","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":10,"downloads":2882,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.1.0":"<p>Storing the widget callback parameters in the database was most probably\na bad idea, since they may be different from user to user, at least in theory.<\/p>","1.1.1":"<p>Asynchorous Widgets has been updated to be compatible with WordPress 3.3.1<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"3"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566889","resolution":"1","location":"plugin"}},"screenshots":{"1":"The plugin settings page in the admin section. This is pretty much the only visible\neffect of this plugin."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[221,8858,241],"plugin_category":[43,59],"plugin_contributors":[92610],"plugin_business_model":[],"class_list":["post-8266","plugin","type-plugin","status-closed","hentry","plugin_tags-ajax","plugin_tags-asynchronous","plugin_tags-widgets","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-dafutt","plugin_committers-dafutt"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/asynchronous-widgets.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/asynchronous-widgets\/trunk\/screenshot-1.png?rev=1566889","caption":"The plugin settings page in the admin section. This is pretty much the only visible\neffect of this plugin."}],"raw_content":"<!--section=description-->\n<p>Asynchronous Widgets allows you to have any registered widget on your WordPress.org-powered\nsite be loaded asynchronously via an AJAX call. It is configured via the admin panel. No further integration is required.<\/p>\n\n<h3>Arbitrary section<\/h3>\n\n<h4>TODO<\/h4>\n\n<ul>\n<li>I18N<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin;<\/li>\n<li>Extract the plugin archive to <code>\/wp-content\/plugins<\/code>;<\/li>\n<li>Activate the plugin through the 'Plugins' menu in the administration section;<\/li>\n<li>Configure the plugin via its settings page;<\/li>\n<li>That's all.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How does it work?<\/dt>\n<dd><p>The plugin replaces the callback a widget has registered with the WordPress.org engine\nwith one of its own. When that callback is invoked, instead of outputting the widget content,\nit outputs a customized chunk of HTML. That chunk contains information that will be parsed\non the client side, after the page is loaded, by a short bit of JavaScript this plugin also\ninjects on the page. This will result in an AJAX call to the server delivering the actual\nwidget content (one call for each widget).\nThe HTML also contains a <code>&lt;noscript&gt;<\/code> block with some information, in case JavaScript\nshouldn't be enabled.<\/p>\n\n<p>This mechanism is set to run on the <code>wp_head<\/code> action hook, at priority 2^17.<\/p><\/dd>\n<dt>What's it good for?<\/dt>\n<dd><p>Good question. I don't know. It seemed like a froody idea.<\/p>\n\n<p>More seriously though, the main motivation for writing this was an instance where I wanted\nthe contents of a specific widget NOT appear to search engine crawlers. Since with this\nplugin, the widget content won't be visible unless JavaScript is enabled, this seemed\nthe perfect way to achieve that goal.<\/p>\n\n<p>I'm anxious to see whether it can have any other uses, though.\nI am also aware that the purpose stated above isn't entirely uncontroversial.<\/p>\n\n<p>In terms of performance, this plugin will most definitely increase your pages' \ndelivery speed (in proportion to how many and how \"heavy\" widgets you have), and \n<em>probably not<\/em> increase your server's load average significantly.<\/p><\/dd>\n<dt>Is it compatible with custom widgets and\/or other plugins?<\/dt>\n<dd><p>Yet another good question. I'm not sure, but I'm trusting you to help me find out.<\/p>\n\n<p>I've tested it successfully with a very few custom widgets. But there might be problems,\ndue to one significant change this plugin introduces. Namely, the fact that it detaches\nthe widget display callback from the rest of the WordPress loop (the widget callback is\ninvoked asynchronously, thus outside of the loop). <strong>If a custom widget makes some\nnon-persistent changes somewhere in the loop AND relies on those changes in its\ndisplay callback, there MAY be compatibility problems<\/strong>.<\/p>\n\n<p>One specific instance I've encountered was with the WP Widget Cache plugin\n(http:\/\/wordpress.org\/extend\/plugins\/wp-widget-cache\/) (which doesn't work with WordPress\n2.9, anyway). I had to integrate a little hack (essentially, making the changes WidgetCache\nperforms persistent) to ensure compatibility with it.<\/p>\n\n<p>Other such conficts might arise. If you encounter one, please provide some <a href=\"http:\/\/wordpress.org\/tags\/asynchronous-widgets?forum_id=10\">feedback<\/a>.<\/p><\/dd>\n<dt>Which PHP version does it use?<\/dt>\n<dd><p>This plugin has been developped with PHP version 5.3.1.<\/p><\/dd>\n<dt>Can I get hooked?<\/dt>\n<dd><ul>\n<li>You can hook on the action that outputs the proxy HMTL code: <code>async_widgets_output_proxy_html<\/code>.<\/li>\n<li>You can filter on the action that outputs the proxy HTML code: <code>async_widgets_output_proxy_html_filter<\/code>.<\/li>\n<\/ul>\n\n<p>Each of these take one argument: the \"widget settings\" array as would normally be passed\nto the widget display callback (they'll be invoked once for each widget).<\/p>\n\n<p>If using the filter, you MUST return that value, lest you want to supress the widget's output.<\/p><\/dd>\n<dt>Can I donate?<\/dt>\n<dd><p>No. Go buy yourself something nice.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Moved widget callback parameter persistence (between page call and AJAX call)\nfrom database to PHP $_SESSION, because it doesn't belong in the former.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Picked up this old project and made it work with the lastest WordPress version.<\/li>\n<\/ul>","raw_excerpt":"Asynchronous Widgets allows you to have any registered widget on your WordPress.org-powered\nsite be loaded asynchronously via an AJAX call.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8266"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dafutt"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8266"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8266"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8266"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8266"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8266"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}