Title: Edit box &quot;Inserted in&quot;
Last modified: August 21, 2016

---

# Edit box "Inserted in"

 *  Resolved [Anthony Martin](https://wordpress.org/support/users/spidlace/)
 * (@spidlace)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/)
 * Hi David,
 * Good work for this plugin !
 * I want to customize the metabox “Inserted in” beacause, there are a lot of informations,
   I don’t want..
 * This is a screen actually :
 * [http://img4.hostingpics.net/pics/519333screenmedialirabryassistantbefore.jpg](http://img4.hostingpics.net/pics/519333screenmedialirabryassistantbefore.jpg)
 * And this is what I want :
 * [http://img4.hostingpics.net/pics/546732screenmedialirabryassistantafter.jpg](http://img4.hostingpics.net/pics/546732screenmedialirabryassistantafter.jpg)
 * I don’t want the ID and the word PARENT…
    Do you have any hook in your plugin?
   Or how can I edit this metabox ? (not directely in the plugin)…
 * Thanks you 🙂
 * [https://wordpress.org/plugins/media-library-assistant/](https://wordpress.org/plugins/media-library-assistant/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065377)
 * Thank you for your kind words and for your interesting question.
 * The current MLA version does not have any hooks for the enhanced meta boxes it
   adds to the Media/Edit Media screen, but it is a reasonable thing to add. I will
   do some experimenting and see if I can add the hooks and an example of using 
   them to the next MLA version.
 * I will leave this topic unresolved for now and update it when I have progress
   to report.
 * Thanks for the idea and for your patience while I pursue it.
 *  Thread Starter [Anthony Martin](https://wordpress.org/support/users/spidlace/)
 * (@spidlace)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065462)
 * Very nice ! I wait this update with impatience.
 * Thanks you
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065560)
 * I have completed development of nine new filters that give great control over
   formatting and displaying the “Edit Media enhanced meta boxes.” I have created
   an example plugin for the filters and added code to implement the simplified “
   Inserted in” format you gave in your example. Here is the code for your example:
 *     ```
       /**
            * MLA Inserted in Meta Box Filter
            *
            * This filter gives you an opportunity to modify the "Inserted in" meta box.
            *
            * @since 1.00
            *
            * @param    array    ( [inserts] => default text, [rows] => textbox rows, [cols] => textbox columns )
            * @param    array    the attachment references information for this post
            * @param    object    the current post
            *
            * @return    array    updated text, rows, columns
            */
           public static function mla_inserted_in_meta_box_filter( $inserts, $references, $post ) {
               //error_log( 'MLAMetaboxHooksExample::mla_inserted_in_meta_box_filter $inserts = ' . var_export( $inserts, true ), 0 );
               //error_log( 'MLAMetaboxHooksExample::mla_inserted_in_meta_box_filter $references = ' . var_export( $references, true ), 0 );
               //error_log( 'MLAMetaboxHooksExample::mla_inserted_in_meta_box_filter $post = ' . var_export( $post, true ), 0 );
   
               $new_inserts = array();
               $upload_dir = wp_upload_dir();
               $file_url = $upload_dir['baseurl'] . '/' . $references['base_file'];
               $new_inserts[] = $references['file'];
               $new_inserts[] = '(' . $file_url . ')';
   
               // Index on post ID to eliminate duplicates
               $base_references = array();
               foreach( $references['inserts'] as $key => $file_references ) {
                   foreach ( $file_references as $reference ) {
                       $base_references[ $reference->ID ] = $reference;
                   }
               }
   
               foreach ( $base_references as $reference ) {
                   $new_inserts[] = $reference->post_title;
                   $new_inserts[] = '(' . get_permalink( $reference->ID, false ) . ')';
               }
   
               $inserts['inserts'] = implode( "\n", $new_inserts );
               return $inserts;
           } // mla_inserted_in_meta_box_filter
       ```
   
 * These improvements will be in my next MLA version. If you’d like to test the 
   improvements, please send me a note with your e-mail address and I will give 
   you a copy by return e-mail. You can use the Contact Us page at our web site:
 * [Fair Trade Judaica/Contact Us](http://fairtradejudaica.org/our-story/contact-us/)
 * Thanks for your help and your patience.
 *  Thread Starter [Anthony Martin](https://wordpress.org/support/users/spidlace/)
 * (@spidlace)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065563)
 * Hi David,
 * Thanks for your answer and your development.
 * I send you a email and I’m a hurry to test the new version of this plugin ! 🙂
 * Thanks you very much
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065585)
 * Thank you for following up with your contact information. I hope you received
   the test copy I sent and were able to use it to format your “Inserted in” meta
   box.
 * I am marking this topic resolved, but please update it if you have any problems
   or further questions about using the new filters and example plugin to format
   the Media/Edit Media meta boxes. Thanks for inspiring an MLA enhancement and 
   for your interest in the plugin.
 *  Thread Starter [Anthony Martin](https://wordpress.org/support/users/spidlace/)
 * (@spidlace)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065605)
 * Hi David,
 * Thanks for the copy.
    I test it, and you do a great job for this news hooks !!
 * But I have one question.
    It is possible to remove textarea for metabox ? Because,
   when I want to add some HTML and CSS in this text, I can’t and my tag are visible
   and not understand by the browser… Do you see what I mean ?
 * (this is a screenshot for understand my problem)
 * [http://img4.hostingpics.net/pics/842232mla.png](http://img4.hostingpics.net/pics/842232mla.png)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Edit box "Inserted in"’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [edit](https://wordpress.org/support/topic-tag/edit/)
 * [metabox](https://wordpress.org/support/topic-tag/metabox/)

 * 6 replies
 * 2 participants
 * Last reply from: [Anthony Martin](https://wordpress.org/support/users/spidlace/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/edit-box-inserted-in/#post-5065605)
 * Status: resolved