Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Add page pattern category #631

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* Register block Styles
* Register block styles
*/

if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) :
Expand Down Expand Up @@ -165,3 +165,29 @@ function twentytwentyfour_block_styles() {
endif;

add_action( 'init', 'twentytwentyfour_block_styles' );

/**
* Register pattern categories.
*/

if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) :
/**
* Register pattern categories
*
* @return void
* @since Twenty Twenty-Four 1.0
*
*/
function twentytwentyfour_pattern_categories() {

register_block_pattern_category(
'page',
array(
'label' => _x( 'Pages', 'Block pattern category' ),
'description' => __( 'A collection of full page layouts.' ),
)
);
}
endif;

add_action( 'init', 'twentytwentyfour_pattern_categories' );
4 changes: 2 additions & 2 deletions patterns/page-01-business-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* Title: Home Page
* Slug: twentytwentyfour/home
* Categories: about
* Keywords: page, starter
* Categories: page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template
* Viewport width: 1400
Expand Down
4 changes: 2 additions & 2 deletions patterns/page-02-business-about.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* Title: About Page
* Slug: twentytwentyfour/business-about
* Categories: about
* Keywords: page, starter
* Categories: page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template
* Viewport width: 1400
Expand Down
4 changes: 2 additions & 2 deletions patterns/page-03-portfolio-overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* Title: Portfolio Overview Page
* Slug: twentytwentyfour/portfolio-overview
* Categories: about, featured
* Keywords: page, starter
* Categories: page, featured
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template
* Viewport width: 1400
Expand Down
4 changes: 2 additions & 2 deletions patterns/page-04-newsletter-landing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* Title: Newsletter Landing Page
* Slug: twentytwentyfour/newsletter-landing
* Categories: call-to-action, featured
* Keywords: page, starter
* Categories: call-to-action, page, featured
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template
* Viewport width: 1100
Expand Down
4 changes: 2 additions & 2 deletions patterns/page-05-portfolio-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* Title: Portfolio Home Page
* Slug: twentytwentyfour/portfolio-home
* Categories: portfolio
* Keywords: page, starter
* Categories: page
* Keywords: starter
* Block Types: core/post-content
* Post Types: page, wp_template
* Viewport width: 1400
Expand Down
Loading