PageRenderTime 41ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/server/wordpress/wp-content/themes/twentytwenty/inc/block-patterns.php

https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br
PHP | 203 lines | 174 code | 8 blank | 21 comment | 2 complexity | 5d42b3e71d994d222bf1e9b44a2cf195 MD5 | raw file
  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_Twenty
  10. * @since Twenty Twenty 1.6
  11. */
  12. /**
  13. * Register Block Pattern Category.
  14. */
  15. if ( function_exists( 'register_block_pattern_category' ) ) {
  16. register_block_pattern_category(
  17. 'twentytwenty',
  18. array( 'label' => esc_html__( 'Twenty Twenty', 'twentytwenty' ) )
  19. );
  20. }
  21. /**
  22. * Register Block Patterns.
  23. */
  24. if ( function_exists( 'register_block_pattern' ) ) {
  25. // Call to Action.
  26. register_block_pattern(
  27. 'twentytwenty/call-to-action',
  28. array(
  29. 'title' => esc_html__( 'Call to Action', 'twentytwenty' ),
  30. 'categories' => array( 'twentytwenty' ),
  31. 'viewportWidth' => 1400,
  32. 'content' => implode(
  33. '',
  34. array(
  35. '<!-- wp:group {"align":"wide","style":{"color":{"background":"#ffffff"}}} -->',
  36. '<div class="wp-block-group alignwide has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:group -->',
  37. '<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
  38. '<h2 class="has-text-align-center">' . esc_html__( 'Support the Museum and Get Exclusive Offers', 'twentytwenty' ) . '</h2>',
  39. '<!-- /wp:heading -->',
  40. '<!-- wp:paragraph {"align":"center"} -->',
  41. '<p class="has-text-align-center">' . esc_html__( 'Members get access to exclusive exhibits and sales. Our memberships cost $99.99 and are billed annually.', 'twentytwenty' ) . '</p>',
  42. '<!-- /wp:paragraph -->',
  43. '<!-- wp:button {"align":"center","className":"is-style-outline"} -->',
  44. '<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link" href="#">' . esc_html__( 'Become a Member', 'twentytwenty' ) . '</a></div>',
  45. '<!-- /wp:button --></div></div>',
  46. '<!-- /wp:group --></div></div>',
  47. '<!-- /wp:group -->',
  48. )
  49. ),
  50. )
  51. );
  52. // Double Call to Action.
  53. register_block_pattern(
  54. 'twentytwenty/double-call-to-action',
  55. array(
  56. 'title' => esc_html__( 'Double Call to Action', 'twentytwenty' ),
  57. 'categories' => array( 'twentytwenty' ),
  58. 'viewportWidth' => 1400,
  59. 'content' => implode(
  60. '',
  61. array(
  62. '<!-- wp:columns {"align":"wide"} -->',
  63. '<div class="wp-block-columns alignwide"><!-- wp:column -->',
  64. '<div class="wp-block-column"><!-- wp:group {"style":{"color":{"background":"#ffffff"}}} -->',
  65. '<div class="wp-block-group has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
  66. '<h2 class="has-text-align-center">' . esc_html__( 'The Museum', 'twentytwenty' ) . '</h2>',
  67. '<!-- /wp:heading -->',
  68. '<!-- wp:paragraph {"align":"center"} -->',
  69. '<p class="has-text-align-center">' . esc_html__( 'Award-winning exhibitions featuring internationally-renowned artists.', 'twentytwenty' ) . '</p>',
  70. '<!-- /wp:paragraph -->',
  71. '<!-- wp:buttons {"align":"center"} -->',
  72. '<div class="wp-block-buttons aligncenter"><!-- wp:button {"className":"is-style-outline"} -->',
  73. '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link">' . esc_html__( 'Read More', 'twentytwenty' ) . '</a></div>',
  74. '<!-- /wp:button --></div>',
  75. '<!-- /wp:buttons --></div></div>',
  76. '<!-- /wp:group --></div>',
  77. '<!-- /wp:column -->',
  78. '<!-- wp:column -->',
  79. '<div class="wp-block-column"><!-- wp:group {"style":{"color":{"background":"#ffffff"}}} -->',
  80. '<div class="wp-block-group has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
  81. '<h2 class="has-text-align-center">' . esc_html__( 'The Store', 'twentytwenty' ) . '</h2>',
  82. '<!-- /wp:heading -->',
  83. '<!-- wp:paragraph {"align":"center"} -->',
  84. '<p class="has-text-align-center">' . esc_html__( 'An awe-inspiring collection of books, prints, and gifts from our exhibitions.', 'twentytwenty' ) . '</p>',
  85. '<!-- /wp:paragraph -->',
  86. '<!-- wp:buttons {"align":"center"} -->',
  87. '<div class="wp-block-buttons aligncenter"><!-- wp:button {"className":"is-style-outline"} -->',
  88. '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link">' . esc_html__( 'Shop Now', 'twentytwenty' ) . '</a></div>',
  89. '<!-- /wp:button --></div>',
  90. '<!-- /wp:buttons --></div></div>',
  91. '<!-- /wp:group --></div>',
  92. '<!-- /wp:column --></div>',
  93. '<!-- /wp:columns -->',
  94. )
  95. ),
  96. )
  97. );
  98. // Event Details.
  99. register_block_pattern(
  100. 'twentytwenty/event-details',
  101. array(
  102. 'title' => esc_html__( 'Event Details', 'twentytwenty' ),
  103. 'categories' => array( 'twentytwenty' ),
  104. 'viewportWidth' => 1400,
  105. 'content' => implode(
  106. '',
  107. array(
  108. '<!-- wp:group {"align":"wide","backgroundColor":"primary"} -->',
  109. '<div class="wp-block-group alignwide has-primary-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:columns -->',
  110. '<div class="wp-block-columns"><!-- wp:column -->',
  111. '<div class="wp-block-column"><!-- wp:paragraph {"align":"center","textColor":"background","fontSize":"large"} -->',
  112. '<p class="has-text-align-center has-background-color has-text-color has-large-font-size">' . wp_kses_post( __( '<em>Dates</em><br>Aug 1 — Dec 1', 'twentytwenty' ) ) . '</p>',
  113. '<!-- /wp:paragraph --></div>',
  114. '<!-- /wp:column -->',
  115. '<!-- wp:column -->',
  116. '<div class="wp-block-column"><!-- wp:paragraph {"align":"center","textColor":"background","fontSize":"large"} -->',
  117. '<p class="has-text-align-center has-background-color has-text-color has-large-font-size">' . wp_kses_post( __( '<em>Location</em><br>Exhibit Hall B', 'twentytwenty' ) ) . '</p>',
  118. '<!-- /wp:paragraph --></div>',
  119. '<!-- /wp:column -->',
  120. '<!-- wp:column -->',
  121. '<div class="wp-block-column"><!-- wp:paragraph {"align":"center","textColor":"background","fontSize":"large"} -->',
  122. '<p class="has-text-align-center has-background-color has-text-color has-large-font-size">' . wp_kses_post( __( '<em>Price</em><br>Included', 'twentytwenty' ) ) . '</p>',
  123. '<!-- /wp:paragraph --></div>',
  124. '<!-- /wp:column --></div>',
  125. '<!-- /wp:columns --></div></div>',
  126. '<!-- /wp:group -->',
  127. )
  128. ),
  129. )
  130. );
  131. // Featured Content.
  132. register_block_pattern(
  133. 'twentytwenty/featured-content',
  134. array(
  135. 'title' => esc_html__( 'Featured Content', 'twentytwenty' ),
  136. 'categories' => array( 'twentytwenty' ),
  137. 'viewportWidth' => 1400,
  138. 'content' => implode(
  139. '',
  140. array(
  141. '<!-- wp:columns {"align":"wide"} -->',
  142. '<div class="wp-block-columns alignwide"><!-- wp:column -->',
  143. '<div class="wp-block-column"><!-- wp:image {"sizeSlug":"full"} -->',
  144. '<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/2020-three-quarters-1.png" alt="' . esc_attr__( 'Abstract Rectangles', 'twentytwenty' ) . '"/></figure>',
  145. '<!-- /wp:image -->',
  146. '<!-- wp:heading -->',
  147. '<h2>' . esc_html__( 'Works and Days', 'twentytwenty' ) . '</h2>',
  148. '<!-- /wp:heading -->',
  149. '<!-- wp:paragraph {"fontSize":"larger"} -->',
  150. '<p class="has-larger-font-size">' . esc_html__( 'August 1 — December 1', 'twentytwenty' ) . '</p>',
  151. '<!-- /wp:paragraph -->',
  152. '<!-- wp:button {"align":"left","className":"is-style-outline"} -->',
  153. '<div class="wp-block-button alignleft is-style-outline"><a class="wp-block-button__link" href="#">' . esc_html__( 'Read More', 'twentytwenty' ) . '</a></div>',
  154. '<!-- /wp:button --></div>',
  155. '<!-- /wp:column -->',
  156. '<!-- wp:column -->',
  157. '<div class="wp-block-column"><!-- wp:image {sizeSlug":"full"} -->',
  158. '<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/2020-three-quarters-2.png" alt="' . esc_attr__( 'Abstract Rectangles', 'twentytwenty' ) . '"/></figure>',
  159. '<!-- /wp:image -->',
  160. '<!-- wp:heading -->',
  161. '<h2>' . esc_html__( 'The Life I Deserve', 'twentytwenty' ) . '</h2>',
  162. '<!-- /wp:heading -->',
  163. '<!-- wp:paragraph {"fontSize":"larger"} -->',
  164. '<p class="has-larger-font-size">' . esc_html__( 'August 1 — December 1', 'twentytwenty' ) . '</p>',
  165. '<!-- /wp:paragraph -->',
  166. '<!-- wp:button {"align":"left","className":"is-style-outline"} -->',
  167. '<div class="wp-block-button alignleft is-style-outline"><a class="wp-block-button__link" href="#">' . esc_html__( 'Read More', 'twentytwenty' ) . '</a></div>',
  168. '<!-- /wp:button --></div>',
  169. '<!-- /wp:column --></div>',
  170. '<!-- /wp:columns -->',
  171. )
  172. ),
  173. )
  174. );
  175. // Introduction.
  176. register_block_pattern(
  177. 'twentytwenty/introduction',
  178. array(
  179. 'title' => esc_html__( 'Introduction', 'twentytwenty' ),
  180. 'categories' => array( 'twentytwenty' ),
  181. 'viewportWidth' => 1400,
  182. 'content' => implode(
  183. '',
  184. array(
  185. '<!-- wp:heading {"align":"center"} -->',
  186. '<h2 class="has-text-align-center">' . esc_html__( 'The Premier Destination for Modern Art in Sweden', 'twentytwenty' ) . '</h2>',
  187. '<!-- /wp:heading -->',
  188. '<!-- wp:paragraph {"dropCap":true} -->',
  189. '<p class="has-drop-cap">' . esc_html__( 'With seven floors of striking architecture, UMoMA shows exhibitions of international contemporary art, sometimes along with art historical retrospectives. Existential, political, and philosophical issues are intrinsic to our program. As visitor, you are invited to guided tours artist talks, lectures, film screenings, and other events with free admission.', 'twentytwenty' ) . '</p>',
  190. '<!-- /wp:paragraph -->',
  191. )
  192. ),
  193. )
  194. );
  195. }