#28540 closed enhancement (wontfix)
Introduce wpmu_create_blog meta filter
Reported by: | Compute | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Networks and Sites | Keywords: | |
Focuses: | multisite | Cc: |
Description
I'd like to add meta to my new blog/site when the wpmu_create_blog() is called.
As it is right now you can do that by using the 'wpmu_new_blog' filter. Adding a hook for addional blog meta during the installation would make this task even easier and thats why I'm suggestion to introduce a 'wpmu_create_blog meta' filter
Attachments (1)
Change History (5)
#2
@
10 years ago
- Type changed from feature request to enhancement
Hi Compute, thanks for the ticket and the patch!
I'm not completely convinced we need this, as using update_option()
to add your data and perform other tasks while hooked into wpmu_new_blog
is pretty straight forward. The concept of "meta" here is also somewhat misleading (to me), as the data doesn't end up in any meta table, but in the new site's options.
The default data passed around as $meta
here really amounts to whether the site is public and what the lang_id
option should be. There is a filter on signups with add_signup_meta
that could pass more in some scenarios. It is somewhat strange that a filter exists there for modifying the "meta" but nowhere else.
If this filter was added, looking at your patch, we would want to put it above the wp_parse_args()
line here so that we could continue to ensure that defaults exist. The function relies on the existence of public
later on. Also check out how hooks are now documented in core.
Add a filter for $meta