[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Block Patterns 4 * 5 * @link https://developer.wordpress.org/reference/functions/register_block_pattern/ 6 * @link https://developer.wordpress.org/reference/functions/register_block_pattern_category/ 7 * 8 * @package WordPress 9 * @subpackage Twenty_Eleven 10 * @since Twenty Eleven 3.8 11 */ 12 13 /** 14 * Register Block Pattern Category. 15 */ 16 if ( function_exists( 'register_block_pattern_category' ) ) { 17 18 register_block_pattern_category( 19 'twentyeleven', 20 array( 'label' => esc_html__( 'Twenty Eleven', 'twentyeleven' ) ) 21 ); 22 } 23 24 /** 25 * Register Block Patterns. 26 */ 27 if ( function_exists( 'register_block_pattern' ) ) { 28 29 // Heading, and two columns featuring an image and dropcap. 30 register_block_pattern( 31 'twentyeleven/large-text', 32 array( 33 'title' => esc_html__( 'Image and Text Columns', 'twentyeleven' ), 34 'categories' => array( 'twentyeleven' ), 35 'viewportWidth' => 1000, 36 'content' => '<!-- wp:heading {"style":{"typography":{"fontSize":45}}} --> 37 <h2 style="font-size:45px">' . esc_html__( 'A Bowl Full of Flowers', 'twentyeleven' ) . '</h2> 38 <!-- /wp:heading --> 39 <!-- wp:columns --> 40 <div class="wp-block-columns"><!-- wp:column --> 41 <div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --> 42 <figure class="wp-block-image size-large"><img src="' . get_template_directory_uri() . '/images/patterns/pattern-flower.jpg" alt="' . esc_attr( 'A yellow flower against a dark background.', 'twentyeleven' ) . '" /></figure> 43 <!-- /wp:image --> 44 <!-- wp:paragraph {"dropCap":true} --> 45 <p class="has-drop-cap">' . esc_html__( 'This is just an example post to showcase the featured post section on the showcase page. Who doesn’t like flowers? I like flowers. Nullam hendrerit enim nunc. Vestibulum eget nulla magna! Fusce lobortis neque eu neque egestas tincidunt. Duis elementum consequat lorem, in eleifend justo mollis at. Nam quis adipiscing magna. Duis adipiscing est ac nibh feugiat rhoncus. Donec non lorem felis, eget commodo purus.', 'twentyeleven' ) . '</p> 46 <!-- /wp:paragraph --></div> 47 <!-- /wp:column --> 48 <!-- wp:column {"width":"40%"} --> 49 <div class="wp-block-column" style="flex-basis:40%"><!-- wp:paragraph --> 50 <p>' . esc_html__( 'Aenean euismod elementum nisi quis eleifend. Lectus quam id leo in vitae turpis. Etiam tempor orci eu lobortis elementum nibh. At quis risus sed vulputate odio ut enim blandit. Id ornare arcu odio ut. Blandit massa enim nec dui nunc mattis enim ut tellus. Fermentum iaculis eu non diam phasellus vestibulum. Magna fermentum iaculis eu non diam phasellus vestibulum lorem. Ullamcorper velit sed ullamcorper morbi tincidunt ornare massa. Cursus sit amet dictum sit amet justo donec. At tellus at urna condimentum mattis. Et ligula ullamcorper malesuada proin libero nunc. Ipsum dolor sit amet consectetur adipiscing elit duis tristique sollicitudin. Pellentesque diam volutpat commodo sed egestas. Mi proin sed libero enim sed faucibus.', 'twentyeleven' ) . '</p> 51 <!-- /wp:paragraph --></div> 52 <!-- /wp:column --></div> 53 <!-- /wp:columns -->', 54 ) 55 ); 56 57 // Two columns with a quote. 58 register_block_pattern( 59 'twentyeleven/inline-quote', 60 array( 61 'title' => esc_html__( 'Inline Quote', 'twentyeleven' ), 62 'categories' => array( 'twentyeleven' ), 63 'viewportWidth' => 1000, 64 'content' => '<!-- wp:columns --> 65 <div class="wp-block-columns"><!-- wp:column --> 66 <div class="wp-block-column"><!-- wp:paragraph --> 67 <p>' . esc_html__( 'This is just an example post to showcase the featured post section on the showcase page. Who doesn’t like flowers? I like flowers. Nullam hendrerit enim nunc. Vestibulum eget nulla magna! Fusce lobortis neque eu neque egestas tincidunt. Duis elementum consequat lorem, in eleifend justo mollis at. Nam quis adipiscing magna. Duis adipiscing est ac nibh feugiat rhoncus. Donec non lorem felis, eget commodo purus.', 'twentyeleven' ) . '</p> 68 <!-- /wp:paragraph --></div> 69 <!-- /wp:column --> 70 <!-- wp:column --> 71 <div class="wp-block-column"><!-- wp:separator {"color":"black","className":"is-style-wide"} --> 72 <hr class="wp-block-separator has-text-color has-background has-black-background-color has-black-color is-style-wide"/> 73 <!-- /wp:separator --> 74 <!-- wp:quote {"className":"is-style-large"} --> 75 <blockquote class="wp-block-quote is-style-large"><p><strong><em>' . esc_html__( '"There are always flowers for those who want to see them."', 'twentyeleven' ) . '</em></strong></p><cite>' . esc_html__( 'Henri Matisse', 'twentyeleven' ) . '</cite></blockquote> 76 <!-- /wp:quote --></div> 77 <!-- /wp:column --></div> 78 <!-- /wp:columns -->', 79 ) 80 ); 81 82 // Cover block with a call-to-action to follow the blog. 83 register_block_pattern( 84 'twentyeleven/follow', 85 array( 86 'title' => esc_html__( 'Follow Blog', 'twentyeleven' ), 87 'categories' => array( 'twentyeleven' ), 88 'viewportWidth' => 1000, 89 'content' => '<!-- wp:cover {"overlayColor":"black","minHeight":900,"minHeightUnit":"px","align":"center"} --> 90 <div class="wp-block-cover aligncenter has-black-background-color has-background-dim" style="min-height:900px"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":85}}} --> 91 <p class="has-text-align-center" style="font-size:85px">' . esc_html__( 'Get In Touch', 'twentyeleven' ) . '</p> 92 <!-- /wp:paragraph --> 93 <!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":25}}} --> 94 <p class="has-text-align-center" style="font-size:25px">' . esc_html__( 'Click to subscribe to this blog and receive notifications of new posts by email.', 'twentyeleven' ) . '</p> 95 <!-- /wp:paragraph --> 96 <!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":25}}} --> 97 <p class="has-text-align-center" style="font-size:25px">' . esc_html__( 'Join 1,729 other followers', 'twentyeleven' ) . '</p> 98 <!-- /wp:paragraph --> 99 <!-- wp:buttons {"contentJustification":"center"} --> 100 <div class="wp-block-buttons is-content-justification-center"><!-- wp:button {"borderRadius":0,"backgroundColor":"white","textColor":"black"} --> 101 <div class="wp-block-button"><a class="wp-block-button__link has-black-color has-white-background-color has-text-color has-background no-border-radius">' . esc_html__( 'Follow', 'twentyeleven' ) . '</a></div> 102 <!-- /wp:button --></div> 103 <!-- /wp:buttons --></div></div> 104 <!-- /wp:cover -->', 105 ) 106 ); 107 108 // Heading, and two columns with an image and text. 109 register_block_pattern( 110 'twentyeleven/about', 111 array( 112 'title' => esc_html__( 'About Me', 'twentyeleven' ), 113 'categories' => array( 'twentyeleven' ), 114 'viewportWidth' => 1000, 115 'content' => '<!-- wp:heading {"style":{"typography":{"fontSize":50}}} --> 116 <h2 style="font-size:50px">' . esc_html__( 'About Me', 'twentyeleven' ) . '</h2> 117 <!-- /wp:heading --><!-- wp:columns --> 118 <div class="wp-block-columns"><!-- wp:column --> 119 <div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --> 120 <figure class="wp-block-image size-large"><img src="' . get_template_directory_uri() . '/images/patterns/pattern-woman.jpg" alt="' . esc_attr( 'Photo of a woman.', 'twentyeleven' ) . '" /></figure> 121 <!-- /wp:image --></div> 122 <!-- /wp:column --> 123 <!-- wp:column --> 124 <div class="wp-block-column"><!-- wp:paragraph --> 125 <p><strong>' . esc_html__( 'This is a paragraph to tell about yourself.', 'twentyeleven' ) . '</strong> ' . esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nulla porttitor massa id neque aliquam vestibulum morbi blandit cursus. Feugiat nisl pretium fusce id velit. Cursus risus at ultrices mi. Pellentesque nec nam aliquam sem et tortor consequat. Est lorem ipsum dolor sit amet consectetur adipiscing. Nisi porta lorem mollis aliquam. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae proin. Malesuada bibendum arcu vitae elementum curabitur vitae nunc sed. Quis hendrerit dolor magna eget est lorem ipsum dolor sit. Viverra vitae congue eu consequat.', 'twentyeleven' ) . '</p> 126 <!-- /wp:paragraph --></div> 127 <!-- /wp:column --></div> 128 <!-- /wp:columns -->', 129 ) 130 ); 131 132 // Two columns with headings and lists. 133 register_block_pattern( 134 'twentyeleven/lists', 135 array( 136 'title' => esc_html__( 'Two Columns of Lists', 'twentyeleven' ), 137 'categories' => array( 'twentyeleven' ), 138 'viewportWidth' => 1000, 139 'content' => '<!-- wp:columns --> 140 <div class="wp-block-columns"><!-- wp:column --> 141 <div class="wp-block-column"><!-- wp:paragraph {"style":{"typography":{"fontSize":25}}} --> 142 <p style="font-size:25px"><strong>' . esc_html__( 'Books', 'twentyeleven' ) . '</strong></p> 143 <!-- /wp:paragraph --> 144 <!-- wp:list --> 145 <ul><li>' . esc_html__( 'Aenean euismod elementum, 1999', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Nisi quis eleifend, 1999', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Lectus quam id leo in vitae turpis, 2006', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Etiam tempor orci eu lobortis, 2009', 'twentyeleven' ) . '</li><li>' . esc_html__( 'At quis risus sed vulputate odio ut enim, 2015', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Blandit. Id ornare arcu odio ut, 2018', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Aenean euismod elementum II, 2020', 'twentyeleven' ) . '</li></ul> 146 <!-- /wp:list --></div> 147 <!-- /wp:column --> 148 <!-- wp:column --> 149 <div class="wp-block-column"><!-- wp:paragraph {"style":{"typography":{"fontSize":25}}} --> 150 <p style="font-size:25px"><strong>' . esc_html__( 'Talks', 'twentyeleven' ) . '</strong></p> 151 <!-- /wp:paragraph --> 152 <!-- wp:list --> 153 <ul><li>' . esc_html__( 'Aenean euismod elementum', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Nisi quis eleifend', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Lectus quam id leo in vitae turpis', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Etiam tempor orci eu lobortis', 'twentyeleven' ) . '</li><li>' . esc_html__( 'At quis risus sed vulputate odio ut enim', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Blandit. Id ornare arcu odio ut', 'twentyeleven' ) . '</li><li>' . esc_html__( 'Aenean euismod elementum', 'twentyeleven' ) . '</li></ul> 154 <!-- /wp:list --></div> 155 <!-- /wp:column --></div> 156 <!-- /wp:columns -->', 157 ) 158 ); 159 160 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 24 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |