The best hook I can find is wpmu_new_blog
(line 1086, wp-includes/ms-functions.php
, wpmu_create_blog()
) – it passes 6 arguments like so;
do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
$meta
is an array of initial site options, not to be confused with the options generated by populate_options()
.
Programatically creating nav menus may prove to be a little tricky, as there is no ‘API’ as such – they’re a mix of posts, post meta and nav_menu
terms, coupled with a few available functions such as is_nav_menu_item()
and wp_setup_nav_menu_item()
.
My best advice would be to check out wp-admin/nav-menus.php
, as this is where all the core code lies for creating menus.
Using WP_DEFAULT_THEME
should be fine, and is probably the best approach too.
Related Posts:
- Register theme customizer settings when theme activates [duplicate]
- How to include stylesheet in custom admin using parent_slug
- Theme Options Menu Item – Permission Issue
- Opinions and recommendations on the best barebones base theme [closed]
- Customizing a WordPress theme without changing it?
- How to Link External jQuery/Javascript files with WordPress
- Best practices for a Style/CSS based theme options page?
- Custom Taxonomy-specific JavaScript
- Any official way to create an admin theme?
- How do I create my own admin button and theme settings page?
- Splitting an Evolving Site into Multiple Sites, or Maintaining as One Site?
- Moving WordPress.com theme and widget settings to self-hosted site?
- Is it possible to stop a theme activation when a certain plugin is not activated
- Building useful features into your theme
- Editing theme files and access to the Code pages only to super-admin?
- Copying theme from Localhost to Live does not copy all theme settings with it?
- Change Default Image HTML
- How to delete default themes
- Extra User Profile Field Upload File / Image
- Edit raw HTML of the landing page
- Problem : deletion failed, the theme requested does not exist
- Theme Activation, Create Database Tables
- Will activating a different theme preserve custom settings to current theme?
- Can I apply a WP theme to a specific custom page template?
- How to mark an option as selected
- Add transparency to wordpress color picker?
- How to trigger function on theme delete?
- Setting a static home page and blog page without using the settings
- Two Navigation Menus – secondary nav is including main nav
- Possible to put header-{your_custom_template}.php in subdirectory?
- Renaming the Twenty Fourteen WordPress theme
- Working with an Array inside Your Theme Options Array – Multiple Values
- Protect changes made to the theme when updating
- Theme Development Admin Area [closed]
- How to set a single theme directory on a multisite blog?
- Add a series of checkboxes to theme options
- What’s the order of loading wordpress elements?
- Static page not working
- Warning: Creating default object… when altering Customize panels
- loss of theme options while site deployment in production
- Theme settings default, strange behavior before first save
- How to find out if page_for_posts is showing (in order to style menu item)
- New custom theme option (text input) giving index error
- Custom options below pages/posts editor?
- What changes we need to make to a theme so it can be installed as a MU Theme?
- Problem of running development copy of WordPress on WebMatrix?
- Full page (no WP admin menus and options) admin theme options
- Different logo on homepage
- the_content() is not displaying content, why? [closed]
- What is the correct way to integrate wordpress with another php application?
- Customizing page content layout
- Tips for managing code when developing a parent theme framework
- How to dynamically change theme’s slogan from admin?
- Trying to uninstall a theme, but it’s hijacking my home page
- Passing dynamic options from backend to frontend
- Problems to disable the comments for my statics pages
- Most wp_nav_menu parameters ignored
- Using the same database on another Subdomain
- How To Show Different Footers For Different Post Types Pages?
- WordPress setup one database with two different website?
- Get data from Theme Options and use them into meta options field in custom post type
- Custom fields not displaying on front end
- My blog suddenly can’t find my stylesheet?
- What’s the easiest way of adding more options in the Theme Options of the twenty eleven theme?
- Customizing 1 theme for multiple blogs in a multisite setup
- Is there any way to modify images from a theme using the web interface?
- How to implement theme option to change bootstrap 4 container from .container to .container-fluid
- Default and warning messages & no login
- dynamic image path within a javascript file
- Display ads by location [closed]
- WordPress Dashboard Problem [closed]
- Theme Dev | Convert Template to Theme
- Can i add wordpress editor to my custom theme option? [closed]
- Work on theme files on a server & browser preview before installing it
- Create a child Theme or custom Theme
- Automatically delete default posts and pages on theme install?
- Static front page displaying twice
- Static posts page is not working
- Is “get_template_part” hierarchy possible?
- How can I change the prev / next buttons text to Dutch?
- What login/password do I need to install a wordpress theme?
- Trim Post Content on Home Page
- display unique post per category
- How to add WordPress JS Script Links
- Woocommerce single product image blurred and small. Actual image is big
- Does Jetpack store comments in local database also? [closed]
- How to remove permalinks links presents in each page of my site?
- How to get ONLY the URL of the image that show_media_header returns?
- Adding a template in WPTouch
- enqueue_script doesn’t work with HTML5 blank theme
- Comments not displaying after changing theme
- Theme Translation?
- Get WP Install Directory
- Create Custom Attachment Template That is Processed from Plugin Folder?
- Will I lose the pages I’ve created within a default WordPress theme when adding a new theme?
- How can I add text on top of slideshow? [closed]
- How to remove date, author and comment count from Chameleon search results page
- Two column layout in WordPress?
- Display Headings on Index page in different font sizes
- Index page is not working