{"id":53750,"date":"2017-01-21T21:43:14","date_gmt":"2017-01-21T21:43:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/cloud2png\/"},"modified":"2017-01-24T00:12:26","modified_gmt":"2017-01-24T00:12:26","slug":"cloud2png","status":"closed","type":"plugin","link":"https:\/\/en-nz.wordpress.org\/plugins\/cloud2png\/","author":3803,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.3","stable_tag":"1.0.3","tested":"4.7.33","requires":"4.6","requires_php":"","requires_plugins":"","header_name":"Cloud2PNG","header_author":"Per Soderlind","header_description":"","assets_banners_color":"ccd2d4","last_updated":"2017-01-24 00:12:26","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/example.com\/","header_plugin_uri":"https:\/\/github.com\/soderlind\/cloud2png","header_author_uri":"https:\/\/soderlind.no","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1129,"num_ratings":0,"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":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1579879","resolution":"128x128","location":"assets","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1579879","resolution":"256x256","location":"assets","width":256,"height":256}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":"1579879","resolution":"1544x500","location":"assets","width":1544,"height":500},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"1579879","resolution":"772x250","location":"assets","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2","1.0.3"],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":"1579879","resolution":"1","location":"assets","width":904,"height":634},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1579879","resolution":"2","location":"assets","width":1272,"height":470}},"screenshots":{"1":"Demo","2":"Get the settings from the Cloudinary Dashboard"}},"plugin_section":[],"plugin_tags":[130902,4038,7917,62956,25893],"plugin_category":[50],"plugin_contributors":[78884],"plugin_business_model":[],"class_list":["post-53750","plugin","type-plugin","status-closed","hentry","plugin_tags-cloudinary","plugin_tags-screenshot","plugin_tags-snapshot","plugin_tags-url2png","plugin_tags-webshot","plugin_category-media","plugin_contributors-pers"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/cloud2png_ccd2d4.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/cloud2png\/assets\/screenshot-1.gif?rev=1579879","caption":"Demo"},{"src":"https:\/\/ps.w.org\/cloud2png\/assets\/screenshot-2.png?rev=1579879","caption":"Get the settings from the Cloudinary Dashboard"}],"raw_content":"<!--section=description-->\n<p>Capture snapshots of any website using the <a href=\"https:\/\/cloudinary.com\/console\/addons#url2png\">Cloudinary URL2PNG add-on<\/a>.<\/p>\n\n<h4>Use<\/h4>\n\n<p>Add link to the site you'd like to create a snapshot of, by using the <code>[cloud2png]<\/code> shortcode, eg:<\/p>\n\n<pre><code>[cloud2png url=\"https:\/\/wordpress.org\"]\n<\/code><\/pre>\n\n<p><strong>Customize the snapshots<\/strong><\/p>\n\n<p>Using the Cloud2PNG Customizer you can change the size and border of the snapshots.<\/p>\n\n<p><strong>Shortcode parameters<\/strong><\/p>\n\n<p>You can override the Cloud2PNG Customizer using the shortcode parameters, they are (with defaults):<\/p>\n\n<ul>\n<li>url=home_url( '\/' )<\/li>\n<li>width=430<\/li>\n<li>height=225<\/li>\n<li>border_width=0<\/li>\n<li>border_radius=0<\/li>\n<li><p>border_color=#000000<\/p>\n\n<p>[cloud2png url=\"https:\/\/wordpress.org\" width=\"300\" height=\"400\" border_width=\"5\"]<\/p><\/li>\n<\/ul>\n\n<p><strong>Adding Cloud2PNG to a theme<\/strong><\/p>\n\n<p>Using <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/do_shortcode\/\">do_shortcode()<\/a>, you can add Cloud2PNG to a theme:<\/p>\n\n<pre><code>echo do_shortcode( 'url=\"https:\/\/wordpress.org\" width=\"300\" height=\"400\" border_width=\"5' );\n<\/code><\/pre>\n\n<p>or using the <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/shortcode_atts_shortcode\/\">shortcode_atts_{$shortcode}<\/a> filter:<\/p>\n\n<pre><code>add_filter ('shortcode_atts_cloud2png', 'add_url', 10, 3);\nfunction add_url ($out, $pairs, $atts ) {\n    $out['url'] = 'https:\/\/soderlind.no';\n    return $out;\n}\n<\/code><\/pre>\n\n<h3>Sidenote<\/h3>\n\n<p>I code for fun, and I code to learn. I've tried to do this plugin using OOP at my best effort. There will be couplings that could be looser and not everything is DRY. I will update the plugin as I learn more and I will fix <a href=\"https:\/\/github.com\/soderlind\/cloud2png\/issues\/new\">issues that are reported<\/a>.<\/p>\n\n<p>I'm following the <a href=\"https:\/\/github.com\/WordPress-Coding-Standards\/WordPress-Coding-Standards\">WordPress Coding Standards<\/a> with one exception, I'm using the <a href=\"http:\/\/www.php-fig.org\/psr\/psr-4\/\">PSR-4 autoloader<\/a> and I've disabled the following rules:<\/p>\n\n<pre><code>&lt;rule ref=\"WordPress-Core\"&gt;\n    &lt;exclude name=\"Generic.Files.LowercasedFilename\" \/&gt;\n    &lt;exclude name=\"WordPress.Files.FileName\" \/&gt;\n    &lt;exclude name=\"WordPress.Files.FileName.UnderscoresNotAllowed\" \/&gt;\n&lt;\/rule&gt;\n<\/code><\/pre>\n\n<h4>Credits<\/h4>\n\n<p>Cloud2PNG is using:<\/p>\n\n<ul>\n<li>The <a href=\"https:\/\/github.com\/soderlind\/plugin-customizer\">Plugin Customizer<\/a> framework.<\/li>\n<li>The <a href=\"https:\/\/github.com\/soderlind\/class-customizer-range-value-control\">WordPress Customizer Range Value Control<\/a>.<\/li>\n<li>The <a href=\"https:\/\/github.com\/cloudinary\/cloudinary_php\">PHP extension for Cloudinary<\/a><\/li>\n<li>The <a href=\"https:\/\/github.com\/php-fig\/fig-standards\/blob\/master\/accepted\/PSR-4-autoloader-examples.md#class-example\">PSR-4 Autoloader<\/a><\/li>\n<li>The jQuery <a href=\"https:\/\/github.com\/brandonaaron\/jquery-cssHooks\/blob\/master\/boxshadow.js\">boxShadow cssHooks<\/a>, Copyright (c) 2010 Burin Asavesna (http:\/\/helloburin.com)\n\n<ul>\n<li>I use CSS box-shadow to create <a href=\"http:\/\/blog.teamtreehouse.com\/css-tip-better-rounded-borders\">Better Rounded Borders<\/a><\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>Copyright and License<\/h4>\n\n<p>Cloud2PNG is copyright 2017 Per Soderlind<\/p>\n\n<p>Cloud2PNG is free software: you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.<\/p>\n\n<p>Cloud2PNG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<\/p>\n\n<p>You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http:\/\/www.gnu.org\/licenses\/.<\/p>\n\n<!--section=installation-->\n<h4>Prerequisites<\/h4>\n\n<ul>\n<li>PHP 5.6 (I use PHP 7.x on my development server)<\/li>\n<li>A <a href=\"https:\/\/cloudinary.com\/signup\">Cloudinary account<\/a><\/li>\n<li>Enable the <a href=\"https:\/\/cloudinary.com\/console\/addons#url2png\">Cloudinary URL2PNG add-on<\/a><\/li>\n<\/ul>\n\n<p>When you have the prerequisites:<\/p>\n\n<ol>\n<li>In Plugins-&gt;Add New, search for Cloud2PNG<\/li>\n<li>Click Install Now<\/li>\n<li>When the plugin is installed, activate it.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Fix cloudinary radius bug. Cloudinary draws a radius even though the radius = 0, so don't send radius parameter when it's 0.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Harden shortcode attributes<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added to the WordPress plugin directory<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Capture snapshots of any website using the Cloudinary URL2PNG add-on.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/53750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=53750"}],"author":[{"embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pers"}],"wp:attachment":[{"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=53750"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=53750"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=53750"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=53750"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=53750"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/en-nz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=53750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}