diff --git a/composer.json b/composer.json
index 54fe0b047..0d4daef03 100644
--- a/composer.json
+++ b/composer.json
@@ -74,7 +74,7 @@
{
"name": "wordpress-meta/handbook",
"type": "wordpress-plugin",
- "version": "1",
+ "version": "2",
"source": {
"type": "svn",
"url": "https://meta.svn.wordpress.org/sites/",
@@ -93,7 +93,7 @@
"wpackagist-plugin/jetpack": "*",
"wordpress-meta/pub": "1",
"wordpress-meta/wporg-markdown": "1",
- "wordpress-meta/handbook": "1",
+ "wordpress-meta/handbook": "2",
"wporg/wporg-repo-tools": "dev-trunk",
"wporg/wporg-mu-plugins": "dev-build",
"wordpress/phpdoc-parser": "dev-master",
diff --git a/composer.lock b/composer.lock
index c35af814d..3110c3f68 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "a0a9c7399b3a1f2d9316f05da879787f",
+ "content-hash": "b4882090d797516700f701a8cabbbe38",
"packages": [],
"packages-dev": [
{
@@ -2329,7 +2329,7 @@
},
{
"name": "wordpress-meta/handbook",
- "version": "1",
+ "version": "2",
"source": {
"type": "svn",
"url": "https://meta.svn.wordpress.org/sites/",
diff --git a/source/wp-content/themes/wporg-developer-2023/functions.php b/source/wp-content/themes/wporg-developer-2023/functions.php
index 203ca2a9b..41c955de2 100644
--- a/source/wp-content/themes/wporg-developer-2023/functions.php
+++ b/source/wp-content/themes/wporg-developer-2023/functions.php
@@ -189,6 +189,7 @@
add_filter( 'next_post_link', __NAMESPACE__ . '\get_adjacent_handbook_post_link', 10, 5 );
add_filter( 'previous_post_link', __NAMESPACE__ . '\get_adjacent_handbook_post_link', 10, 5 );
add_filter( 'get_the_archive_title_prefix', __NAMESPACE__ . '\get_reference_since_title_prefix' );
+add_filter( 'the_content', __NAMESPACE__ . '\filter_standards_content' );
// Priority must be lower than 5 to precede table of contents filter.
// See: https://github.com/WordPress/wporg-mu-plugins/blob/3867a4ff6fa81de5f1e2e7b1ed4b123e4b4915b3/mu-plugins/blocks/table-of-contents/index.php#L94
@@ -591,6 +592,41 @@ function filter_code_content( $content ) {
);
}
+/**
+ * Filters content for the github handbooks to wrap tables with block markup for styles.
+ *
+ * @param string $content
+ * @return string
+ */
+function filter_standards_content( $content ) {
+ $post_type = get_post_type();
+ $handbooks = array(
+ 'wpcs-handbook',
+ 'blocks-handbook',
+ 'apis-handbook',
+ 'theme-handbook',
+ 'plugin-handbook',
+ 'rest-api-handbook',
+ 'cli-handbook',
+ 'adv-admin-handbook',
+ );
+
+ if ( ! in_array( $post_type, $handbooks ) ) {
+ return $content;
+ }
+
+ // Find table elements in the content and wrap with figure.wp-block-table
+ $content = preg_replace_callback(
+ '!
!is',
+ function( $matches ) {
+ return '';
+ },
+ $content
+ );
+
+ return $content;
+}
+
/**
* Filters content for the command content blocks so Table of Contents can be added.
diff --git a/source/wp-content/themes/wporg-developer-2023/patterns/article-meta-github.php b/source/wp-content/themes/wporg-developer-2023/patterns/article-meta-github.php
index 68985e630..1c0c47313 100644
--- a/source/wp-content/themes/wporg-developer-2023/patterns/article-meta-github.php
+++ b/source/wp-content/themes/wporg-developer-2023/patterns/article-meta-github.php
@@ -7,7 +7,7 @@
?>
-
+
diff --git a/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php b/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php
index 0e57b344d..be9ea46b1 100644
--- a/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php
+++ b/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php
@@ -12,7 +12,7 @@
-
+
diff --git a/source/wp-content/themes/wporg-developer-2023/patterns/handbook-pagination.php b/source/wp-content/themes/wporg-developer-2023/patterns/handbook-pagination.php
new file mode 100644
index 000000000..5aec08566
--- /dev/null
+++ b/source/wp-content/themes/wporg-developer-2023/patterns/handbook-pagination.php
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
diff --git a/source/wp-content/themes/wporg-developer-2023/src/chapter-list/block.php b/source/wp-content/themes/wporg-developer-2023/src/chapter-list/block.php
index 60bf7fb7d..1cfeb9cd2 100644
--- a/source/wp-content/themes/wporg-developer-2023/src/chapter-list/block.php
+++ b/source/wp-content/themes/wporg-developer-2023/src/chapter-list/block.php
@@ -58,8 +58,8 @@ function render( $attributes, $content, $block ) {
$content = wp_list_pages( $args );
$title = do_blocks(
- '
-
' . __( 'Chapters', 'wporg' ) . '
+ '
+
' . __( 'Chapters', 'wporg' ) . '
'
);
diff --git a/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss b/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss
index a4f9a1eea..1d5f39148 100644
--- a/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss
+++ b/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss
@@ -3,10 +3,6 @@
--local--button-size: calc(var(--local--line-height) * 1em);
line-height: var(--local--line-height);
- h2 {
- margin-bottom: var(--wp--preset--spacing--20);
- }
-
ul {
margin-top: 0;
margin-bottom: 0;
diff --git a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss
index 51ed3007d..d8eca93bb 100644
--- a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss
+++ b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss
@@ -42,17 +42,31 @@ body[class] {
}
}
-@media (min-width: 1440px) {
- .has-three-columns .wp-block-wporg-sidebar-container {
- --local--block-end-sidebar--width: 300px;
- --wp--style--global--wide-size: 1280px;
- }
-
+@media (min-width: 1320px) {
.has-three-columns {
- --local--block-start-sidebar--width: 260px;
+ --wp--style--global--wide-size: 1760px;
+
+ --local--block-start-sidebar--width: 300px;
+
display: grid;
grid-template-columns: var(--local--block-start-sidebar--width) 1fr;
- gap: var(--wp--preset--spacing--20);
+ grid-template-rows: auto auto;
+ column-gap: 40px;
+
+ .wp-block-wporg-sidebar-container {
+ --local--block-end-sidebar--width: 300px;
+ }
+
+ article {
+ --wp--style--global--content-size: 1080px;
+
+ width: clamp(30rem, -52.5rem + 100vw, 67.5rem);
+ }
+
+ .has-three-columns__pagination {
+ grid-row-start: 2;
+ grid-column-start: 2;
+ }
}
}
@@ -342,6 +356,10 @@ body[class] {
}
}
+.post-type-archive-command .wp-block-wporg-sidebar-container {
+ --wp--custom--wporg-sidebar-container--spacing--margin--top: 110px;
+}
+
.single-command {
h3 {
margin-bottom: var(--wp--preset--spacing--20);
diff --git a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook-github.html b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook-github.html
index 957002d04..37ef3c75d 100644
--- a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook-github.html
+++ b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook-github.html
@@ -1,10 +1,12 @@
-
+
-
-
+
+
+
+
@@ -20,20 +22,12 @@
+
+
-
-
-
-
-
-
-
-
-
-
diff --git a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html
index 7bcab65c0..d16078b7a 100644
--- a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html
+++ b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html
@@ -1,12 +1,12 @@
-
+
-
-
+
+
@@ -22,20 +22,12 @@
+
+
-
-
-
-
-
-
-
-
-
-
diff --git a/source/wp-content/themes/wporg-developer-2023/theme.json b/source/wp-content/themes/wporg-developer-2023/theme.json
index c495b468b..c7a2ac98f 100644
--- a/source/wp-content/themes/wporg-developer-2023/theme.json
+++ b/source/wp-content/themes/wporg-developer-2023/theme.json
@@ -144,6 +144,13 @@
"lineHeight": "var(--wp--custom--body--typography--line-height)",
"paddingVertical": "calc(( var(--wp--custom--select--height) - (var(--wp--custom--select--font-size) * var(--wp--custom--select--line-height))) / 2)",
"borderRadius": "var(--wp--custom--button--border--radius)"
+ },
+ "wporg-sidebar-container": {
+ "spacing": {
+ "margin": {
+ "top": "170px"
+ }
+ }
}
},
"typography": {