PluginProbe
PatternsWP – Gutenberg Block Patterns & Page Templates Library / 1.0.2
PatternsWP – Gutenberg Block Patterns & Page Templates Library v1.0.2
trunk 1.0.0 1.0.1 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
patternswp / patterns / patternswp-header.php

patternswp-header.php in PatternsWP – Gutenberg Block Patterns & Page Templates Library 1.0.2, at patterns/patternswp-header.php

45 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Register Custom Block Styles
4 */
5
6 function PatternsWPHeader_patterns_register_block_patterns() {
7 if ( function_exists( 'register_block_pattern' ) ) {
8 /**
9 * Add your block patterns below
10 */
11
12 /*
13 register_block_pattern(
14 'PatternsWP-gutenberg-block-patterns/TITLE-OF-YOUR-BLOCK-PATTERN', # Add Hyphens between lowercase words
15 array(
16 'title' => __( 'TITLE_OF_YOUR_BLOCK_PATTERN', 'PatternsWP-gutenberg-block-patterns' ),
17 'content' => "BLOCK_PATTERN_GOES_HERE",
18 'categories' => array("CATEGORY"), # eg: columns, text ..etc
19 )
20 );
21 */
22
23 register_block_pattern(
24 'PatternsWPHeader-gutenberg-block-patterns/header-one',
25 array(
26 'title' => __( 'Header Section One', 'PatternsWPHeader-gutenberg-block-patterns' ),
27 'content' => "<!-- wp:group {\"align\":\"full\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"24px\",\"right\":\"20px\",\"bottom\":\"24px\",\"left\":\"20px\"},\"blockGap\":\"64px\"},\"border\":{\"bottom\":{\"width\":\"1px\"}}},\"backgroundColor\":\"base\",\"layout\":{\"type\":\"constrained\",\"contentSize\":\"1392px\",\"wideSize\":\"1440px\"}} -->\r\n<div class=\"wp-block-group alignfull has-base-background-color has-background\" style=\"border-bottom-width:1px;padding-top:24px;padding-right:20px;padding-bottom:24px;padding-left:20px\"><!-- wp:group {\"layout\":{\"type\":\"flex\",\"flexWrap\":\"nowrap\",\"justifyContent\":\"space-between\"}} -->\r\n<div class=\"wp-block-group\"><!-- wp:image {\"id\":359,\"width\":84,\"height\":34,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\r\n<figure class=\"wp-block-image size-full is-resized\"><img src=\"https://nce-studio-muki.instawp.xyz/wp-content/uploads/2023/04/Logo.svg\" alt=\"\" class=\"wp-image-359\" width=\"84\" height=\"34\"/></figure>\r\n<!-- /wp:image -->\r\n\r\n<!-- wp:navigation {\"ref\":540,\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"},\"style\":{\"spacing\":{\"blockGap\":\"32px\"}}} /-->\r\n\r\n<!-- wp:buttons {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"right\"},\"style\":{\"spacing\":{\"blockGap\":\"24px\"}}} -->\r\n<div class=\"wp-block-buttons\"><!-- wp:button {\"textColor\":\"contrast\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"8px\",\"bottom\":\"8px\",\"left\":\"12px\",\"right\":\"12px\"}},\"typography\":{\"fontSize\":\"14px\",\"fontStyle\":\"normal\",\"fontWeight\":\"500\",\"lineHeight\":\"1.5\"},\"border\":{\"radius\":\"8px\"}},\"className\":\"is-style-outline\"} -->\r\n<div class=\"wp-block-button has-custom-font-size is-style-outline\" style=\"font-size:14px;font-style:normal;font-weight:500;line-height:1.5\"><a class=\"wp-block-button__link has-contrast-color has-text-color wp-element-button\" style=\"border-radius:8px;padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px\">Get Started</a></div>\r\n<!-- /wp:button -->\r\n\r\n<!-- wp:button {\"backgroundColor\":\"contrast\",\"textColor\":\"base\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"8px\",\"bottom\":\"8px\",\"left\":\"12px\",\"right\":\"12px\"}},\"typography\":{\"fontSize\":\"14px\",\"fontStyle\":\"normal\",\"fontWeight\":\"500\",\"lineHeight\":\"1.5\"},\"border\":{\"radius\":\"8px\"}}} -->\r\n<div class=\"wp-block-button has-custom-font-size\" style=\"font-size:14px;font-style:normal;font-weight:500;line-height:1.5\"><a class=\"wp-block-button__link has-base-color has-contrast-background-color has-text-color has-background wp-element-button\" style=\"border-radius:8px;padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px\">Get Started</a></div>\r\n<!-- /wp:button --></div>\r\n<!-- /wp:buttons --></div>\r\n<!-- /wp:group --></div>\r\n<!-- /wp:group -->",
28 'categories' => array("patternswp-header"),
29 )
30 );
31
32 register_block_pattern(
33 'PatternsWPHeader-gutenberg-block-patterns/header-two',
34 array(
35 'title' => __( 'Header Section Two', 'PatternsWPHeader-gutenberg-block-patterns' ),
36 'content' => "<!-- wp:group {\"align\":\"full\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"24px\",\"right\":\"20px\",\"bottom\":\"24px\",\"left\":\"20px\"},\"blockGap\":\"64px\"},\"border\":{\"bottom\":{\"width\":\"1px\"}}},\"backgroundColor\":\"base\",\"layout\":{\"type\":\"constrained\",\"contentSize\":\"1392px\",\"wideSize\":\"1440px\"}} -->\r\n<div class=\"wp-block-group alignfull has-base-background-color has-background\" style=\"border-bottom-width:1px;padding-top:24px;padding-right:20px;padding-bottom:24px;padding-left:20px\"><!-- wp:group {\"layout\":{\"type\":\"flex\",\"flexWrap\":\"nowrap\",\"justifyContent\":\"space-between\"}} -->\r\n<div class=\"wp-block-group\"><!-- wp:navigation {\"ref\":540,\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"},\"style\":{\"spacing\":{\"blockGap\":\"32px\"}}} /-->\r\n\r\n<!-- wp:image {\"id\":359,\"width\":84,\"height\":34,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\r\n<figure class=\"wp-block-image size-full is-resized\"><img src=\"https://nce-studio-muki.instawp.xyz/wp-content/uploads/2023/04/Logo.svg\" alt=\"\" class=\"wp-image-359\" width=\"84\" height=\"34\"/></figure>\r\n<!-- /wp:image -->\r\n\r\n<!-- wp:navigation {\"ref\":540,\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"},\"style\":{\"spacing\":{\"blockGap\":\"32px\"}}} /--></div>\r\n<!-- /wp:group --></div>\r\n<!-- /wp:group -->",
37 'categories' => array("patternswp-header"),
38 )
39 );
40
41 }
42 }
43 add_action( 'init', 'PatternsWPHeader_patterns_register_block_patterns' );
44
45