浏览代码

Skatepark: Add an improved testimonial block pattern

Sarah Norris 3 年之前
父节点
当前提交
5051f5fd77
共有 2 个文件被更改,包括 19 次插入0 次删除
  1. 1 0
      skatepark/inc/block-patterns.php
  2. 18 0
      skatepark/inc/patterns/testimonial.php

+ 1 - 0
skatepark/inc/block-patterns.php

@@ -21,6 +21,7 @@ if ( ! function_exists( 'skatepark_register_block_patterns' ) ) :
 				'pre-footer',
 				'text-list-with-button',
 				'full-width-image-with-aside-caption',
+				'testimonial',
 				'two-columns-of-text',
 			);
 

+ 18 - 0
skatepark/inc/patterns/testimonial.php

@@ -0,0 +1,18 @@
+<?php
+/**
+ * Testimonial.
+ *
+ * @package Skatepark
+ */
+
+return array(
+	'title'      => __( 'Testimonial', 'skatepark' ),
+	'categories' => array( 'skatepark' ),
+	'content'    => '<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"80px","bottom":"80px"}}}} -->
+    <div class="wp-block-group alignwide" style="padding-top:80px;padding-bottom:80px"><!-- wp:quote {"className":"is-style-testimonial-quote"} -->
+    <blockquote class="wp-block-quote is-style-testimonial-quote">
+    <p>' . esc_html__( 'I learned how to do a kick flip and made a bunch of new friends. Can’t wait to go back!', 'skatepark' ) . '</p>
+    <cite>' . esc_html__( 'Jane Doe', 'skatepark' ) . '</cite></blockquote>
+    <!-- /wp:quote --></div>
+    <!-- /wp:group -->',
+);