Add custom menu item on wordpress 3.9.1 media upload

I’m trying to add a menu item on Media Uploader of WordPress.

It is like this screenshot: enter image description here

Read More

Basically, it should have the same functionality of Create Gallery with just different shortcode output.

I’ve search Google for hours now and this has the closest thing of what I want: https://gist.github.com/Fab1en/4586865

But it has an error which I can’t figure out. (I have no knowledge on Backbone.js)

// create an input
this.input = this.make( 'input', { // error line
    type:  'text',
    value: this.model.get('custom_data')
});

Uncaught TypeError: undefined is not a function

I think, if this will be fixed, everything will be good to go…

Is there anyone who have tried this one? I need some help.

Related posts

Leave a Reply

1 comment

  1. Try this code:

    function custom_media_upload_tab_name( $tabs ) {
        $newtab = array( 'tab_slug' => 'Your Tab Name' );
        return array_merge( $tabs, $newtab );
    }
    
    add_filter( 'media_upload_tabs', 'custom_media_upload_tab_name' );
    
    function custom_media_upload_tab_content() {
        // Add you content here.
    }
    add_action( 'media_upload_tab_slug', 'custom_media_upload_tab_content' );