1

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?

4

You can use wpmu_new_blog action hook which accepts 6 arguments:

  • $blog_id
  • $user_id
  • $domain
  • $path
  • $site_id
  • $meta

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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