Attach images Field Join KC discussion

The attach_images field allows you to upload and select multiple images from WP Media. It returns the IDs of attachment.

KingComposer Textarea-HTML text

Map Usage:

array(
	'name' => 'field_id',
	'label' => 'Field Label',

	'type' => 'attach_images',  // USAGE ATTACH_IMAGE TYPE

	'description' => 'Field Description',
)

Example:

Register a new shortcode with filed type: attach_images

add_map(
	    
        array(
           
            // 1st shortcode element
            'my_shortcode' => array(
                'name' => 'My Shortcode',
                'description' => 'This is my shortcode',
                'icon' => 'my-class-icon',
                'category' => 'Content',
                'params' => array(
                    //1st field
                    array(
                        'name' => 'image',
                        'label' => 'Upload Images',
                        'type' => 'attach_images',
                        'admin_label' => true,
                    ),
                    //2nd field
                )
            ),

            // 2nd shortcode element

        ) // End Arrays
    );

} // end my_wp_init()
       
?>

Read more