Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When creating a new network site, by default the site option Uploads Use Yearmonth Folders is on (set to 1). I have to set it to 0 each time I create a new site. This isn't horrid, but is it possible to make this the default for newly created sites? Perhaps a hook or something I am overlooking?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You could just change the option after the blog is created:

add_action('wpmu_new_blog', function($blog_id){
  switch_to_blog($blog_id);
  update_option('uploads_use_yearmonth_folders', false);
  restore_current_blog();
});

Drop this code into a .php file inside wp-content/mu-plugins

share|improve this answer
    
Awesome, knew I had to be missing something wpmu-related. Thanks! –  helenhousandi Sep 13 '11 at 3:12
add comment

I'm a little confused by your question. Are you referring to URLs? If so go to Settings > Permalinks and adjust from there.

share|improve this answer
    
No, not the URL. It's the option to sort uploads into year/month folders, which is on by default for new sites in a multisite setting and there's no media setting to turn it off. I have to set it either in the DB or in the network admin site settings screen (which is really just a light DB GUI). –  helenhousandi Jul 15 '11 at 1:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.