You’re welcome. And sorry, it’s not much.
- I get this on my browser
string(11) “attachments”
- Where do I find the class? I tried looking for attachments in the theme’s function.php. I see this.
[code]function lmx_attachments( $attachments )
{
$fields = array(
array(
‘name’ => ‘title’, // unique field name
‘type’ => ‘text’, // registered field type
‘label’ => __( ‘Title’, ‘attachments’ ), // label to display
‘default’ => ‘title’, // default value upon selection
)
);
$args = array(
‘label’ => ‘Attachments Gallery’,
‘post_type’ => array( ‘accommodations’, ‘dining’ ),
‘position’ => ‘normal’,
‘priority’ => ‘default’,
‘filetype’ => array(‘image’), // no filetype limit
‘append’ => true,
‘button_text’ => __( ‘Attach Files’, ‘attachments’ ),
‘modal_text’ => __( ‘Attach’, ‘attachments’ ),
// which tab should be the default in the modal (string) (browse|upload)
'router' => 'browse',
'fields' => $fields,
);
$attachments->register( ‘customposttypes_attachments’, $args );
}
add_action( ‘attachments_register’, ‘lmx_attachments’ );[/code]