Created
March 23, 2012 07:10
-
-
Save and1truong/2167875 to your computer and use it in GitHub Desktop.
Multi Insert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name = Multiupload Insert | |
| version = 7.x-1.0 | |
| description = "Support insert feature for multiupload widget." | |
| core = 7.x | |
| dependencies[] = image | |
| dependencies[] = insert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * mult_insert.module | |
| */ | |
| /** | |
| * Implements hook_insert_widgets(). | |
| */ | |
| function multi_insert_insert_widgets() { | |
| $items['image_miw'] = array( | |
| 'element_type' => 'mfw_managed_file', | |
| 'wrapper' => '.image-widget', | |
| 'fields' => array( | |
| 'alt' => 'input[name$="[alt]"], textarea[name$="[alt]"]', | |
| 'title' => 'input[name$="[title]"], textarea[name$="[title]"]', | |
| 'description' => 'input[name$="[description]"], textarea[name$="[description]"]', | |
| ), | |
| ); | |
| return $items; | |
| } | |
| /** | |
| * Implementation of hook_insert_styles(). | |
| */ | |
| function multi_insert_insert_styles() { | |
| return image_insert_styles(); | |
| } | |
| /** | |
| * Implementation of hook_insert_content(). | |
| */ | |
| function multi_insert_insert_content($item, $style, $widget) { | |
| return image_insert_content($item, $style, $widget); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment