From a78368a45a9f0fdd554cd4098dadbbad5a5feb2b Mon Sep 17 00:00:00 2001 From: Ben Greeley Date: Mon, 13 Feb 2023 15:32:06 -0500 Subject: [PATCH 1/6] Create pattern for posting page, add hosting-2 to the page list to use the new theme. --- .../wp-content/mu-plugins/theme-switcher.php | 1 + .../wporg-main-2022/patterns/hosting.php | 100 ++++++++++++++++++ .../templates/page-hosting.html | 9 ++ 3 files changed, 110 insertions(+) create mode 100644 source/wp-content/themes/wporg-main-2022/patterns/hosting.php create mode 100644 source/wp-content/themes/wporg-main-2022/templates/page-hosting.html diff --git a/source/wp-content/mu-plugins/theme-switcher.php b/source/wp-content/mu-plugins/theme-switcher.php index 473b0e9e..5f7cef02 100644 --- a/source/wp-content/mu-plugins/theme-switcher.php +++ b/source/wp-content/mu-plugins/theme-switcher.php @@ -46,6 +46,7 @@ function should_use_new_theme() { '/download/releases/', '/download/source/', '/mobile/', + '/hosting-2/', ); if ( ! in_array( $request_uri, $new_theme_pages ) ) { return false; diff --git a/source/wp-content/themes/wporg-main-2022/patterns/hosting.php b/source/wp-content/themes/wporg-main-2022/patterns/hosting.php new file mode 100644 index 00000000..ae021b32 --- /dev/null +++ b/source/wp-content/themes/wporg-main-2022/patterns/hosting.php @@ -0,0 +1,100 @@ + +
+

+ + + +

+
+ + + +
+

+ + + +

.

+ + + +

+ + + +

+
+ + + +
+
+
Bluehost logo
+ + + +

+ + + +

·

+
+
+ + + +
+
+
+ + + +

+ + + +

·

+
+
+ + + +
+
+
Siteground
+ + + +

+ + + +

·

+
+
+ + + +
+
+

+ + + +

+ + + +
+
+
+
+
+ \ No newline at end of file diff --git a/source/wp-content/themes/wporg-main-2022/templates/page-hosting.html b/source/wp-content/themes/wporg-main-2022/templates/page-hosting.html new file mode 100644 index 00000000..2a47c761 --- /dev/null +++ b/source/wp-content/themes/wporg-main-2022/templates/page-hosting.html @@ -0,0 +1,9 @@ + + + +
+ +
+ + + From e92a47b9d4b145ba76990dcb9b8f3399c7ec89e0 Mon Sep 17 00:00:00 2001 From: Ben Greeley Date: Mon, 13 Feb 2023 15:41:26 -0500 Subject: [PATCH 2/6] Rename the hosting page slug reference for launching of the hosting page. --- source/wp-content/mu-plugins/theme-switcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/mu-plugins/theme-switcher.php b/source/wp-content/mu-plugins/theme-switcher.php index 71564818..d3abfc04 100644 --- a/source/wp-content/mu-plugins/theme-switcher.php +++ b/source/wp-content/mu-plugins/theme-switcher.php @@ -67,7 +67,7 @@ function should_use_new_theme() { '/about-2/etiquette-2/', '/about-2/swag-2/', '/about-2/logos-2/', - '/hosting-2/', + '/hosting/', ); if ( ! in_array( $request_uri, $new_theme_pages ) ) { return false; From d1631fed5dbd2dd472b9cf3e9ca6588dfe4199b5 Mon Sep 17 00:00:00 2001 From: Ben Greeley Date: Mon, 13 Feb 2023 15:51:40 -0500 Subject: [PATCH 3/6] Fix linting errors. --- .../wp-content/themes/wporg-main-2022/patterns/hosting.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/wp-content/themes/wporg-main-2022/patterns/hosting.php b/source/wp-content/themes/wporg-main-2022/patterns/hosting.php index ae021b32..1860d74d 100644 --- a/source/wp-content/themes/wporg-main-2022/patterns/hosting.php +++ b/source/wp-content/themes/wporg-main-2022/patterns/hosting.php @@ -2,10 +2,11 @@ /** * Title: Hosting * Slug: wporg-main-2022/hosting - * Inserter: no + * Inserter: no */ - ?> +?> +

@@ -97,4 +98,4 @@
- \ No newline at end of file + From 6747d3511a73e8015cec0c8666469a15f4aeecf5 Mon Sep 17 00:00:00 2001 From: Ben Greeley Date: Mon, 13 Feb 2023 16:05:27 -0500 Subject: [PATCH 4/6] Add hosting entry to page-manifest --- env/page-manifest.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/env/page-manifest.json b/env/page-manifest.json index 0c0e161a..de957ad1 100644 --- a/env/page-manifest.json +++ b/env/page-manifest.json @@ -114,5 +114,10 @@ { "slug": "search", "template": "page-search.html" - } + }, + { + "slug": "hosting-2", + "pattern": "hosting.php", + "template": "page-hosting.html" + }, ] \ No newline at end of file From 34c4a2cf20f7f12378b386dfaa792a2b361d15ed Mon Sep 17 00:00:00 2001 From: Ben Greeley Date: Mon, 13 Feb 2023 16:06:35 -0500 Subject: [PATCH 5/6] Remove trailing comma --- env/page-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/page-manifest.json b/env/page-manifest.json index de957ad1..ad6a27fc 100644 --- a/env/page-manifest.json +++ b/env/page-manifest.json @@ -119,5 +119,5 @@ "slug": "hosting-2", "pattern": "hosting.php", "template": "page-hosting.html" - }, + } ] \ No newline at end of file From 9017e702ec5ba4a118352d53da279344f7347653 Mon Sep 17 00:00:00 2001 From: Ben Greeley Date: Mon, 13 Feb 2023 16:07:23 -0500 Subject: [PATCH 6/6] Rename page-manifest.json entry for hosting. --- env/page-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/page-manifest.json b/env/page-manifest.json index ad6a27fc..9bd86e86 100644 --- a/env/page-manifest.json +++ b/env/page-manifest.json @@ -116,7 +116,7 @@ "template": "page-search.html" }, { - "slug": "hosting-2", + "slug": "hosting", "pattern": "hosting.php", "template": "page-hosting.html" }