__( 'Query', 'gutenberg' ) ) ); // Initial Query block patterns. register_block_pattern( 'query/standard-posts', array( 'title' => __( 'Standard', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'query' ), 'content' => '
', ) ); register_block_pattern( 'query/medium-posts', array( 'title' => __( 'Image at left', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'query' ), 'content' => '
', ) ); register_block_pattern( 'query/small-posts', array( 'title' => __( 'Small image and title', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'query' ), 'content' => '
', ) ); register_block_pattern( 'query/grid-posts', array( 'title' => __( 'Grid', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'query' ), 'content' => '
', ) ); register_block_pattern( 'query/large-title-posts', array( 'title' => __( 'Large title', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'query' ), 'content' => '

', ) ); register_block_pattern( 'query/offset-posts', array( 'title' => __( 'Offset', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'query' ), 'content' => '
', ) ); // Initial block pattern to be used with block transformations with patterns. register_block_pattern( 'social-links/shared-background-color', array( 'title' => __( 'Social links with a shared background color', 'gutenberg' ), 'categories' => array( 'buttons' ), 'blockTypes' => array( 'core/social-links' ), 'viewportWidth' => 500, 'content' => ' ', ) ); // Deactivate the legacy patterns bundled with WordPress, and add new block patterns for testing. // More details in the trac issue (https://core.trac.wordpress.org/ticket/52846). add_action( 'init', function() { $core_block_patterns = array( 'text-two-columns', 'two-buttons', 'two-images', 'text-two-columns-with-images', 'text-three-columns-buttons', 'large-header', 'large-header-button', 'three-buttons', 'heading-paragraph', 'quote', ); $new_core_block_patterns = array( 'media-text-nature', 'two-images-gallery', 'three-columns-media-text', 'quote', 'large-header-left', 'large-header-text-button', 'media-text-art', 'text-two-columns-title', 'three-columns-text', 'text-two-columns-title-offset', 'heading', 'three-images-gallery', 'text-two-columns', 'media-text-arquitecture', 'two-buttons', ); if ( ! function_exists( 'unregister_block_pattern' ) ) { return; } foreach ( $core_block_patterns as $core_block_pattern ) { $name = 'core/' . $core_block_pattern; if ( WP_Block_Patterns_Registry::get_instance()->is_registered( $name ) ) { unregister_block_pattern( $name ); } } foreach ( $new_core_block_patterns as $core_block_pattern ) { register_block_pattern( 'core/' . $core_block_pattern, require __DIR__ . '/block-patterns/' . $core_block_pattern . '.php' ); } } );