technabob
Forum Replies Created
-
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?…and I don’t want to completely eliminate or hide the media library tab, as I use it regularly. i just don’t want it to be the default. The simplest fix is just for wordpress to add an option to change the default view to upload an image. Then you could choose the appropriate path based on your individual workflow.
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?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?
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?Nope. That doesn’t seem to work either. I thought I had it working, but it’s not.
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?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'; } ?>
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?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?
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?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-tabJust 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'; } ?>
So I think there’s still a minor issue with this. If the time_format option is set to “g:i a” in the database, times are still displayed as the whole hour (i.e. 9:00am, even if a post is set to 9:45am).
However, changing the time_format in the wp_options table to “h:i a” displays the proper time (though with a leading “0”, which is no big deal).
Forum: Requests and Feedback
In reply to: WP 3.5 – any way to default "Add Media" to "Upload Files"?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.
Donncha:
Any possibility this could be a feature request for a future version? I’d happily contribute some money to the project if that helps get it implemented!Any ideas on this? Or suggestions on how to build out a custom cache just for a single page?
That’s fine, but what is the query I need to run against the DB in order to set that to the proper value for exact times?
Forum: Themes and Templates
In reply to: Error trapping for duplicate custom field rows?Hmmm…. Does this make sense, or is there a tidier way to handle it?
$countVar = post_custom('count'); if(is_array($countVar)){$countVar=$countVar[0];}
So does that mean I need to manually add a row to the options table, or is there an admin control somewhere for this?
Zack:
Did this change ever get made? I wasn’t sure, since I’ve been manually patching every time I upgrade.
You’re right… In theory.
However, I’ve had problems in the past with 301s decreasing pagerank and affecting overall ranking of pages. Since we rely so heavily on search traffic, I’ve tried to avoid doing that. For some reason Google seems to penalize a 301 compared to a 200 – at least sometimes.