{"id":2218,"date":"2007-10-26T21:58:05","date_gmt":"2007-10-26T21:58:05","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/theme-preview\/"},"modified":"2016-02-17T16:20:09","modified_gmt":"2016-02-17T16:20:09","slug":"theme-preview","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/theme-preview\/","author":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4","stable_tag":"1.4","tested":"4.4.34","requires":"2.6.0","requires_php":"","requires_plugins":"","header_name":"Theme Preview","header_author":"Dougal Campbell","header_description":"","assets_banners_color":"","last_updated":"2016-02-17 16:20:09","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/dougal.gunters.org\/donate","header_plugin_uri":"http:\/\/dougal.gunters.org\/plugins\/theme-preview","header_author_uri":"http:\/\/dougal.gunters.org\/","rating":5,"author_block_rating":0,"active_installs":300,"downloads":41494,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[356,830,2475,1591,1249],"plugin_category":[43,59],"plugin_contributors":[77598],"plugin_business_model":[],"class_list":["post-2218","plugin","type-plugin","status-publish","hentry","plugin_tags-css","plugin_tags-presentation","plugin_tags-preview","plugin_tags-testing","plugin_tags-themes","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-dougal","plugin_committers-dougal"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/theme-preview.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>By default, the only way to see how a new theme looks on your site is to\nactivate it, making it visible to everyone who visits. With this plugin, it\nis possible to view how a new theme looks without activating it.<\/p>\n\n<h3>TODO<\/h3>\n\n<p>Possible future enhancements:<\/p>\n\n<ul>\n<li>Add an options screen.<\/li>\n<li>Allow choice of theme to preview from a known list of installed themes.<\/li>\n<li>Provide persistent previews by setting a cookie.<\/li>\n<li>Restrict preview ability by user Roles\/Capabilities.<\/li>\n<li>Child-theme friendliness.<\/li>\n<\/ul>\n\n<h3>Notes<\/h3>\n\n<p>May not work properly with child themes. This is because it will not be able\nto inherit from the parent theme as it normally would.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>theme-preview<\/code> folder and its contents to your <code>wp-contents\/plugins<\/code> directory.<\/li>\n<li>Activate in the <code>Plugins<\/code> menu.<\/li>\n<li>Visit your site with a special parameter added to the URL<\/li>\n<\/ol>\n\n<p>Add query variables <code>preview_theme<\/code> and\/or <code>preview_css<\/code> to your query\nstring. For example, if you have a theme named \"My Theme\", which is\ninstalled in your <code>wp-content\/themes\/my-theme<\/code> directory, add the theme's\ndirectory name to your URL like this:<\/p>\n\n<pre><code>http:\/\/example.com\/index.php?preview_theme=my-theme\n<\/code><\/pre>\n\n<p>Sometimes, you create a new look for your site by just making new CSS, but\nyou keep the existing PHP files intact. In that case, you con use the \n    preview_css variable instead of <code>preview_theme<\/code>, or use them both\ntogether, like this:<\/p>\n\n<pre><code>http:\/\/example.com\/index.php?preview_theme=default&amp;preview_css=my-theme\n<\/code><\/pre>\n\n<!--section=changelog-->\n<h4>1.4 2016-02-17<\/h4>\n\n<ul>\n<li>SECURITY: Eliminate directory traversal, limit themes to registered directories.<\/li>\n<\/ul>\n\n<h4>1.3 2015-08-26<\/h4>\n\n<ul>\n<li>Fixed to work with newer versions of WordPress.<\/li>\n<\/ul>\n\n<h4>1.2 2010-01-14<\/h4>\n\n<ul>\n<li>Tested with WordPress 3.0-alpha<\/li>\n<\/ul>","raw_excerpt":"Allows you test how a theme looks on your site without activating it.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2218"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dougal"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2218"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2218"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2218"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2218"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2218"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}