Support » Plugins and Hacks » Hacks » WP 3.5 and Hiding Media Tabs

  • Resolved consumedesign

    (@consumedesign)


    I just upgraded a client to 3.5 and now they are doing the tabs differently… I used to hide the Insert from URL and Media Library using:

    function remove_media_tab($tabs) {
    
    	unset($tabs["type_url"]);
    	unset($tabs['library']);
    	return $tabs;
    }
    add_filter('media_upload_tabs','remove_media_tab');

    But it no longer works in 3.5. Anyone know the new way to hide those? I tried to do a jquery remove() but it also no longer loads the js file on that as well, only when the page is entered. I wish they would have at least added an ID or something to the tabs so I can hide them using CSS.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Got the Insert from URL out using:

    function remove_media_tab($strings) {
    
    	unset($strings["insertFromUrlTitle"]);
    	return $strings;
    }
    add_filter('media_view_strings','remove_media_tab');

    Anyone know a good one for the media tab?

    The new uploader kind stinks and don’t have it resolved completely with the media tab since it does some odd things when I remove it. Oh well maybe it will be fixed in the next version.

    I like the new media manager but i dislike that it’s not extendable 🙁

    I’d like to modify the options displayed when embedding media but it’s all javascript now and I can’t find a way to plug in to that.

    Previously, we could register a new “attachment_fields_to_edit” filter.

    I’m with you, Joolee. The ‘attachment_fields_to_edit’ filter still gets called, but, umm, without any attachment fields.

    Dear WordPress.org people; can you suggest a way to work with the options displayed when adding media. I’d like users to be able to select an option to create a shortcode for certain media types.

    @consumedesign
    Adding $strings['createGalleryTitle'] to your function gets rid of the gallery tab.

    function remove_media_tab($strings) {
    
    	unset(
    		$strings["insertFromUrlTitle"],
    		$strings['createGalleryTitle']
    	);
    	return $strings;
    }
    add_filter('media_view_strings','remove_media_tab');
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP 3.5 and Hiding Media Tabs’ is closed to new replies.