Skip to content

Commit 3393625

Browse files
committed
WIP
1 parent 6262777 commit 3393625

File tree

3 files changed

+126
-30
lines changed

3 files changed

+126
-30
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@
55
- [New developer.gatherpress.org · Issue #1 · carstingaxion/gatherpress-devhub](https://github.com/carstingaxion/gatherpress-devhub/issues/1)
66
- [WordPress devhub blueprint · Issue #44 · WordPress/blueprints](https://github.com/WordPress/blueprints/issues/44)
77

8-
[<kbd> <br> Edit <code>blueprint.json</code> <br> </kbd>](https://playground.wordpress.net/builder/builder.html?blueprint-url=https://raw.githubusercontent.com/carstingaxion/gatherpress-devhub/main/blueprint.json)
8+
[<kbd> <br> Edit <code>blueprint.json</code> <br> </kbd>](https://playground.wordpress.net/builder/builder.html?blueprint-url=https://raw.githubusercontent.com/carstingaxion/gatherpress-devhub/main/blueprint.json)
9+
10+
---
11+
12+
## Learnings
13+
14+
1. Needs to run php 7.4
15+
2.

blueprint.json

+56-29
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,65 @@
2525
"username": "admin",
2626
"password": "password"
2727
},
28-
{
29-
"step": "writeFile",
30-
"path": "/wordpress/assets.zip",
31-
"data": {
32-
"resource": "url",
33-
"url": "https://raw.githubusercontent.com/carstingaxion/gatherpress-devhub/main/zips/playground-assets.zip",
34-
"caption": "Downloading CI/CD prepared assets."
35-
},
36-
"progress": {
37-
"weight": 2,
38-
"caption": "Applying CI/CD prepared assets."
39-
}
40-
},
41-
{
42-
"step": "unzip",
43-
"zipFile": {
44-
"resource": "vfs",
45-
"path": "/wordpress/assets.zip"
46-
},
47-
"extractToPath": "/wordpress"
28+
{
29+
"step": "writeFile",
30+
"path": "/wordpress/wporg-mu-plugins.zip",
31+
"data": {
32+
"resource": "url",
33+
"url": "https://github-proxy.com/proxy/?repo=WordPress/wporg-mu-plugins&branch=build&directory=mu-plugins",
34+
"caption": "Downloading wporg-mu-plugins."
4835
},
49-
{
50-
"step": "wp-cli",
51-
"command": "wp plugin activate phpdoc-parser"
36+
"progress": {
37+
"weight": 2,
38+
"caption": "Applying wporg-mu-plugins."
39+
}
40+
},
41+
{
42+
"step": "unzip",
43+
"zipFile": {
44+
"resource": "vfs",
45+
"path": "/wordpress/wporg-mu-plugins.zip"
5246
},
53-
{
54-
"step": "wp-cli",
55-
"command": "wp parser create '/wordpress/wp-content/plugins/gatherpress' --user=1"
47+
"extractToPath": "/wordpress/wp-content/mu-plugins"
48+
},
49+
{
50+
"step": "writeFile",
51+
"path": "/wordpress/wp-content/mu-plugins/loader.php",
52+
"data": {
53+
"resource": "url",
54+
"url": "https://raw.githubusercontent.com/carstingaxion/gatherpress-devhub/WIP/use-build-deps/wp-content/mu-plugins/loader.php"
55+
}
56+
},
57+
{
58+
"step": "installTheme",
59+
"themeZipFile": {
60+
"resource": "url",
61+
"url": "https://github-proxy.com/proxy/?repo=wporg-parent-2021&branch=build"
62+
}
63+
},
64+
{
65+
"step": "installTheme",
66+
"themeZipFile": {
67+
"resource": "url",
68+
"url": "https://github-proxy.com/proxy/?repo=WordPress/wporg-developer&branch=build"
69+
},
70+
"options": {
71+
"activate": true
72+
}
73+
},
74+
{
75+
"step": "installPlugin",
76+
"pluginZipFile": {
77+
"resource": "url",
78+
"url": "https://github-proxy.com/proxy/?repo=WordPress/phpdoc-parser&branch=master"
5679
},
57-
{
58-
"step": "wp-cli",
59-
"command": "wp theme activate wporg-developer-2023"
80+
"options": {
81+
"activate": true
82+
}
83+
},
84+
{
85+
"step": "wp-cli",
86+
"command": "wp parser create '/wordpress/wp-content/plugins/gatherpress' --user=1"
6087
}
6188
]
6289
}

wp-content/mu-plugins/loader.php

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/**
3+
* COPY OF & REPLACEMENT FOR
4+
* https://github.com/WordPress/wporg-mu-plugins/blob/trunk/mu-plugins/loader.php
5+
*/
6+
7+
namespace WordPressdotorg\MU_Plugins;
8+
9+
use WordPressdotorg\Autoload;
10+
11+
/**
12+
* Load mu-plugins.
13+
*
14+
* `utilities/` aren't loaded automatically since they're not used globally.
15+
*/
16+
17+
// Load and register the Autoloader.
18+
if ( ! class_exists( '\WordPressdotorg\Autoload\Autoloader', false ) ) {
19+
require_once __DIR__ . '/autoloader/class-autoloader.php';
20+
}
21+
22+
Autoload\register_class_path( __NAMESPACE__, __DIR__ );
23+
24+
// Composer loader.
25+
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
26+
// Production.
27+
require_once __DIR__ . '/vendor/autoload.php';
28+
} elseif ( file_exists( dirname( __DIR__ ) . '/vendor/autoload.php' ) ) {
29+
// Development.
30+
require_once dirname( __DIR__ ) . '/vendor/autoload.php';
31+
}
32+
33+
require_once __DIR__ . '/helpers/helpers.php';
34+
require_once __DIR__ . '/blocks/favorite-button/index.php';
35+
require_once __DIR__ . '/blocks/global-header-footer/blocks.php';
36+
require_once __DIR__ . '/blocks/google-map/index.php';
37+
require_once __DIR__ . '/blocks/handbook-meta-link/block.php';
38+
require_once __DIR__ . '/blocks/horizontal-slider/horizontal-slider.php';
39+
require_once __DIR__ . '/blocks/language-suggest/language-suggest.php';
40+
require_once __DIR__ . '/blocks/local-navigation-bar/index.php';
41+
// require_once __DIR__ . '/blocks/latest-news/latest-news.php';
42+
require_once __DIR__ . '/blocks/link-wrapper/index.php';
43+
require_once __DIR__ . '/blocks/navigation/index.php';
44+
require_once __DIR__ . '/blocks/notice/index.php';
45+
require_once __DIR__ . '/blocks/query-filter/index.php';
46+
require_once __DIR__ . '/blocks/query-has-results/index.php';
47+
require_once __DIR__ . '/blocks/query-total/index.php';
48+
require_once __DIR__ . '/blocks/ratings-bars/index.php';
49+
require_once __DIR__ . '/blocks/ratings-stars/index.php';
50+
require_once __DIR__ . '/blocks/sidebar-container/index.php';
51+
require_once __DIR__ . '/blocks/screenshot-preview/block.php';
52+
require_once __DIR__ . '/blocks/screenshot-preview-block/block.php';
53+
require_once __DIR__ . '/blocks/site-breadcrumbs/index.php';
54+
require_once __DIR__ . '/blocks/table-of-contents/index.php';
55+
require_once __DIR__ . '/blocks/time/index.php';
56+
require_once __DIR__ . '/global-fonts/index.php';
57+
require_once __DIR__ . '/plugin-tweaks/index.php';
58+
require_once __DIR__ . '/rest-api/index.php';
59+
require_once __DIR__ . '/skip-to/skip-to.php';
60+
// require_once __DIR__ . '/db-user-sessions/index.php';
61+
// require_once __DIR__ . '/encryption/index.php';
62+
// require_once __DIR__ . '/admin/index.php';

0 commit comments

Comments
 (0)