{"id":1149,"date":"2013-05-31T11:20:26","date_gmt":"2013-05-31T11:20:26","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=1149"},"modified":"2014-03-19T09:13:42","modified_gmt":"2014-03-19T09:13:42","slug":"wordpress-plugin-wp-simple-galleries-images-helper-function","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/","title":{"rendered":"WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function"},"content":{"rendered":"<p><img decoding=\"async\" class=\"attachment-post-thumbnail\" src=\"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg\" \/><\/p>\n<h2>WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function<\/h2>\n<p>I have written this function for myself to use in a module. I was not require any shortcode so my requirement was like this. Have a look, might it will work for you as well.<\/p>\n<p><code>if(!function_exists('wp_simple_gallery_images')){<br \/>\nfunction wp_simple_gallery_images($post_id)<br \/>\n{<br \/>\n$images = array();<br \/>\n$post_meta = get_post_meta($post_id, 'wpsimplegallery_gallery', true);<br \/>\nif(!empty($post_meta)){<br \/>\nforeach($post_meta as $key){<br \/>\n$images[$post_id][] = get_post_meta($key, '_wp_attached_file', true); }<br \/>\n}<br \/>\nreturn $images;<br \/>\n}<br \/>\n}<\/code><\/p>\n<h3>Modified:<\/h3>\n<p><code>if(!function_exists('wp_simple_gallery_images'))<br \/>\n{<br \/>\n\tfunction wp_simple_gallery_images($post_id)<br \/>\n\t{<br \/>\n\t\t$images = array();<br \/>\n\t\t$post_meta = get_post_meta($post_id, 'wpsimplegallery_gallery', true);<br \/>\n\t\t$post_meta = is_array($post_meta)?$post_meta:array();<br \/>\n\t\tif(!empty($post_meta))<br \/>\n\t\t{<br \/>\n\t\t\tforeach($post_meta as $attachment_id)<br \/>\n\t\t\t{<br \/>\n\t\t\t\t$attachment_data = get_post($attachment_id);<br \/>\n\t\t\t\t$images[$post_id][$attachment_id]['src'] = $attachment_data->guid;<br \/>\n\t\t\t\t$images[$post_id][$attachment_id]['caption'] = $attachment_data->post_excerpt;<br \/>\n\t\t\t}<br \/>\n\t\t}<br \/>\n\t\treturn $images;<br \/>\n\t}<br \/>\n}<\/code><\/p>\n<p>Link: <a href=\"http:\/\/wordpress.org\/support\/topic\/wordpress-plugin-\u2013-wp-simple-galleries-\u2013-images-helper-function\" rel=\"nofollow\">Support &#8211; WP Simple Galleries<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function I have written this function for myself to use in a module. I was not require any shortcode so my requirement was like this. Have a look, might it will work for you as well. if(!function_exists(&#8216;wp_simple_gallery_images&#8217;)){ function wp_simple_gallery_images($post_id) { $images = array(); $post_meta = get_post_meta($post_id, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[65],"tags":[],"class_list":["post-1149","post","type-post","status-publish","format-standard","hentry","category-plugins"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress Plugin - WP Simple Galleries - Images Helper Function<\/title>\n<meta name=\"description\" content=\"WordPress Plugin - WP Simple Galleries - Images Helper Function\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Plugin - WP Simple Galleries - Images Helper Function\" \/>\n<meta property=\"og:description\" content=\"WordPress Plugin - WP Simple Galleries - Images Helper Function\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-31T11:20:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-19T09:13:42+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function\",\"datePublished\":\"2013-05-31T11:20:26+00:00\",\"dateModified\":\"2014-03-19T09:13:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\"},\"wordCount\":62,\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg\",\"articleSection\":[\"Plugins\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\",\"name\":\"WordPress Plugin - WP Simple Galleries - Images Helper Function\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg\",\"datePublished\":\"2013-05-31T11:20:26+00:00\",\"dateModified\":\"2014-03-19T09:13:42+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"WordPress Plugin - WP Simple Galleries - Images Helper Function\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage\",\"url\":\"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg\",\"contentUrl\":\"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP Frameworks\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Wordpress\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Plugins\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/plugins\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Plugin - WP Simple Galleries - Images Helper Function","description":"WordPress Plugin - WP Simple Galleries - Images Helper Function","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Plugin - WP Simple Galleries - Images Helper Function","og_description":"WordPress Plugin - WP Simple Galleries - Images Helper Function","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2013-05-31T11:20:26+00:00","article_modified_time":"2014-03-19T09:13:42+00:00","og_image":[{"url":"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg","type":"","width":"","height":""}],"author":"Fahad","twitter_misc":{"Written by":"Fahad","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function","datePublished":"2013-05-31T11:20:26+00:00","dateModified":"2014-03-19T09:13:42+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/"},"wordCount":62,"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage"},"thumbnailUrl":"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg","articleSection":["Plugins"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/","name":"WordPress Plugin - WP Simple Galleries - Images Helper Function","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage"},"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage"},"thumbnailUrl":"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg","datePublished":"2013-05-31T11:20:26+00:00","dateModified":"2014-03-19T09:13:42+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"WordPress Plugin - WP Simple Galleries - Images Helper Function","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#primaryimage","url":"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg","contentUrl":"http:\/\/s-plugins.wordpress.org\/wp-simple-galleries\/assets\/banner-772x250.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/wordpress-plugin-wp-simple-galleries-images-helper-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":"PHP Frameworks","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/"},{"@type":"ListItem","position":4,"name":"Wordpress","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/"},{"@type":"ListItem","position":5,"name":"Plugins","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/plugins\/"},{"@type":"ListItem","position":6,"name":"WordPress Plugin &#8211; WP Simple Galleries &#8211; Images Helper Function"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":506,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/1149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=1149"}],"version-history":[{"count":7,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/1149\/revisions"}],"predecessor-version":[{"id":1607,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/1149\/revisions\/1607"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=1149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=1149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=1149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}