Skip to main content
Commonmark migration
Source Link

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site".
    A simple text option is fine. How do I do this?

  2. I need to save this custom blog option when the site is created.

    I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks.

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site".
    A simple text option is fine. How do I do this?

  2. I need to save this custom blog option when the site is created.

I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks.

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site".
    A simple text option is fine. How do I do this?

  2. I need to save this custom blog option when the site is created.

    I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks.

No tag in title. Minor adjustments.
Source Link
brasofilo
  • 22.1k
  • 8
  • 69
  • 264

Multisite: How to add Custom Blog Options to new blog setup form?

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site" -- a simple text option is fine.

    I want to add an option field to the "Add New Site".
    A simple text option is fine. How do I do this?

  2. I need to save this custom blog option when the site is created.

How do I do this??

  1. I need to save this custom blog option when the site is created.

I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks (though I'm learning!). :)

Multisite: How to add Custom Blog Options to new blog setup form?

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site" -- a simple text option is fine.

How do I do this??

  1. I need to save this custom blog option when the site is created.

I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks (though I'm learning!). :)

How to add Custom Blog Options to new blog setup form?

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site".
    A simple text option is fine. How do I do this?

  2. I need to save this custom blog option when the site is created.

I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks.

Notice removed Draw attention by CommunityBot
Bounty Ended with Tomas Buteler's answer chosen by CommunityBot
Notice added Draw attention by Brian Lacy
Bounty Started worth 100 reputation by Brian Lacy
Tweeted twitter.com/#!/StackWordPress/status/195288890570055680
Source Link
Brian Lacy
  • 193
  • 1
  • 10

Multisite: How to add Custom Blog Options to new blog setup form?

Seems like a simple enough requirement, but I'm struggling:

  1. I want to add an option field to the "Add New Site" -- a simple text option is fine.

How do I do this??

  1. I need to save this custom blog option when the site is created.

I know I can use the 'wpmu_new_blog' hook, which passes the $meta variable with supplied options, but I'm wondering if there's a way to do this all in one step so I don't have to perform another DB query, or worse yet, override/replace the whole site creation process?

Notes:

I'm using WP 3.3.1 with a MultiSite setup. I'm writing a plugin that lists all the Sites which match the specified custom field value (let's call it "type").

Also, I'm an experienced PHP developer but I'm still relatively new to WordPress hacking, so please assume I am not yet intimately familiar with all of the various WP functions and hooks (though I'm learning!). :)