[wp-hackers] Install without posts etc
Luis Rodrigues
luis.rodrigues at log.pt
Tue Apr 24 17:58:16 UTC 2012
Sorry, I think I was dead wrong when I said that you can do it from a plugin. Looking at the core source, you may need to create a file at wp-content/install.php with your wp_install_defaults() function definition in order for this to work.
This blog post is a bit old, but provides a nice tutorial:
http://wpbits.wordpress.com/2007/08/10/automating-wordpress-customizations-the-installphp-way/
wp_install_defaults() is called when you create a new multisite blog (via wpmu_create_blog(), which also triggers a "wpmu_new_blog" action). So you can still have wp_install_defaults() do nothing and then set default content by hooking a function to that action.
I never tried adding options to the interface, but I imagine it shouldn't be hard to write a wp_install_defaults() function / wpmu_new_blog callback to set defaults based on your form's output. Just bear in mind that wpmu_create_blog() is called both when adding a new site via the admin panel and when a new user registers for a site.
Cheers,
--
Luís Rodrigues <luis.rodrigues at log.pt>
Solutions Architect
log — Smart software development. Great user experience. <http://log.pt>
Mobile: +351 93 755 2013
Phone: +351 21 330 4220
Calçada do Marquês de Abrantes, 45 - 3.º Dto
1200-718 Lisboa
PORTUGAL
On Tuesday, April 24, 2012 at 4:36 PM, SWORD Studios wrote:
> Luis
>
> There doesn't seem to be much documentation on the function you provided in
> the Codex. On another note would you know how to hook into the Add New
> Site page to add options upon site creation?
>
> Jesse
>
> On Tue, Apr 24, 2012 at 10:52 AM, Luis Rodrigues <luis.rodrigues at log.pt (mailto:luis.rodrigues at log.pt)>wrote:
>
> > Hi,
> >
> > That's done by the wp_install_defaults() function, which you can redefine
> > to do nothing or set different default content for your sites.
> >
> > Cheers,
> >
> > --
> > Luís Rodrigues <luis.rodrigues at log.pt (mailto:luis.rodrigues at log.pt)>
> > Solutions Architect
> >
> > log — Smart software development. Great user experience. <http://log.pt>
> >
> > Mobile: +351 93 755 2013
> > Phone: +351 21 330 4220
> >
> >
> > Calçada do Marquês de Abrantes, 45 - 3.º Dto
> > 1200-718 Lisboa
> > PORTUGAL
> >
> >
> > On Tuesday, April 24, 2012 at 11:15 AM, Peter Sundwall Hansen wrote:
> >
> > > Everytime a WordPress installation is done it contains 1 standard post
> > and
> > > 1 standard page and I am tired of deleting them each and everytime.
> > >
> > > How do I customize my WordPress installation around this?
> > > Thanks.
> > > --
> > > Peter Sundwall Hansen
> > > Farum Kyokushin <http://www.farumkyokushin.dk/>
> > > The [III] Corps <http://www.thethird.dk>
> > > Furesø Hørecenter <http://www.furesøhørecenter.dk<http://www.xn--fureshrecenter-uqbb.dk (http://www.fures
> >
>
> h
> recenter.dk<http://www.xn--fureshrecenter-uqbb.dk)>(
> >
> >
> > http://www.fures
> > > h
> > > recenter.dk)>
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> >
> >
> >
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>
>
>
> --
> thanks,
>
> *Jesse Friedman | *Web Nerd
> 508-507-9673 | jesserfriedman at gmail.com (mailto:jesserfriedman at gmail.com)
> http://jesserfriedman.com | http://braintoblog.com | @professor<
> http://twitter.com/professor>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list