{"id":18325,"date":"2012-06-09T20:45:22","date_gmt":"2012-06-09T20:45:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/image-upload-helper\/"},"modified":"2012-06-09T20:45:22","modified_gmt":"2012-06-09T20:45:22","slug":"image-upload-helper","status":"publish","type":"plugin","link":"https:\/\/oci.wordpress.org\/plugins\/image-upload-helper\/","author":383275,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"trunk","tested":"3.3.2","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"Image Upload Helper","header_author":"Flightless, Inc","header_description":"","assets_banners_color":"","last_updated":"2012-06-09 20:45:22","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=A69NZPKWGB6H2","header_plugin_uri":"https:\/\/github.com\/flightless\/image-upload-helper","header_author_uri":"http:\/\/flightless.us\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2010,"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":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,163,1980,23321],"plugin_category":[50],"plugin_contributors":[77692],"plugin_business_model":[],"class_list":["post-18325","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-images","plugin_tags-library","plugin_tags-uploading","plugin_category-media","plugin_contributors-jbrinley","plugin_committers-jbrinley"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/image-upload-helper.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WordPress has a wonderful JavaScript\/iframe dialog for uploading or choosing images to use\nin posts or as featured thumbnails. Repurposing this dialog for other uses is difficult.\nImage Upload Helper is a simple library that helps you add an image upload\/selection field\nanywhere in the WordPress admin, using a single function.<\/p>\n\n<p>Created by <a href=\"http:\/\/flightless.us\">Flightless<\/a> with significant credit to <a href=\"http:\/\/tri.be\">Modern Tribe<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin to your blog.<\/li>\n<li>Activate it.<\/li>\n<li>Nothing happens.<\/li>\n<\/ol>\n\n<p>This is a library. It doesn't actually do anything by itself. To use it in a plugin:<\/p>\n\n<ol>\n<li>Include this plugin (in its entirety) in a subdirectory of your plugin. It plays nice with other\nplugins; if a site has multiple plugins activated, each with its own copy of Image Upload Helper, only\none will load.<\/li>\n<li><code>require_once( 'image-upload-helper\/image-upload-helper.php' );<\/code><\/li>\n<li>Call <code>image_upload_helper()<\/code> wherever you want an upload dialog available.<\/li>\n<\/ol>\n\n<p>The <code>image_upload_helper()<\/code> function takes an array of arguments to control exactly what the form\nlooks like.<\/p>\n\n<ul>\n<li><code>field_name<\/code> - Required. The name of the form field that will be submitted. Defaults to\n\"image-upload-helper\". Use this to customize the field to fit in with your form. By changing\nthe <code>field_name<\/code> value, you can call <code>image_upload_helper()<\/code> as often as you like on each page.<\/li>\n<li><code>thumbnail_id<\/code> - The attachment ID of the current value of the field.<\/li>\n<li><code>label<\/code> - The label to use for the field. Defaults to \"thumbnail image\". This will\ndisplay as \"Set thumbnail image\" or \"Remove thumbnail image\" in the form, or \"Use as\nthumbnail image\" in the iframe dialog<\/li>\n<li><code>size<\/code> - The size of the image you want displayed in the form. Defaults to \"post-thumbnail\".\nIf you want to display a custom size, make sure you register it.<\/li>\n<\/ul>\n\n<p>When a form is submitted with an Image Upload Helper field, the field specified by the <code>field_name<\/code> argument\nwill contain the attachment ID of the selected image.<\/p>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<p>Initial version<\/p>","raw_excerpt":"A useful library for adding image upload fields to your plugin or admin page.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/18325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=18325"}],"author":[{"embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jbrinley"}],"wp:attachment":[{"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=18325"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=18325"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=18325"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=18325"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=18325"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/oci.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=18325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}