Fills the brand new blog with starting data
author | etessore |
---|---|
version | 1.0.0 |
package | classes |
add_page(string | array $parms) : int
string
array
page details according to {@link http://codex.wordpress.org/Function_Reference/wp_insert_post wp_insert_post()}
int
the post idadd_theme(array $parms) : \NewBlogInitializator
This method tries to make a new theme directory under the wp-contents/themes. Then tries to create style.css in the newly theme folder and fill it with the default header comment
An example of parameters:
$defaults = array(
'name' => 'Wordpress Theme Utils Child Theme',
'folder' => 'wtu-child-theme',
'child_of' => 'Wordpress-Theme-Utils',
'description' => 'This is a Child Theme of Wordpress Theme Utils',
'theme_uri' => 'http://www.emanueletessore.com/',
'author' => 'Emanuele Tessore',
'author_uri' => 'http://www.emanueletessore.com/',
'version' => '1.0.0'
);
Uses wp_die() if something goes wrong
array
parameters for the new theme
\NewBlogInitializator
$this for chainabilitydelete_default_posts() : \NewBlogInitializator
\NewBlogInitializator
$this for chainabilityenable_theme() : \NewBlogInitializator
\NewBlogInitializator
$this for chainabilityget_page_details(int $index) : array
int
the id of the page
array
list of details, false if the $index doesn't point to an automatically generated pagehook()
init(int $blog_id)
Overload this in a child ob ject if you need customization on starting data
int
the blog id
reset_page_list() : \NewBlogInitializator
\NewBlogInitializator
$this for chainabilityselect_blog() : \NewBlogInitializator
\NewBlogInitializator
$this for chainability$blog_id : int
$pages : array
$theme : array