{"id":65759,"date":"2017-01-30T22:16:11","date_gmt":"2017-01-30T22:16:11","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ajax-content\/"},"modified":"2017-01-30T22:16:11","modified_gmt":"2017-01-30T22:16:11","slug":"ajax-content","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/ajax-content\/","author":13434591,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"","stable_tag":"trunk","tested":"","requires":"","requires_php":"","requires_plugins":"","header_name":"ajax-content","header_author":"","header_description":"","assets_banners_color":"","last_updated":"2017-01-30 22:16:11","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/bnpdesigngroup.com\/assets\/wordpress\/bnp-ajax-content.zip","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":482,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":[],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-65759","plugin","type-plugin","status-closed","hentry","plugin_committers-jproffitt71"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/ajax-content.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"","raw_excerpt":"<p>This is my first formal submission.<\/p>\n<p>This plugin addresses an issue I&#039;ve had for a long time when using dynamic shortcodes with full page cache plugins like WP Super Cache. They don&#039;t provide good controls for choosing what to cache and what not to cache on the page. Most of them only provide url blacklists, and when the dynamic shortcodes are in a place that is visible on all pages, that&#039;s not an effective tool. Some plugins provide their own solutions for this, but not enough of them to matter.<\/p>\n<p>This gets around that issue with as simple an approach as possible, by providing a shortcode interface to ask the server to re-render parts of the page asynchronously using javascript that can be cached. It uses openssl (and mcrypt as a fallback) to ensure this doesn&#039;t open up a vulnerability for malicious users to exploit vulnerable shortcodes on the server.<\/p>\n<p>The name is unfortunately generic, but encompasses the general nature of the solution. I searched for hours but could not find anything like this that A) worked and B) worked on arbitrary content.<\/p>\n<p>From the readme.txt: <\/p>\n<p>This plugin lets you load arbitrary html \/ shortcode content on your page with javascript after it has loaded.<\/p>\n<p>Why do this? When you&#039;re using a full page cache plugin like [WP Super Cache](https:\/\/wordpress.org\/plugins\/wp-super-cache\/) that saves the full page to a static html file, you put a constraint on how dynamic your content can be. If you have dynamic content on the page that you want to always be up to date, you have two options. The first is to blacklist the page that content appears on with your cache plugin so it doesn&#039;t try to cache it. This has many downsides and doesn&#039;t work when the dynamic content appears in a spot that is shared across all your pages like the header or footer.<\/p>\n<p>The second is to load that content dynamically with javascript after the page has loaded. That usually means writing a lot of custom javascript code that is very fragile to changes.<\/p>\n<p>This plugin eliminates that problem for you. Once activated, you can just wrap content that you want to be reloaded in a <code>[ajax_content]<\/code> shortcode, and the plugin will automatically make the server re-render just that content and insert it back into the page.<\/p>\n<p>This plugin supports rendering html and shortcodes (but not raw PHP). This would normally pose a potential security vulnerability, but this plugin utilizes OpenSSL cryptography to verify that only content that you wrapped in <code>[ajax_content]<\/code> shortcodes can be rendered, and that the original code for generating that content is never knowable by the client.\n<\/p>","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/65759","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=65759"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jproffitt71"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=65759"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=65759"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=65759"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=65759"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=65759"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=65759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}