Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 5 years ago

#15470 closed enhancement (worksforme)

Allow default links to be filtered when creating a new site

Reported by: caesarsgrunt's profile caesarsgrunt Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Multisite Keywords: has-patch
Focuses: 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)

15470.diff (554 bytes) - added by caesarsgrunt 13 years ago.

Download all attachments as: .zip

Change History (9)

@caesarsgrunt
13 years ago

#1 @caesarsgrunt
13 years ago

  • Keywords has-patch added

#2 follow-up: @westi
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

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

#3 in reply to: ↑ 2 ; follow-up: @caesarsgrunt
13 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?

#4 in reply to: ↑ 3 ; follow-up: @westi
13 years ago

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.

#5 in reply to: ↑ 4 @caesarsgrunt
13 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. :-)

#6 follow-up: @westi
13 years ago

Those ui options should probably die.

They are an I18N nightmare - storing strings for this in the db doesn't make it easy

#7 in reply to: ↑ 6 @caesarsgrunt
13 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.

This ticket was mentioned in Slack in #core-editor by talldanwp. View the logs.


5 years ago

Note: See TracTickets for help on using tickets.