Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion patterns/author-bio/author-bio-avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* Categories: newspack-block-theme-author-bio
* Viewport Width: 632
* Inserter: yes
* Block Types: core/avatar, core/post-author-name, core/post-author-biography
* Block Types: newspack-blocks/author-profile, core/avatar, core/post-author-name, core/post-author-biography
*
* @package Newspack_Block_Theme
*/

$registry = WP_Block_Type_Registry::get_instance();
?>
<!-- wp:group {"metadata":{"name":"<?php esc_html_e( 'Author Bio', 'newspack-block-theme' ); ?>"},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group">
Expand All @@ -18,6 +19,12 @@
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>
<!-- /wp:separator -->

<?php if ( $registry->get_registered( 'newspack-blocks/author-profile' ) ) : ?>

<!-- wp:newspack-blocks/author-profile {"isContextual":true,"layoutVersion":2,"variation":"avatar-left"} /-->

<?php else : ?>

<!-- wp:group {"metadata":{"name":"<?php esc_html_e( 'Content', 'newspack-block-theme' ); ?>"},"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"default"}} -->
<div class="wp-block-group">

Expand All @@ -30,6 +37,8 @@
</div>
<!-- /wp:group -->

<?php endif; ?>

<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>
<!-- /wp:separator -->
Expand Down
11 changes: 10 additions & 1 deletion patterns/author-bio/author-bio.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* Categories: newspack-block-theme-author-bio
* Viewport Width: 632
* Inserter: yes
* Block Types: core/post-author-name, core/post-author-biography
* Block Types: newspack-blocks/author-profile, core/post-author-name, core/post-author-biography
*
* @package Newspack_Block_Theme
*/

$registry = WP_Block_Type_Registry::get_instance();
?>
<!-- wp:group {"metadata":{"name":"<?php esc_html_e( 'Author Bio', 'newspack-block-theme' ); ?>"},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group">
Expand All @@ -18,6 +19,12 @@
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>
<!-- /wp:separator -->

<?php if ( $registry->get_registered( 'newspack-blocks/author-profile' ) ) : ?>

<!-- wp:newspack-blocks/author-profile {"isContextual":true,"layoutVersion":2,"variation":"compact"} /-->

<?php else : ?>

<!-- wp:group {"metadata":{"name":"<?php esc_html_e( 'Content', 'newspack-block-theme' ); ?>"},"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"default"}} -->
<div class="wp-block-group">

Expand All @@ -28,6 +35,8 @@
</div>
<!-- /wp:group -->

<?php endif; ?>

<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>
<!-- /wp:separator -->
Expand Down
Loading