#15470 closed enhancement (worksforme)
Allow default links to be filtered when creating a new site
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Multisite | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Most networks don't want the WP default links to be created for every new site.
It would be nice if there was a filter on the $default_links array.
At the moment one has to hook on wpmu_new_blog and remove the links after they have been created. Better to be able to prevent creation of them in the first place, or pass different ones.
If a filter is approved, I can knock up a patch straight away; it will be very simple.
Attachments (1)
Change History (8)
caesarsgrunt — 3 years ago
comment:1
caesarsgrunt — 3 years ago
- Keywords has-patch added
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
comment:3
in reply to:
↑ 2
;
follow-up:
↓ 4
caesarsgrunt — 3 years ago
Replying to westi:
The right thing to do is to use a replacement wp_install_defaults function for this.
Why make people replace all that functionality when a simple filter would do?
Replying to caesarsgrunt:
Replying to westi:
The right thing to do is to use a replacement wp_install_defaults function for this.
Why make people replace all that functionality when a simple filter would do?
Because if you want to customise it then you likely want to customise all of it.
And filtering the lot is just pointless.
This is one of the pluggable functions which you replace rather than filter the functionality of.
comment:5
in reply to:
↑ 4
caesarsgrunt — 3 years ago
Replying to westi:
Yeah, but the rest is (mostly) customisable using options in the Network Admin UI.
Anyway, point taken I guess. It's not that much of a hardship to replace the whole function. :-)
Those ui options should probably die.
They are an I18N nightmare - storing strings for this in the db doesn't make it easy
comment:7
in reply to:
↑ 6
caesarsgrunt — 3 years ago
Replying to westi:
Those ui options should probably die.
They are an I18N nightmare - storing strings for this in the db doesn't make it easy
Yeah, that might be a better way to go. Use a replacement wp_install_defaults for everything.

The right thing to do is to use a replacement wp_install_defaults function for this.