The MU forums have moved to WordPress.org

default options for new blogs (4 posts)

  1. lampstax
    Member
    Posted 16 years ago #

    Hi all,

    I am trying to have WPMU call a custom function wpmu_set_new_blog_default_options() when a user registers for a new blog via the wp-signup.php or when they activate the blog via wp-activate.php

    The code I have is working for when admin users create the blog within /wp-admin/ but does not work when the user goes through the registration page.

    I've tried ..

    add_action('populate_options', 'wpmu_set_new_blog_default_options', 10, 1);
    add_action('wpmu_new_blog', 'wpmu_set_new_blog_default_options', 10, 1);
    add_action('wpmu_new_user', 'wpmu_set_new_blog_default_options', 10, 1);
    add_action('wpmu_activate_blog', 'wpmu_set_new_blog_default_options', 10, 1 );

    As far as I can tell, wp-activate.php routes to wpmu_activate_signup() which runs this line of code:

    do_action('wpmu_activate_blog', $blog_id, $user_id, $password, $signup->title, $meta);

    Seems like everything is in order to me.

    Can anyone help me figure out why my code isnt working?

  2. DeannaS
    Member
    Posted 16 years ago #

    You can look how it's done in my plugin:
    http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/

    (Or, it might do what you want. It does a lot.)

  3. lampstax
    Member
    Posted 16 years ago #

    Hi Deanna,

    Thanks for your reply. Looking at your plugin, it seems like you used the same "wp_new_blog" hook that I tried.

    I installed it and configured it, but had the same problem mine had.

    When admin users creates the blog from within wp-admin, it works fine.

    When a user goes through the registration process, after activation they just get default option + values.

    wierd!

  4. DeannaS
    Member
    Posted 16 years ago #

    What options, in particular, are not working for you?

About this Topic

  • Started 16 years ago by lampstax
  • Latest reply from DeannaS