[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentythirteen/inc/ -> block-patterns.php (source)

   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_Thirteen
  10   * @since Twenty Thirteen 3.4
  11   */
  12  
  13  /**
  14   * Register Block Pattern Category.
  15   */
  16  if ( function_exists( 'register_block_pattern_category' ) ) {
  17  
  18      register_block_pattern_category(
  19          'twentythirteen',
  20          array( 'label' => esc_html__( 'Twenty Thirteen', 'twentythirteen' ) )
  21      );
  22  }
  23  
  24  /**
  25   * Register Block Patterns.
  26   */
  27  if ( function_exists( 'register_block_pattern' ) ) {
  28      // Decorative Gallery.
  29      register_block_pattern(
  30          'twentythirteen/decorative-gallery',
  31          array(
  32              'title'      => esc_html__( 'Decorative Gallery', 'twentythirteen' ),
  33              'categories' => array( 'twentythirteen' ),
  34              'content'    => '<!-- wp:cover {"overlayColor":"yellow","minHeight":100,"minHeightUnit":"vh","align":"full"} -->
  35              <div class="wp-block-cover alignfull has-yellow-background-color has-background-dim" style="min-height:100vh"><div class="wp-block-cover__inner-container"><!-- wp:gallery {"ids":[null,null,null,null,null,null,null,null,null],"linkTo":"none"} -->
  36              <figure class="wp-block-gallery columns-3 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#1" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#1" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg" alt="' . esc_attr__( 'NASA Space Colony illustration, interior view of torus colony. Public spaces appear in the foreground of the torus, while housing, rolling hills, and a river snake up into the background.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#2" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#2" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/cylinder-interior.jpg" alt="alt="' . esc_attr__( 'NASA Space Colony illustration, interior view of a cylindrical space colony, looking out through large windows. The interior contains fields, forests, and a river snaking from the foreground into the background. Low clouds hang over the land.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/cylinder-interior.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/orange.jpg" alt="' . esc_attr__( 'Solid orange square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/orange.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg" alt="' . esc_attr__( 'NASA Space Colony illustration, cutaway view, exposing the interior of a toroidal colony. Trees and densely-packed housing line the inside of the torus.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#3" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#3" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/bernal-cutaway.jpg" alt="' . esc_attr__( 'NASA Space Colony illustration, cutaway view of Bernal Sphere. The interior of the sphere is filled with greenery and houses, and a star shines brightly behind the colony.', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/bernal-cutaway.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#4" alt="' . esc_attr__( 'Solid red square', 'twentythirteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/dark-red.jpg#4" data-link="#"/></figure></li></ul></figure>
  37              <!-- /wp:gallery --></div></div>
  38              <!-- /wp:cover -->',
  39          )
  40      );
  41  
  42      // Informational Section.
  43      register_block_pattern(
  44          'twentythirteen/informational-section',
  45          array(
  46              'title'      => esc_html__( 'Informational Section', 'twentythirteen' ),
  47              'categories' => array( 'twentythirteen' ),
  48              'content'    => '<!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg","mediaType":"image","imageFill":false,"backgroundColor":"off-white"} -->
  49              <div class="wp-block-media-text alignwide is-stacked-on-mobile has-off-white-background-color has-background"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/toroidal-colony.jpg" alt=""/></figure><div class="wp-block-media-text__content"><!-- wp:heading -->
  50              <h2>' . esc_html__( 'Exploring Space', 'twentythirteen' ) . '</h2>
  51              <!-- /wp:heading -->
  52  
  53              <!-- wp:paragraph -->
  54              <p>' . esc_html__( "In the 1970s, NASA's Ames Research Center illustrated some explorations around what future space colonies could look like. This piece, illustrated by Rick Guidice, shows the inside of a toroidal shaped colony.", 'twentythirteen' ) . '</p>
  55              <!-- /wp:paragraph -->
  56  
  57              <!-- wp:buttons -->
  58              <div class="wp-block-buttons"><!-- wp:button -->
  59              <div class="wp-block-button"><a class="wp-block-button__link">' . esc_html__( 'Discover More', 'twentythirteen' ) . '</a></div>
  60              <!-- /wp:button --></div>
  61              <!-- /wp:buttons --></div></div>
  62              <!-- /wp:media-text -->',
  63          )
  64      );
  65  
  66      // Decorative Columns.
  67      register_block_pattern(
  68          'twentythirteen/decorative-columns',
  69          array(
  70              'title'      => esc_html__( 'Decorative Columns', 'twentythirteen' ),
  71              'categories' => array( 'twentythirteen' ),
  72              'content'    => '<!-- wp:columns {"align":"wide"} -->
  73              <div class="wp-block-columns alignwide"><!-- wp:column -->
  74              <div class="wp-block-column"><!-- wp:cover {"overlayColor":"yellow"} -->
  75              <div class="wp-block-cover has-yellow-background-color has-background-dim"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"' . esc_attr__( 'Write title…', 'twentythirteen' ) . '","textColor":"medium-brown","fontSize":"large"} -->
  76              <p class="has-text-align-center has-medium-brown-color has-text-color has-large-font-size">' . esc_html__( 'Space', 'twentythirteen' ) . '</p>
  77              <!-- /wp:paragraph --></div></div>
  78              <!-- /wp:cover --></div>
  79              <!-- /wp:column -->
  80  
  81              <!-- wp:column -->
  82              <div class="wp-block-column"><!-- wp:cover {"url":"' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg","dimRatio":0,"focalPoint":{"x":"0.63","y":"0.33"}} -->
  83              <div class="wp-block-cover"><img class="wp-block-cover__image-background" alt="" src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/torus-interior.jpg" style="object-position:63% 33%" data-object-fit="cover" data-object-position="63% 33%"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"' . esc_attr__( 'Write title…', 'twentythirteen' ) . '","fontSize":"large"} -->
  84              <p class="has-text-align-center has-large-font-size"></p>
  85              <!-- /wp:paragraph --></div></div>
  86              <!-- /wp:cover --></div>
  87              <!-- /wp:column -->
  88  
  89              <!-- wp:column -->
  90              <div class="wp-block-column"><!-- wp:cover {"overlayColor":"yellow"} -->
  91              <div class="wp-block-cover has-yellow-background-color has-background-dim"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"' . esc_attr__( 'Write title…', 'twentythirteen' ) . '","textColor":"medium-brown","fontSize":"large"} -->
  92              <p class="has-text-align-center has-medium-brown-color has-text-color has-large-font-size">' . esc_html__( 'Colonies', 'twentythirteen' ) . '</p>
  93              <!-- /wp:paragraph --></div></div>
  94              <!-- /wp:cover --></div>
  95              <!-- /wp:column --></div>
  96              <!-- /wp:columns -->',
  97          )
  98      );
  99  
 100      // Callout Quote.
 101      register_block_pattern(
 102          'twentythirteen/callout-quote',
 103          array(
 104              'title'      => esc_html__( 'Callout Quote', 'twentythirteen' ),
 105              'categories' => array( 'twentythirteen' ),
 106              'blockTypes' => array( 'core/quote' ),
 107              'content'    => '<!-- wp:columns {"verticalAlignment":"center"} -->
 108              <div class="wp-block-columns are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center"} -->
 109              <div class="wp-block-column is-vertically-aligned-center"><!-- wp:separator {"className":"is-style-wide"} -->
 110              <hr class="wp-block-separator is-style-wide"/>
 111              <!-- /wp:separator --></div>
 112              <!-- /wp:column -->
 113  
 114              <!-- wp:column {"verticalAlignment":"center"} -->
 115              <div class="wp-block-column is-vertically-aligned-center"><!-- wp:quote -->
 116              <blockquote class="wp-block-quote"><p>' . wp_kses_post( __( 'When you look at <br>the stars and the galaxy, you feel that you are not <br>just from any particular piece of land, but from the solar system.', 'twentythirteen' ) ) . '</p><cite>' . esc_html__( 'Kalpana Chawla', 'twentythirteen' ) . '</cite></blockquote>
 117              <!-- /wp:quote --></div>
 118              <!-- /wp:column --></div>
 119              <!-- /wp:columns -->',
 120          )
 121      );
 122  
 123      // Big Quote.
 124      register_block_pattern(
 125          'twentythirteen/big-quote',
 126          array(
 127              'title'      => esc_html__( 'Big Quote', 'twentythirteen' ),
 128              'categories' => array( 'twentythirteen' ),
 129              'blockTypes' => array( 'core/quote' ),
 130              'content'    => '<!-- wp:cover {"overlayColor":"dark-gray","minHeight":100,"minHeightUnit":"vh","align":"full"} -->
 131              <div class="wp-block-cover alignfull has-dark-gray-background-color has-background-dim" style="min-height:100vh"><div class="wp-block-cover__inner-container"><!-- wp:image {"align":"center","sizeSlug":"thumbnail","linkDestination":"none","className":"is-style-rounded"} -->
 132              <div class="wp-block-image is-style-rounded"><figure class="aligncenter size-thumbnail"><img src="' . esc_url( get_template_directory_uri() ) . '/images/block-patterns/bernal-cutaway.jpg" alt="alt="' . esc_attr__( 'NASA Space Colony illustration, cutaway view of Bernal Sphere. The interior of the sphere is filled with greenery and houses, and a star shines brightly behind the colony.', 'twentythirteen' ) . '"/></figure></div>
 133              <!-- /wp:image -->
 134  
 135              <!-- wp:quote {"align":"center","className":"is-style-large"} -->
 136              <blockquote class="wp-block-quote has-text-align-center is-style-large"><p>' . esc_html__( 'When you look at the stars and the galaxy, you feel that you are not just from any particular piece of land, but from the solar system.', 'twentythirteen' ) . '</p><cite>' . esc_html__( 'Kalpana Chawla', 'twentythirteen' ) . '</cite></blockquote>
 137              <!-- /wp:quote --></div></div>
 138              <!-- /wp:cover -->',
 139          )
 140      );
 141  
 142      // Informational List.
 143      register_block_pattern(
 144          'twentythirteen/informational-list',
 145          array(
 146              'title'      => esc_html__( 'Informational List', 'twentythirteen' ),
 147              'categories' => array( 'twentythirteen' ),
 148              'content'    => '<!-- wp:cover {"overlayColor":"red","contentPosition":"center center","align":"wide"} -->
 149              <div class="wp-block-cover alignwide has-red-background-color has-background-dim"><div class="wp-block-cover__inner-container"><!-- wp:paragraph -->
 150              <p><strong>' . esc_html__( 'FAMOUS ASTRONAUTS', 'twentythirteen' ) . '</strong></p>
 151              <!-- /wp:paragraph -->
 152  
 153              <!-- wp:columns -->
 154              <div class="wp-block-columns"><!-- wp:column -->
 155              <div class="wp-block-column"><!-- wp:paragraph -->
 156              <p>' . wp_kses_post( __( 'Yuri Gagarin<br>Alan B. Shepard Jr.<br>Valentina Tereshkova<br>John Glenn Jr.', 'twentythirteen' ) ) . '</p>
 157              <!-- /wp:paragraph --></div>
 158              <!-- /wp:column -->
 159  
 160              <!-- wp:column -->
 161              <div class="wp-block-column"><!-- wp:paragraph -->
 162              <p>' . wp_kses_post( __( 'Neil Armstrong<br>James Lovell Jr.<br>Dr. Sally Ride<br>Chris Hadfield', 'twentythirteen' ) ) . '</p>
 163              <!-- /wp:paragraph --></div>
 164              <!-- /wp:column --></div>
 165              <!-- /wp:columns --></div></div>
 166              <!-- /wp:cover -->',
 167          )
 168      );
 169  
 170  }


Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1