Skip to content

Commit

Permalink
make compatible across environments
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Aug 27, 2021
1 parent 780eb0a commit c8b1d62
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"FS_METHOD": "direct",
"WP_ENVIRONMENT_TYPE": "local",
"JETPACK_DEV_DEBUG": true,
"WPORG_SANDBOXED": true
"WPORG_SANDBOXED": true,
"WPORG_GIT_MUPLUGINS_DIR": "/var/www/html/vendor/wporg/wporg-mu-plugins/mu-plugins"
},
"core": "WordPress/WordPress#5.8",
"plugins": [
Expand All @@ -21,6 +22,7 @@
],
"mappings": {
"env": "./env",
"wp-content/mu-plugins/0-sandbox.php": "./env/0-sandbox.php"
"wp-content/mu-plugins/0-sandbox.php": "./env/0-sandbox.php",
"vendor/wporg": "./vendor/wporg"
}
}
5 changes: 1 addition & 4 deletions env/0-sandbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@

defined( 'WPINC' ) || die();

define( 'WPORG_GIT_MUPLUGINS_DIR', dirname( ABSPATH ) . '/vendor/wporg/wporg-mu-plugins' );
// name better - how to distinguish from the muplugins in the git repo, the ones in meta.svn, and the ones in dotorg.svn
// this might need a different path for wp-env vs my local nginx env vs production
// maybe have composer install it into mu-plugins?
require_once WPORG_GIT_MUPLUGINS_DIR . '/blocks/global-header-footer/blocks.php';
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ These must be run in the project's root folder, _not_ in theme/plugin subfolders
* Stop the environment: `yarn run env:stop` or `yarn run wp-env stop`
* Restart the environment: `yarn run env` or `yarn run wp-env start`
* Reset the dev site's content: `yarn run env:reset && yarn run env:import`
* SSH into docker container: `docker exec -it {container ID} /bin/bash`. You can get the ID from `docker ps`.

### Asset management

Expand Down
2 changes: 0 additions & 2 deletions source/wp-content/themes/wporg-news-2021/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace WordPressdotorg\Theme\News_2021;

require_once WPORG_GIT_MUPLUGINS_DIR . '/mu-plugins/blocks/global-header-footer/blocks.php';

/**
* Actions and filters.
*/
Expand Down

0 comments on commit c8b1d62

Please sign in to comment.