{"id":3346,"date":"2008-07-08T23:06:59","date_gmt":"2008-07-08T23:06:59","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/anyvar\/"},"modified":"2008-07-08T23:23:09","modified_gmt":"2008-07-08T23:23:09","slug":"anyvar","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/anyvar\/","author":690998,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1.1","stable_tag":"0.1.1","tested":"2.5.1","requires":"2.0.0","requires_php":"","requires_plugins":"","header_name":"AnyVar","header_author":"Matt Swanson","header_description":"","assets_banners_color":"","last_updated":"2008-07-08 23:23:09","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.devspace.com.au\/anyvar\/","header_plugin_uri":"http:\/\/www.devspace.com.au\/anyvar\/","header_author_uri":"http:\/\/www.devspace.com.au\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2461,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1623507","resolution":"1","location":"plugin","width":812,"height":501}},"screenshots":{"1":"AnyVar admin &amp; examples"}},"plugin_section":[],"plugin_tags":[2628,662,7852,7853,2276],"plugin_category":[43,57],"plugin_contributors":[90878],"plugin_business_model":[],"class_list":["post-3346","plugin","type-plugin","status-closed","hentry","plugin_tags-insert","plugin_tags-php","plugin_tags-var","plugin_tags-variable","plugin_tags-variables","plugin_category-customization","plugin_category-taxonomy","plugin_contributors-matt_dev","plugin_committers-matt_dev"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/anyvar.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/anyvar\/trunk\/screenshot-1.png?rev=1623507","caption":"AnyVar admin &amp; examples"}],"raw_content":"<!--section=description-->\n<p>AnyVar is a simple text search and replace plugin. It lets you add changeable variables (text snippets) anywhere in your Wordpress blog.<\/p>\n\n<p>AnyVar simplifies any mass changes required on your blog. Easily change affiliate codes, thoughts for the day, ads or anything else throughout your site with a single change in the admin.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin<\/li>\n<li>Unzip &amp; Upload the <code>anyvar<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Active AnyVar in the Plugins admin section<\/li>\n<li>Go to Manage &gt; AnyVar and start using it!<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How do I use AnyVar<\/dt>\n<dd><p>All you need to do is create a variable in the admin section, then add the <code>[variable_tag]<\/code> to your HTML code. This tag can go straight into your posts, pages, themes, links, widgets etc.<\/p><\/dd>\n<dt>What's the use? I could just change it myself<\/dt>\n<dd><p>The beauty (and power) of AnyVar comes into play when you have multiple copies of the same piece of code &amp;\/or text in more than one place. It's almost like a templating system within a templating system (Wordpress).<\/p><\/dd>\n<dt>Go on...<\/dt>\n<dd><p>Ok, consider these examples:<\/p>\n\n<p>You like putting ads inside your posts, but you also like to change advertisers occasionally. So you create a variable called <code>[post_ad]<\/code> which contains the html for the ad. The next month you decide to change the ad, all you do is update the <code>[post_ad]<\/code> variable in the AnyVar admin section, and hey presto, every post you've put your <code>[post_ad]<\/code> tag (could be 5, 50, 100 posts) is automatically instantly change.<\/p>\n\n<p>You've decide to add a 'thought for the day' quote to your blog. You could manually change the theme each day to reflect this, or your could add a <code>[daily_thought]<\/code> variable and update this each day inside the Wordpress admin, without having to touch the theme.<\/p>\n\n<p>The usefulness of this plugin is only limited by your imagination... :)<\/p><\/dd>\n<dt>How does it work<\/dt>\n<dd><p>The non-technical version is that replaces the <code>[variable_tag]<\/code> with the variable text at the end of the process of making the page.<\/p>\n\n<p>The technical version is that it uses PHP's output buffering to do the search \/ replace once Wordpress has finished generating that output.<\/p><\/dd>\n<dt>Doesn't output buffering effect the performance of a PHP script?<\/dt>\n<dd><p>Yes. However, in the relatively small amount of benchmarking I've done, AnyVar has actually slightly lowered the Wordpress page load time (by a few milliseconds). I'd say this is due to cutting down the number of echo \/ output commands sending data to the browser.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"AnyVar is a simple search and replace plugin. It lets you add changeable variables (text snippets) to posts, sidebars, widgets, links &amp; themes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3346","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=3346"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/matt_dev"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3346"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3346"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3346"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3346"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3346"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}