-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adds starter content [closes #18]
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/** | ||
* Starter Content Class. | ||
* | ||
* @author Themeisle | ||
* @package raft | ||
* @since 1.0.6 | ||
*/ | ||
|
||
namespace Raft; | ||
|
||
/** | ||
* Class Core | ||
* | ||
* @package raft | ||
*/ | ||
class Starter_Content { | ||
const HOME_SLUG = 'home'; | ||
const BLOG_SLUG = 'blog'; | ||
|
||
/** | ||
* Get the starter content. | ||
* | ||
* @return array | ||
*/ | ||
public function get() { | ||
return array( | ||
'nav_menus' => array( | ||
'primary' => array( | ||
'items' => array( | ||
'home' => array( | ||
'type' => 'post_type', | ||
'object' => 'page', | ||
'object_id' => '{{' . self::HOME_SLUG . '}}', | ||
), | ||
'page_blog' => array( | ||
'type' => 'post_type', | ||
'object' => 'page', | ||
'object_id' => '{{' . self::BLOG_SLUG . '}}', | ||
), | ||
), | ||
), | ||
), | ||
'options' => array( | ||
'page_on_front' => '{{' . self::HOME_SLUG . '}}', | ||
'page_for_posts' => '{{' . self::BLOG_SLUG . '}}', | ||
'show_on_front' => 'page', | ||
), | ||
'posts' => array( | ||
self::BLOG_SLUG => array( | ||
'post_name' => self::BLOG_SLUG, | ||
'post_type' => 'page', | ||
'post_title' => self::BLOG_SLUG, | ||
), | ||
self::HOME_SLUG => array( | ||
'post_type' => 'page', | ||
'post_title' => self::HOME_SLUG, | ||
'post_content' => ' | ||
<!-- wp:paragraph {"align":"center"} --> | ||
<p class="has-text-align-center">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p> | ||
<!-- /wp:paragraph --> | ||
', | ||
), | ||
), | ||
); | ||
} | ||
} |