Support » Plugins » Hacks » Add custom drop down media metadata field

Viewing 4 replies - 1 through 4 (of 4 total)
  • Instead of using HTML for the drop down, is it possible to do something like this? I hacked the code together from my reading, however I can’t get it to work.

    $form_fields['panorama'] = array(
    		'name' => "attachments[{$post->ID}][panorama]",
    		'id' => "attachments[{$post->ID}][panorama],
    		'label' => __('Panorama'),
    		'type' => 'select',
    		'options' => array(
    			array('name' => 'Nature', 'value' => 'nature'),
    			array('name' => 'City', 'value' => 'city'),
    			array('name' => 'Other', 'value' => 'other')
    		)
    		'helps' => __("Select type of panorama if applicable.")
    	);

    double post

    Careful, xpat. The 3.5 media manager is going to mess up your approach of using the ‘attachment_fields_to_edit’ filter.

    Sigh.

    There’s an item in a trac ticket about this.

    http://core.trac.wordpress.org/ticket/22759#comment:1

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add custom drop down media metadata field’ is closed to new replies.