{"id":5000,"date":"2009-03-12T15:40:54","date_gmt":"2009-03-12T15:40:54","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/simple-image-grabber\/"},"modified":"2015-08-18T19:50:49","modified_gmt":"2015-08-18T19:50:49","slug":"simple-image-grabber","status":"publish","type":"plugin","link":"https:\/\/lmo.wordpress.org\/plugins\/simple-image-grabber\/","author":1222216,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.5","stable_tag":"1.0.5","tested":"4.3.34","requires":"2.7","requires_php":"","requires_plugins":"","header_name":"Simple Image Grabber","header_author":"c.bavota","header_description":"","assets_banners_color":"69645b","last_updated":"2015-08-18 19:50:49","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=4W58JWNBHWKK4","header_plugin_uri":"http:\/\/bavotasan.com\/2009\/simple-image-grabber-wordpress-plugin\/","header_author_uri":"http:\/\/bavotasan.com","rating":5,"author_block_rating":0,"active_installs":100,"downloads":17157,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"553198","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.0.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[56637,8354,56635,166,56636],"plugin_category":[50],"plugin_contributors":[78674],"plugin_business_model":[],"class_list":["post-5000","plugin","type-plugin","status-publish","hentry","plugin_tags-get-images","plugin_tags-grab-images","plugin_tags-images-from-posts","plugin_tags-posts","plugin_tags-retrieve-images","plugin_category-media","plugin_contributors-tinkerpriest","plugin_committers-tinkerpriest"],"banners":{"banner":"https:\/\/ps.w.org\/simple-image-grabber\/assets\/banner-772x250.png?rev=553198","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/simple-image-grabber_69645b.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Display one or all images from a post's content. Options include image width, height, class and permalink.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip the simple-image-grabber.zip file.<\/li>\n<li>Upload the <code>simple-image-grabber<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Place <code>&lt;?php images(); ?&gt;<\/code> within the loop to grab your post's images.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>1) How can I customize the Simple Image Grabber function?<\/p>\n\n<p>The images() function accepts five variables.<\/p>\n\n<p>The basic use of the function looks like: <code>&lt;?php images( '1' ); ?&gt;<\/code> or <code>&lt;?php images(); ?&gt;<\/code><\/p>\n\n<p>This will display the first image from your post, with its default width and height, no class and a permalink to the post.<\/p>\n\n<p>This is how the function looks with passing all variables directly or through an array:<\/p>\n\n<pre><code>&lt;?php images( $number, $width, $height, $class, $permalink, $echo ); ?&gt;\n\n&lt;?php\n$defaults = array(\n    'number' =&gt; 1,\n    'width' =&gt; null,\n    'height' =&gt; null,\n    'class' =&gt; 'alignleft',\n    'permalink' =&gt; true,\n    'echo' =&gt; true\n);\n\nimages( $defaults );\n?&gt;\n<\/code><\/pre>\n\n<p>$number = the image you want to pull from your post, ie. the first image from the post ('1') or the second image from the post ('2') and so on. NOTE: If you use 'all', it will display all images from the post.<\/p>\n\n<p>$width = the width of the displayed image<\/p>\n\n<p>$height = the height of the displayed image<\/p>\n\n<p>$class = the class you would like to assign to the displayed image<\/p>\n\n<p>$permalink = whether you would like the image to link to the post or not<\/p>\n\n<p>$echo = echo or return the value<\/p>\n\n<p>The following function will echo the second image from a post (if there is one) with a width of 150px and a height of 200px, the class \"alignleft\" and no link to the post.<\/p>\n\n<pre><code>&lt;?php images( '2', '150', '200', 'alignleft', false ); ?&gt;\n<\/code><\/pre>\n\n<p>The following will return all images from a post with their original width and height, a class name of alignright and a link to the post.<\/p>\n\n<pre><code>&lt;?php\n$args = array(\n    'number' =&gt; 'all',\n    'class' =&gt; 'alignright',\n    'echo' =&gt; 0\n);\n\n$all_images = images( $args );\n?&gt;\n<\/code><\/pre>\n\n<!--section=changelog-->\n<p>1.0.5 (2015-8-18)<\/p>\n\n<ul>\n<li>Added validation<\/li>\n<li>Updated contributor username<\/li>\n<li>Updated version and stable tag<\/li>\n<\/ul>\n\n<p>1.0.4 (2012-10-04)<\/p>\n\n<ul>\n<li>Updated donate link<\/li>\n<\/ul>\n\n<p>1.0.3 (2012-06-04)<\/p>\n\n<ul>\n<li>Added the ability to pass an array to the images() function<\/li>\n<li>Added the ablity to either echo or return the value string<\/li>\n<li>Cleaned up and improved code<\/li>\n<li>Added comments and PHPDocs<\/li>\n<\/ul>\n\n<p>1.0.2 (2009-10-15)<\/p>\n\n<ul>\n<li>Added original width and height to img tag if neither is set<\/li>\n<\/ul>\n\n<p>1.0.1 (2009-03-16)<\/p>\n\n<ul>\n<li>Fixed issue with \"All\" variable<\/li>\n<\/ul>\n\n<p>1.0 (2009-03-11)\nInitial Public Release<\/p>","raw_excerpt":"Display one or all images from a post&#039;s content. Options include image width, height, class and permalink.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/5000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=5000"}],"author":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/tinkerpriest"}],"wp:attachment":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=5000"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=5000"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=5000"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=5000"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=5000"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=5000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}