Skip to content

Commit

Permalink
Twenty Twenty-Four: Bugfixes for 6.4 RC1.
Browse files Browse the repository at this point in the history
Resyncing changes for TT4 into Core.

Changes include:
* Reformatted all the patterns for readability.
* Bugfixes in the markup and improvements on the string translation functions.
* Renaming of some patterns, making them consistent with the content they show and whether they are simple patterns, full-page patterns or patterns meant to replace templates.

Follow-up to [56813], [56764], [56716].

Props richtabor, onemaggie, luminuu, shailu25, dunhakdis, shivashankerbhatta, dajeema, enodekciw, kafleg, viralsampat, glendaviesnz, beafialho, webmandesign, huzaifaalmesbah, gregfuller, benharri.
Fixes #59640.

git-svn-id: https://develop.svn.wordpress.org/trunk@56951 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
hellofromtonya committed Oct 17, 2023
1 parent c197e15 commit 1455e76
Show file tree
Hide file tree
Showing 106 changed files with 3,423 additions and 2,269 deletions.
28 changes: 27 additions & 1 deletion src/wp-content/themes/twentytwentyfour/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* Register block Styles
* Register block styles
*/

if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) :
Expand Down Expand Up @@ -165,3 +165,29 @@ function twentytwentyfour_block_styles() {
endif;

add_action( 'init', 'twentytwentyfour_block_styles' );

/**
* Register pattern categories.
*/

if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) :
/**
* Register pattern categories
*
* @return void
* @since Twenty Twenty-Four 1.0
*
*/
function twentytwentyfour_pattern_categories() {

register_block_pattern_category(
'page',
array(
'label' => _x( 'Pages', 'Block pattern category' ),
'description' => __( 'A collection of full page layouts.' ),
)
);
}
endif;

add_action( 'init', 'twentytwentyfour_pattern_categories' );

This file was deleted.

This file was deleted.

27 changes: 18 additions & 9 deletions src/wp-content/themes/twentytwentyfour/parts/header.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"20px","bottom":"20px"}}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-base-background-color has-background" style="padding-top:20px;padding-bottom:20px"><!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
<div class="wp-block-group alignwide"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:site-logo {"width":60 } /-->
<div class="wp-block-group alignwide has-base-background-color has-background"
style="padding-top:20px;padding-bottom:20px">
<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
<div class="wp-block-group alignwide">
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
<div class="wp-block-group">
<!-- wp:site-logo {"width":60 } /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-group"><!-- wp:site-title {"level":0} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-group">
<!-- wp:site-title {"level":0} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

<!-- wp:navigation {"layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}}} /--></div>
<!-- /wp:group --></div>
<!-- wp:navigation {"layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!-- wp:pattern {"slug":"twentytwentyfour/post-meta"} /-->
<!-- wp:pattern {"slug":"twentytwentyfour/hidden-post-meta"} /-->
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentyfour/parts/sidebar.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!-- wp:pattern {"slug":"twentytwentyfour/sidebar"} /-->
<!-- wp:pattern {"slug":"twentytwentyfour/hidden-sidebar"} /-->
55 changes: 55 additions & 0 deletions src/wp-content/themes/twentytwentyfour/patterns/banner-hero.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* Title: Hero
* Slug: twentytwentyfour/banner-hero
* Categories: banner, call-to-action, featured
* Viewport width: 1400
*/
?>

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"layout":{"type":"constrained","contentSize":"","wideSize":""}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">

<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}},"layout":{"type":"constrained","contentSize":"565px"}} -->
<div class="wp-block-group">

<!-- wp:heading {"textAlign":"center","fontSize":"x-large","level":1} -->
<h1 class="wp-block-heading has-text-align-center has-x-large-font-size"><?php echo esc_html_x( 'A commitment to innovation and sustainability', 'Heading of the hero section', 'twentytwentyfour' ); ?></h1>
<!-- /wp:heading -->

<!-- wp:spacer {"height":"1.25rem"} -->
<div style="height:1.25rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center"><?php echo esc_html_x( 'Études is a pioneering firm that seamlessly merges creativity and functionality to redefine architectural excellence.', 'Content of the hero section', 'twentytwentyfour' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:spacer {"height":"1.25rem"} -->
<div style="height:1.25rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons">
<!-- wp:button -->
<div class="wp-block-button">
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'About us', 'Button text of the hero section', 'twentytwentyfour' ); ?></a>
</div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
</div>
<!-- /wp:group -->

<!-- wp:spacer {"height":"var:preset|spacing|30","style":{"layout":{}}} -->
<div style="height:var(--wp--preset--spacing--30)" aria-hidden="true" class="wp-block-spacer">
</div>
<!-- /wp:spacer -->

<!-- wp:image {"align":"wide","sizeSlug":"full","linkDestination":"none","className":"is-style-rounded"} -->
<figure class="wp-block-image alignwide size-full is-style-rounded">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/building-exterior.webp" alt="<?php esc_attr_e( 'Building exterior in Toronto, Canada', 'twentytwentyfour' ); ?>" />
</figure>
<!-- /wp:image -->
</div>
<!-- /wp:group -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* Title: Project description
* Slug: twentytwentyfour/banner-project-description
* Categories: featured, banner, about, portfolio
* Viewport width: 1400
*/
?>
<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"backgroundColor":"accent-2","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-accent-2-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide">
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%">
<!-- wp:paragraph {"style":{"layout":{"selfStretch":"fixed","flexSize":"50%"}}} -->
<p><?php echo esc_html_x( 'Art Gallery — Overview', 'Sample title for a project or post', 'twentytwentyfour' ); ?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"60%"} -->
<div class="wp-block-column" style="flex-basis:60%">

<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.2"}},"fontSize":"x-large","fontFamily":"heading"} -->
<p class="has-heading-font-family has-x-large-font-size" style="line-height:1.2"><?php echo esc_html_x( 'This transformative project seeks to enhance the gallery\'s infrastructure, accessibility, and exhibition spaces while preserving its rich cultural heritage.', 'Sample descriptive text for a project or post.', 'twentytwentyfour' ); ?></p>
<!-- /wp:paragraph -->

</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->

<!-- wp:spacer {"height":"var:preset|spacing|40"} -->
<div style="height:var(--wp--preset--spacing--40)" aria-hidden="true" class="wp-block-spacer">
</div>
<!-- /wp:spacer -->

<!-- wp:image {"align":"wide","sizeSlug":"large","linkDestination":"none","className":"is-style-rounded"} -->
<figure class="wp-block-image alignwide size-large is-style-rounded">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/hotel-facade.webp" alt="<?php esc_attr_e( 'Hyatt Regency San Francisco, San Francisco, United States', 'twentytwentyfour' ); ?>" />
</figure>
<!-- /wp:image -->
</div>
<!-- /wp:group -->

This file was deleted.

50 changes: 0 additions & 50 deletions src/wp-content/themes/twentytwentyfour/patterns/clients.php

This file was deleted.

64 changes: 0 additions & 64 deletions src/wp-content/themes/twentytwentyfour/patterns/columns.php

This file was deleted.

Loading

0 comments on commit 1455e76

Please sign in to comment.