I am writing a wordpress plugin which produces a custom publish_type known as "dictionary_entry" that has several custom meta boxes and fields. Let me add an addition area which enables the custom publish author to upload a sound clip.

I have done some digging and attempted the code offered here however i can't get results.

I believe one possible response to my question will be the "type" parameter for fields. I have seen "text", "textarea", "time", "color", "radio", etc. however i weren't capable of finding a listing of all of the options. Could it be unrealistic that there can be a area type: "file" or "upload"?

I am likely to skip the code for adding the custom publish_type, but here's a good example of my code for adding the meta boxes (just in case someone else is attempting to make use of this, remember to apply your custom publish_enter in the 'pages' parameter):

//meta box code

$meta_boxes = array();

$meta_boxes[] = array(
'id' => 'examples',                         // meta box         id, unique per meta box
'title' => 'Examples',          // meta box title
'pages' => array('dictionary_entry'),   // post types, accept custom post types as well, default is array('post'); optional
'context' => 'normal',                      // where the meta box appear: normal (default), advanced, side; optional
'priority' => 'high',                       // order of meta box: high (default), low; optional

'fields' => array(                          // list of meta fields

    array(
        'name' => 'Example 1',                  // field name
        'desc' => 'Use it in a sentence? EX: Kanien\'kéha kahrónkha.',  // field description, optional
        'id' => $prefix . 'example1',               // field id, i.e. the meta key
        'type' => 'text',                       // text box
        'std' => '',                    // default value, optional
        'validate_func' => 'check_apos'         // validate function, created below, inside RW_Meta_Box_Validate class
    ),

    array(
        'name' => 'Translation 1',                  // field name
        'desc' => 'What does the sentence mean? EX: I speak Mohawk.',   // field description, optional
        'id' => $prefix . 'ex_translation1',                // field id, i.e. the meta key
        'type' => 'text',                       // text box
        'std' => '',                    // default value, optional
        'validate_func' => 'check_apos'         // validate function, created below, inside RW_Meta_Box_Validate class
    )
)
);

foreach ($meta_boxes as $metabox) {
add_meta_box... //see the codex for add_meta_box()
}

I determined how to get this done by digging in to the code found here. Should you have a look, you'll recognize areas of my code cited above. I had been initially by using this class, but did not actually know it. It is a custom class which may be known as to include various meta boxes / fields.

It works out the "type" parameter I'm wondering about really goes for this Class (instead of the Wordpress API) which it will permit a kind: 'file' which raises a default file picker window (not the built-on television uploader). For my reasons this really is okay, because I do not need all of the clever options.

If you are reading through this, you've most likely already researched this and seen a multitude of posts that partly let you know that to get this done. For which it's worth, I discovered this to become the simplest method to add this functionality which works best for custom publish_types (with no fair quantity of hacking). I really hope this really is helpful to another person.