{"id":21166,"date":"2012-12-17T10:23:23","date_gmt":"2012-12-17T10:23:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/multi-image-metabox\/"},"modified":"2014-08-13T08:38:29","modified_gmt":"2014-08-13T08:38:29","slug":"multi-image-metabox","status":"publish","type":"plugin","link":"https:\/\/ca-valencia.wordpress.org\/plugins\/multi-image-metabox\/","author":7706864,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.5","stable_tag":"trunk","tested":"3.5.2","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Multi Image Metabox","header_author":"Willy bahuaud","header_description":"","assets_banners_color":"2a1602","last_updated":"2017-11-28 19:40:25","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_donations&business=A4P2WCN4TZK26&lc=FR&item_name=Wabeo&item_number=1","header_plugin_uri":"http:\/\/wabeo.fr","header_author_uri":"http:\/\/wabeo.fr","rating":4.9,"author_block_rating":0,"active_installs":7000,"downloads":20380,"num_ratings":11,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":"1","5":"10"},"assets_icons":[],"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"659728","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.3.2"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":"1777198","resolution":"1","location":"plugin"}},"screenshots":{"1":"The metabox look like that !"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[163,2205,1570,25131,214],"plugin_category":[50],"plugin_contributors":[80157],"plugin_business_model":[],"class_list":["post-21166","plugin","type-plugin","status-publish","hentry","plugin_tags-images","plugin_tags-metabox","plugin_tags-multiple","plugin_tags-multiple-post-thumbnail","plugin_tags-pictures","plugin_category-media","plugin_contributors-willybahuaud","plugin_committers-willybahuaud"],"banners":{"banner":"https:\/\/ps.w.org\/multi-image-metabox\/assets\/banner-772x250.jpg?rev=659728","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/multi-image-metabox_2a1602.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/multi-image-metabox\/trunk\/screenshot-1.jpg?rev=1777198","caption":"The metabox look like that !"}],"raw_content":"<!--section=description-->\n<p>This plugin add a metabox which allox to upload and link multiple images to one post.\nPictures are linked by the way of meta_value (and attachments ID). They can be reordered using drag and drop.<\/p>\n\n<p>Number of allowed pictures and concerned post types can be overited using hooks.<\/p>\n\n<p>Plugin includes many functions to retrieve linked pictures.\nFor more information on using the plugin, refer to the section <a href=\"\/extend\/plugins\/multi-image-metabox\/other_notes\/\">\"Other Notes\"<\/a>.<\/p>\n\n<h3>Set concerned post types<\/h3>\n\n<p>Paste this into your theme's functions.php file :\n    <\/p>\n\n<h3>Set allowed number of picts<\/h3>\n\n<p>Paste this into your theme's functions.php file :\n     '_image1',\n                'image2' =&gt; '_image2',\n            );\n            return $picts;\n        }\n    ?&gt;<\/p>\n\n<h4>Set allowed number of picts, depending to the post_type<\/h4>\n\n<p>Paste this into your theme's functions.php file :\n    add_filter('list_images','my_list_images',10,2);\n    function my_list_images($list_images, $cpt){\n        global $typenow;\n        if($typenow == \"my_custom_post_type\" || $cpt == \"my_custom_post_type\")\n            $picts = array(\n                'image1' =&gt; '_image1',\n                'image2' =&gt; '_image2',\n                'image3' =&gt; '_image3',\n            );\n        else\n            $picts = array(\n                'image1' =&gt; '_image1',\n                'image2' =&gt; '_image2',\n                'image3' =&gt; '_image3',\n                'image4' =&gt; '_image4',\n                'image5' =&gt; '_image5',\n                'image6' =&gt; '_image6',\n                'image7' =&gt; '_image7',\n                'image8' =&gt; '_image8',\n            );\n        return $picts;\n    }<\/p>\n\n<h3>get_images_ids()<\/h3>\n\n<p>This function have to be used into a template file, or any function.\nIt return an array of the linked attachments's ID.<\/p>\n\n<p>It take two arguments whose are :<\/p>\n\n<ol>\n<li><strong>include the thumbnail ?<\/strong> (boolean) if true include the thumbnail in the returned datas<\/li>\n<li><p><strong>ID<\/strong> (integer) for targeting images linked to a specific post<\/p>\n\n 45,\n    'image1' =&gt; 5,\n    'image2' =&gt; 6,\n    'image3' =&gt; 12,\n    'image6' =&gt; 20,\n    'image7' =&gt; 15\n);\n\n\/\/Empty pictures ar not returned\n\n?&gt;\n\n<h3>get_images_src()<\/h3>\n\n<p>This function have to be used into a template file, or any function.\nIt return an array of URIs and dimension for the linked attachments's, by order.<\/p><\/li>\n<\/ol>\n\n<p>It take three agruments whose are :<\/p>\n\n<ol>\n<li><strong>size<\/strong> (string) the size to return<\/li>\n<li><strong>include the thumbnail ?<\/strong> (boolean) if true include the thumbnail in the returned datas<\/li>\n<li><p><strong>ID<\/strong> (integer) for targeting images linked to a specific post<\/p>\n\n array(\n        [0] =&gt; 'http:\/\/url_of_the_medium_pict.jpg',\n        [1] =&gt; 340,\n        [2] =&gt; 200,\n        [3] =&gt; false \/\/I've no idea what is it...\n    ),\n    'image2' =&gt; array(\n        [0] =&gt; 'http:\/\/url_of_the_medium_second_pict.jpg',\n        [1] =&gt; 340,\n        [2] =&gt; 200,\n        [3] =&gt; false \/\/I've no idea what is it...\n    )\n);\n\n?&gt;\n\n<h3>get_multi_images_src()<\/h3>\n\n<p>Same as get_image_src(), but return two sizes for all the pictures.<\/p><\/li>\n<\/ol>\n\n<p>It take for agruments whose are :<\/p>\n\n<ol>\n<li><strong>size<\/strong> (string) the size to return<\/li>\n<li><strong>size2<\/strong> (string) another size to return<\/li>\n<li><strong>include the thumbnail ?<\/strong> (boolean) if true include the thumbnail in the returned datas<\/li>\n<li><p><strong>ID<\/strong> (integer) for targeting images linked to a specific post<\/p>\n\n array(\n        [0] =&gt; array(\n            [0] =&gt; 'http:\/\/url_of_the_medium_pict.jpg',\n            [1] =&gt; 340,\n            [2] =&gt; 200,\n            [3] =&gt; false \/\/I've no idea what is it...\n        ),\n        [1] =&gt; array(\n            [0] =&gt; 'http:\/\/url_of_the_full_pict.jpg',\n            [1] =&gt; 1020,\n            [2] =&gt; 600,\n            [3] =&gt; false \/\/I've no idea what is it...\n        ),\n    ),\n    'image2' =&gt; array(\n        [0] =&gt; array(\n            [0] =&gt; 'http:\/\/url_of_the_medium_second_pict.jpg',\n            [1] =&gt; 340,\n            [2] =&gt; 200,\n            [3] =&gt; false \/\/I've no idea what is it...\n        ),\n        [1] =&gt; array(\n            [0] =&gt; 'http:\/\/url_of_the_second_full_pict.jpg',\n            [1] =&gt; 1020,\n            [2] =&gt; 600,\n            [3] =&gt; false \/\/I've no idea what is it...\n        )\n    )\n);\n\/\/Empty pictures ar not returned\n\n?&gt;<\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li><p>Upload the Multi Image Metabox plugin to your blog and Activate it.<\/p><\/li>\n<li><p>Customize (into the functions.php file of your theme):<\/p>\n\n<ol>\n<li>If you want to target other post type than PAGE, <a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#Set-concerned-post-types\">use the filter hook \"images_cpt\"<\/a><\/li>\n<li>If you want to change the number of image, <a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#Set-allowed-number-of-picts\">use the filter hook \"list_images\"<\/a> <\/li>\n<\/ol><\/li>\n<li><p>Retrieve the linked images in your theme using the functions :<\/p>\n\n<ol>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#get_images_ids()\">Use get_images_ids()<\/a> into the loop to get an array of attachment's ID<\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#get_images_src()\">Use get_images_src('size')<\/a> into the loop to get an array of attachment's URI &amp; dimensions for  the quiered size <\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#get_multi_images_src()\">Use get_multi_images_src('size1','size2')<\/a> into the loop to get an array of attachment's URI &amp; dimensions for 2 differents size<\/li>\n<\/ol><\/li>\n<li><p>Enjoy ^^ (report to developper section to view the returned datas)<\/p><\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.3.4<\/h4>\n\n<ul>\n<li>Solve a major bug on front end, when you want to customize number of pictures depending to the post type.<\/li>\n<li>YOU NEED TO UPDATE YOUR FILTERS \"list_images\", if you're using it...<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Solve a minor bug while saving menus<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Add an integer argument <strong>id<\/strong> for all procedurals functions to target a specific post<\/li>\n<li>Solve a bug into the get_multi_images_src() function<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Add an boolean argument <strong>thumbnail<\/strong> for all procedurals functions to join image post thumbnail (ID, images) at the front of the returned arrays<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Change the hook for initializing the plugin. By this way we can now assign different numbers of picts, depending to the post type.<\/li>\n<li>Debug the default sizes of get_multi_image_src()<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First version, with some hooks and functions<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li><p>Upload the Multi Image Metabox plugin to your blog and Activate it.<\/p><\/li>\n<li><p>Customize (into the functions.php file of your theme):<\/p>\n\n<ol>\n<li>If you want to target other post type than PAGE, <a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#Set-concerned-post-types\">use the filter hook \"images_cpt\"<\/a><\/li>\n<li>If you want to change the number of image, <a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#Set-allowed-number-of-picts\">use the filter hook \"list_images\"<\/a> <\/li>\n<\/ol><\/li>\n<li><p>Retrieve the linked images in your theme using the functions :<\/p>\n\n<ol>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#get_images_ids()\">Use get_images_ids()<\/a> into the loop to get an array of attachment's ID<\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#get_images_src()\">Use get_images_src('size')<\/a> into the loop to get an array of attachment's URI &amp; dimensions for  the quiered size <\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/multi-image-metabox\/other_notes\/#get_multi_images_src()\">Use get_multi_images_src('size1','size2')<\/a> into the loop to get an array of attachment's URI &amp; dimensions for 2 differents size<\/li>\n<\/ol><\/li>\n<li><p>Enjoy ^^ (report to developper section to view the returned datas)<\/p><\/li>\n<\/ol><\/dd>\n\n<\/dl>","raw_excerpt":"Add a multi-image metabox to your posts, pages and custom post types","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/21166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=21166"}],"author":[{"embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/willybahuaud"}],"wp:attachment":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=21166"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=21166"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=21166"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=21166"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=21166"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=21166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}