jchristopher/attachments — pull request #24 by cpommiss (2013-01-17 13:49:20+00:00)
Title: Implemented <select> field type

Fields can now take a fourth (optional) parameter during register()
calls.

This parameter, indexed as 'meta', is an array. For selectboxes, it's
implemented to use key/value pairs. (For example: `$my_options['USA'] =
'United States'`)

---------------------------------------------------

Sample usage inside a register() call:

```php
$fields = array( array( 'name' => 'lang',
'type' => 'select',
'label' => 'Language',
'meta' => array( 'en' => 'English',
'es' => 'Spanish',
'fr' => 'French')
));

$args = array( 'label' => 'Files',
'post_type' => array( 'page' ),
'filetype' => null,
'note' => '',
'button_text' => __( 'Attach Files', 'attachments' ),
'modal_text' => __( 'Attach', 'attachments' ),
'fields' => $fields);

$attachments->register( 'my_custom_instance_name', $args );
```