• It seems to me that the most common use case for working with images in wordpress is uploading them. So when I click the new “Add Media” button, it seems counterintuitive that the default view is the “Media Library” tab, instead of “Upload Files”.

    It’s much less likely that I’m going to use a previously uploaded image from my media library when writing a post, and that I’ll be using a newly uploaded image.

    Changing the default here (or allowing it to be a configurable option) would save one click every time you go to upload images.

    Does anyone else out there agree with this? Could a plugin be written to make this an option?

Viewing 15 replies - 1 through 15 (of 49 total)
  • I second your comment… WordPress 3.5 looks great, but the media manager seems to be a step backwards.

    Unfortunately it’s not simply a matter of “getting used to it” – the media manager changes have added unnecessary extra steps which have a negative impact on workflow.

    For example, as technabob says, we now have to click to switch to Upload Files instead of having it as the default.

    Featured Images have become less streamlined too, as the media manager closes after I upload and insert an image, so I then have to go back in and select the featured image. Previously I could click it just before I clicked ‘Insert into post’.

    Not to mention the now-tiny input boxes for captions, titles and descriptions. For many of us, these are hugely important parts of uploading photos but appear to have been ‘downgraded’ in terms of their importance to WordPress.

    Personally, I miss the old media manager – everything was where I needed it, and the processes were a lot quicker.

    Thread Starter technabob

    (@technabob)

    Frankly, I like the old upload process better too, but the gallery management is definitely improved for those of us who use galleries too – especially excluding images and sorting them.

    I just don’t see the need to constantly look at my entire media library. We have tens of thousands of images in there, and only once in a very rare blue moon do we reuse an image from a prior post.

    Thread Starter technabob

    (@technabob)

    I think I figured out a way to do this courtesy of this plugin code that I found here:
    https://wordpress.stackexchange.com/questions/74422/changing-the-media-library-default-tab

    Just had to change the return value to “uploadFiles” and it seems to work like a charm in 3.5. I still think this should be an option on the media manager tab.

    <?php
    /*
    Plugin Name: Default Media Tab
    Plugin URI: https://wordpress.stackexchange.com/q/74422/6035
    Description: Change the default media upload tab in WP < 3.5
    Author: Christopher Davis
    Author URI: https://christopherdavis.me
    License: GPL2
    
        Copyright 2012 Christopher Davis
    
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License, version 2, as
        published by the Free Software Foundation.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */
    
    !defined('ABSPATH') && exit;
    
    add_filter('media_upload_default_tab', 'wpse74422_switch_tab');
    function wpse74422_switch_tab($tab)
    {
        return 'uploadFiles';
    }
    ?>
    Thread Starter technabob

    (@technabob)

    Strike that. I thought it was working, but it isn’t.

    Does anyone on the wordpress team know if the media_upload_default_tab filter still works in 3.5? If so, what are the tab names?

    Adding my voice in agreement.

    99.99% of the time I want to add media to a post, it’s brand new. The default library view is slow and necessitates another click through to get to what I want. It should default to post specific images.

    Also, the selection process was a little counterintuitive. I figured it out, but it wasn’t immediately obvious what was going on.

    As an aside, the media uploader display is a little buggy in Safari 6, plus a noticeable delay when inserting.

    Thread Starter technabob

    (@technabob)

    I’m still testing this, but I THINK it’ll work with a return value of “type”

    <?php
    /*
    Plugin Name: Default Media Tab
    Plugin URI: https://wordpress.stackexchange.com/q/74422/6035
    Description: Change the default media upload tab in WP < 3.5
    Author: Christopher Davis
    Author URI: https://christopherdavis.me
    License: GPL2
    
        Copyright 2012 Christopher Davis
    
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License, version 2, as
        published by the Free Software Foundation.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */
    
    !defined('ABSPATH') && exit;
    
    add_filter('media_upload_default_tab', 'wpse74422_switch_tab');
    
    function wpse74422_switch_tab($tab)
    {
        return 'type';
    }
    ?>
    Thread Starter technabob

    (@technabob)

    Nope. That doesn’t seem to work either. I thought I had it working, but it’s not.

    Yes, WordPress, please roll this particular change back in the next update. We shouldn’t need to add a plugin and slow down our sites to regain lost functionality.

    Add me to the list of folks who find this to be a no-brainer, and something that is not properly documented for me to fix. I’ve spent about 2 hours tonight trying to resolve this problem, as I run a multi-author site, and this one tiny little thing is going to cause tons of problems and time lost.

    this worked for me
    https://wordpress.stackexchange.com/questions/76125/change-the-default-view-of-media-library-in-3-5

    uploaded to this post is the only sort I wanted, so I removed the selected=0 part of the code, now all sorts force “uploaded to this post”. And then I removed the drop down sort selector with css.

    How can I use my old twenty eleven theame version 3.4.2 instead of 3.5

    @technobob

    Does anyone on the wordpress team know if the media_upload_default_tab filter still works in 3.5? If

    no, it’s now javascript. refer to my previous post.

    you also have new css options

    /*wp 3.5 media uploader sidebar*/
    .media-menu a:first-child, /*create gallery*/
    .media-menu a:first-child + a,/*set featured  image*/
    .media-menu a:last-child, /*from url*/
    
    /*wp 3.5 media uploader tabs*/
    .media-frame-router a:first-child /*upload tab*/
    .media-frame-router a:first-child + a /*library tab*/
    
    /*wp 3.5 media uploader drop down selector*/
    .media-frame select

    Thread Starter technabob

    (@technabob)

    Deepbevel: I’m not sure if that solves the issue I’m talking about. I’m not so worried about the drop-down menu being set to just the current post’s images (though that would be nice if it did that once any images are attached) – I want the default screen to be “Upload Files” instead of “Media Library”.

    Is this possible through a JS hack?

    well, it’s a start, somethng to work with.. I’m only just begining to experiment.. stay tuned.

    I can’t recall at the moment if the dropdown selector has the Upload Files” option, if so you could use the script to force that screen as default. (not really default, rather, it seems to over ride the default and makes the selection automatically)

    I use it without the if statement, so it forces the view regardless of what is selected. Then I hid the selector with css.

    <?php
    /**
     * Plugin Name: Pre-select post specific attachments
     */
    
    add_action( 'admin_footer-post-new.php', 'wpse_76048_script' );
    add_action( 'admin_footer-post.php', 'wpse_76048_script' );
    
    function wpse_76048_script()
    {
        ?>
    <script>
    jQuery(function($) {
        var called = 0;
        $('#wpcontent').ajaxStop(function() {
    
                $('[value="uploaded"]').attr( 'selected', true ).parent().trigger('change');
                called = 1;
    
        });
    });
    </script>
        <?php
    }
Viewing 15 replies - 1 through 15 (of 49 total)
  • The topic ‘WP 3.5 – any way to default "Add Media" to "Upload Files"?’ is closed to new replies.