Skip to content

Commit

Permalink
Move Creator version of CPT to Creator plugin.
Browse files Browse the repository at this point in the history
The Directory plugin has it's own version, and the two will be reconciled later on.

See #5
See #6
  • Loading branch information
iandunn committed Oct 29, 2020
1 parent 41bdf05 commit 2e6cea1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 15 additions & 0 deletions public_html/wp-content/plugins/pattern-creator/pattern-creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,18 @@ function inject_editor_template( $template ) {
return __DIR__ . '/view/editor.php';
}
add_filter( 'template_include', __NAMESPACE__ . '\inject_editor_template' );

/**
* Registers block editor 'wp_template_part' post type.
*/
function register_post_type() {
\register_post_type(
'wp-pattern',
array(
'public' => true,
'label' => 'Block Pattern',
'show_in_rest' => true,
)
);
}
add_action( 'init', __NAMESPACE__ . '\register_post_type' );
15 changes: 0 additions & 15 deletions public_html/wp-content/plugins/pattern-directory/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,3 @@
*/

namespace WordPressdotorg\Pattern_Directory;

/**
* Registers block editor 'wp_template_part' post type.
*/
function register_post_type() {
\register_post_type(
'wp-pattern',
array(
'public' => true,
'label' => 'Block Pattern',
'show_in_rest' => true,
)
);
}
add_action( 'init', __NAMESPACE__ . '\register_post_type' );

0 comments on commit 2e6cea1

Please sign in to comment.