{"id":36117,"date":"2015-05-04T19:15:41","date_gmt":"2015-05-04T19:15:41","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/screenshot-generator\/"},"modified":"2015-05-05T11:57:06","modified_gmt":"2015-05-05T11:57:06","slug":"screenshot-generator","status":"publish","type":"plugin","link":"https:\/\/da.wordpress.org\/plugins\/screenshot-generator\/","author":7709585,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.7","stable_tag":"0.1.7","tested":"4.2.39","requires":"4.0.0","requires_php":"","requires_plugins":"","header_name":"Screenshot Generator","header_author":"Lasse Bunk","header_description":"","assets_banners_color":"","last_updated":"2015-05-05 11:57:06","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/lassebunk\/screenshot-generator","header_author_uri":"https:\/\/github.com\/lassebunk","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2130,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"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","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1153204","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1153204","resolution":"2","location":"assets"}},"screenshots":{"1":"How the screenshot will look when shared in social media.","2":"The settings page."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[55143,2475,55142,4038,174],"plugin_category":[50,56],"plugin_contributors":[87186],"plugin_business_model":[],"class_list":["post-36117","plugin","type-plugin","status-publish","hentry","plugin_tags-phantomjs","plugin_tags-preview","plugin_tags-screendump","plugin_tags-screenshot","plugin_tags-social","plugin_category-media","plugin_category-social-and-sharing","plugin_contributors-lassebunk","plugin_committers-lassebunk"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/screenshot-generator.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/screenshot-generator\/assets\/screenshot-1.png?rev=1153204","caption":"How the screenshot will look when shared in social media."},{"src":"https:\/\/ps.w.org\/screenshot-generator\/assets\/screenshot-2.png?rev=1153204","caption":"The settings page."}],"raw_content":"<!--section=description-->\n<p>Screenshot Generator is a WordPress plugin that takes screenshots of posts for social media etc. when they are updated.\nIt uses <a href=\"http:\/\/phantomjs.org\/\">PhantomJS<\/a> to do this.<\/p>\n\n<p><\/p>\n\n<p><em>Why?<\/em> When developing <a href=\"http:\/\/toptrust.dk\">Toptrust<\/a>, I was tired of manually adding images of posts\nwhen sharing on social media. This was especially true for pages that had no featured\/thumbnail images.\nI wanted screenshots to be taken automatically, and so Screenshot Generator was born.<\/p>\n\n<h3>Usage<\/h3>\n\n<p>When you update a post or page, a screenshot is automatically taken in the background.\nAfter a few seconds, the screenshot URL is saved to the post's meta key <code>_scrgen_screenshot<\/code>.<\/p>\n\n<h3>Screenshots on social media<\/h3>\n\n<p>An <code>og:image<\/code> and <code>twitter:image:src<\/code> is automatically added to the meta tags\nwhen viewing the post. These are only added if the post doesn't have a\nthumbnail, in which case the plugin expects the thumbnail to be added by\nyou or another plugin. You can change this in the plugin settings page.<\/p>\n\n<h3>Retrieving screenshots manually<\/h3>\n\n<p>If you want to retrieve the screenshot manually, you can do so inside a post:<\/p>\n\n<pre><code>&lt;img src=\"&lt;?php echo scrgen_screenshot(); ?&gt;\" \/&gt;\n<\/code><\/pre>\n\n<h3>Contributing<\/h3>\n\n<p>Contributions are appreciated and very welcome. You can contribute in the\nplugin's <a href=\"https:\/\/github.com\/lassebunk\/screenshot-generator\">GitHub repository<\/a>.<\/p>\n\n<h3>Credits<\/h3>\n\n<p>The screenshot functionality is adapted from Microweber's\n<a href=\"https:\/\/github.com\/microweber\/screen\">Screen<\/a> code.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin to <code>wp-content\/plugins<\/code>.<\/li>\n<li><p>Install PhantomJS.<\/p>\n\n<ul>\n<li><p><strong>Mac:<\/strong><\/p>\n\n<pre><code>  $ brew install phantomjs\n<\/code><\/pre>\n\n<p>Or if this fails, <a href=\"https:\/\/github.com\/eugene1g\/phantomjs\/releases\">download from here<\/a>.<\/p><\/li>\n<li><p><strong>Linux:<\/strong><\/p>\n\n<pre><code>  $ apt-get install phantomjs fontconfig freetype*\n<\/code><\/pre><\/li>\n<\/ul><\/li>\n<li><p>Make sure the <code>phantomjs<\/code> binary is in your PHP's <code>PATH<\/code>.<\/p>\n\n<p>If you can't modify your <code>PATH<\/code>, you can set the <code>PHANTOMJS<\/code> constant to the\nbinary's path and this will be used:<\/p>\n\n<pre><code>  define('PHANTOMJS', '\/usr\/local\/bin\/phantomjs');\n<\/code><\/pre><\/li>\n<li><p>Create a folder called <code>wp-content\/screenshots<\/code> and grant write permissions.<\/p><\/li>\n<li><p>Update a post.<\/p><\/li>\n<\/ol>","raw_excerpt":"Screenshot Generator takes screenshots of posts and pages when they are updated. These screenshots can be used for e.g. previews in social media.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/36117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=36117"}],"author":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/lassebunk"}],"wp:attachment":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=36117"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=36117"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=36117"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=36117"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=36117"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=36117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}