{"id":3854,"date":"2008-10-15T18:11:35","date_gmt":"2008-10-15T18:11:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/dg-random-image\/"},"modified":"2010-10-26T17:39:10","modified_gmt":"2010-10-26T17:39:10","slug":"dg-random-image","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/dg-random-image\/","author":1213807,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.01","stable_tag":"1.01","tested":"3.0.5","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"DG Random Image","header_author":"Menno Dekker","header_description":"","assets_banners_color":"","last_updated":"2010-10-26 17:39:10","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.dutchguys.com\/plugins","header_author_uri":"http:\/\/www.dutchguys.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2310,"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":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.01"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[133,163,216,214,244],"plugin_category":[50],"plugin_contributors":[96685],"plugin_business_model":[],"class_list":["post-3854","plugin","type-plugin","status-closed","hentry","plugin_tags-image","plugin_tags-images","plugin_tags-picture","plugin_tags-pictures","plugin_tags-random","plugin_category-media","plugin_contributors-dutchguys","plugin_committers-dutchguys"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/dg-random-image.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>In my blog I use pages for the gallery. I have a main index Gallery that has children for each year which contain the actual gallery pages.<\/p>\n\n<p>I wanted to display a random image from this gallery and couldn't find a plugin to do it so I wrote my own. Usage is really simple:\nThe following line in your template <code>&lt;?php echo DG_Random_Image(array('title' =&gt; 'Gallery', 'class' =&gt;'alignleft', 'x' =&gt; 125, 'y' =&gt; 125)); ?&gt;<\/code> or just use the widget.<\/p>\n\n<p><em>title<\/em> is the name of the index page, no pictures will be taken from this page, only from childpages.<\/p>\n\n<p><em>class<\/em> is an optional class to assign to the image<\/p>\n\n<p><em>x<\/em> is the width to assign to the thumbnail<\/p>\n\n<p><em>y<\/em> is the height to assign to the thumbnail<\/p>\n\n<p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.<\/p>\n\n<!--section=installation-->\n<p>Installation is easy:<\/p>\n\n<ol>\n<li>Upload <code>DG_Random_Image<\/code> folder and it's contents to <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 echo DG_Random_Image(array('title' =&gt; 'Gallery', 'class' =&gt;'alignleft', 'x' =&gt; 125, 'y' =&gt; 125)); ?&gt;<\/code> in your templates<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.01<\/h4>\n\n<p>=\n * Cleanup of extra folder\n * Even easier to use with a widget<\/p>\n\n<h4>1.0<\/h4>\n\n<p>Initial Release<\/p>","raw_excerpt":"Displays a random image from one of the children of a named page, i.e. Gallery -&gt; 2008 -&gt; Holiday -&gt; picture1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3854","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=3854"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dutchguys"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3854"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3854"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3854"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3854"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3854"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}