> */ public static function export() { return [ [ 'id' => '4wp-faq', 'origin' => 'family', 'plugin' => '4wp-faq', 'block' => Plugin::BLOCK_NAME, 'label' => '4WP FAQ', 'maps' => [], 'wrap' => 'faq-qa', 'match' => [ 'type' => 'heading', 'level' => 2, 'pattern' => '', ], 'heading_seeds' => 'FAQ, Frequently Asked Questions, Часті питання', 'prompt' => 'H2 = FAQ section (any language — set the title in Drive Patterns). Each H3 is a question; paragraphs and lists under it are the answer. Pin the wrap in Incoming to remap.', 'auto' => false, 'manual' => true, ], ]; } /** * @param array> $items Drive catalog. * @return array> */ public static function register( array $items ) { foreach ( self::export() as $row ) { $items[] = $row; } return $items; } public static function has_faq_blocks( $content ) { return false !== strpos( (string) $content, 'wp:forwp/faq' ); } }