Skip to content

Commit

Permalink
Page creation UI integration
Browse files Browse the repository at this point in the history
- Create a "new blank" page as a pattern
  • Loading branch information
dantovbein committed Jun 29, 2022
1 parent eaba4dd commit 67e399f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions classes/patterns/class-blankpage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* BlankPage class.
*
* @package P4GBKS
* @since 0.1
*/

namespace P4GBKS\Patterns;

/**
* Post Content
*
* @package P4GBKS\Patterns
*/
class BlankPage extends Block_Pattern {

/**
* @inheritDoc
*/
public static function get_name(): string {
return 'p4/blank-page';
}

/**
* @inheritDoc
*/
public static function get_config( $params = [] ): array {
return [
'title' => __( 'Blank page', 'planet4-blocks-backend' ),
'blockTypes' => [ 'core/post-content' ],
'categories' => [ 'planet4' ],
'content' => '
<!-- wp:paragraph {"placeholder":"' . __( 'Enter text', 'planet4-blocks-backend' ) . '"} -->
<p></p>
<!-- /wp:paragraph -->
',
];
}
}
1 change: 1 addition & 0 deletions classes/patterns/class-block-pattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static function register_all() {
}

$patterns = [
BlankPage::class,
SideImageWithTextAndCta::class,
HighlightedCta::class,
RealityCheck::class,
Expand Down

0 comments on commit 67e399f

Please sign in to comment.