Thanks Andrea, I'd heard of that hack file before, but wasn't sure if it was referring to the same thing or not. Clears that one up! As for number two, instead of starting a new thread, maybe I can ask more about that here...
I dug around in the core files and found that I could use the upload_mimes
filter, and media_buttons
action to accomplish what I wanted, but I'm seeing some strange behavior I was hoping somebody here could clear up for me.
I used a modified version of the original mu_media_buttons
function to add my own code, and attempted to replace it via;
remove_action('media_buttons', 'mu_media_buttons');
add_action('media_buttons', 'k_media_buttons');
Except that it doesn't work, the call to remove_action
returns false. It adds my function properly, but it doesn't remove mu_media_buttons
, so the buttons are displayed twice.
The only thing I can think is that my mu-plugin file is being loaded before mu.php
and therefore the action tagged with mu_media_buttons
can't be removed, as technically it hasn't even been added yet.
So how can I override this, so that my function takes precedence and is the only one used? :(