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.

I want to write a plugin so I can hook up the wp_install_defaults function.

I actually need to do the following: when a new site is created, I want to import a default XML file with some categories and default posts. wp_install_defaults is the function that does that, but it doesn't seem to work.

Isn't wp_install_defaults hook-able?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can use wpmu_new_blog action hook which accepts 6 arguments:

  • $blog_id
  • $user_id
  • $domain
  • $path
  • $site_id
  • $meta
share|improve this answer

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.