Skip to content
The development repo for mu-plugins used on the VIP Go platform.
Branch: master
Clone or download
mjangda Update templates to include public repo warning (#1286)
* Update templates to include public repo warning

* Add more detail about what is sensitive.

* Add issue template

* s/PR/issue/
Latest commit 9c3a4d7 Jun 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add initial Circle CI config (#1177) May 18, 2019
.github Update templates to include public repo warning (#1286) Jun 17, 2019
000-debug Make the cachebuster param more unique Mar 14, 2019
001-core Use different hooks for overriding privacy filters Sep 10, 2018
advanced-post-cache @ 369b989 Bump advanced-post-cache to master Apr 17, 2017
akismet Akismet 4.1.2 (#1254) May 17, 2019
bin Prevent modifications of the VIP machine user (#1206) Apr 16, 2019
cache Update README.md Apr 19, 2019
ci Add initial Circle CI config (#1177) May 18, 2019
cron-control @ fd02cfb Bump cron control to latest Apr 11, 2018
cron-control-next @ df1740b Add "next" version of Cron Control May 2, 2019
debug-bar-cron @ 745ecbe Bump Debug Bar Cron to latest, including PHP 7.x fixes Oct 13, 2017
debug-bar Update Debug Bar to 0.9 (#619) Jun 15, 2017
drop-ins Add object-cache drop-in May 9, 2017
errors Fix multisite not found error message (#932) Jul 11, 2018
files Exif compat for Streams. May 7, 2019
gutenberg-ramp @ a998778 Update Gutenberg Ramp to v1.1 (#1022) Nov 14, 2018
http-concat @ 623aa7b Bump http-concat: subdir support for CSS (#1223) Apr 25, 2019
jetpack @ 8f121d2 Jetpack 7.4 Jun 6, 2019
jetpack-start Fix partner-provision.sh on CLI containers Jan 14, 2019
lib Better error handling for Twilio (#1259) May 17, 2019
lightweight-term-count-update @ 0a1aea1 Update lightweight term count (#1070) Jan 12, 2019
performance Fix function formatting (#1031) Dec 4, 2018
query-monitor @ 32ac837 Update to Query Monitor 3.1.1 (#1028) Dec 6, 2018
rest-api Merge pull request #1015 from Automattic/add/internal-api/basic-auth Nov 8, 2018
rewrite-rules-inspector @ fdd48cb Restore accidentally revert submodules (#1232) May 1, 2019
security Prevent super admin updates when locked (#1260) May 16, 2019
shared-plugins Update two-factor to 0.47 (#1246) May 17, 2019
tests Prevent super admin updates when locked (#1260) May 16, 2019
vaultpress VaultPress 1.9.10 (#1256) May 17, 2019
vip-cache-manager Skip cache purge if post new attachment Jan 11, 2019
vip-dashboard @ a30b05f Restore accidentally revert submodules (#1232) May 1, 2019
vip-feed-cache Revert "Make feed cache create method static (#1121)" (#1207) Apr 9, 2019
vip-helpers Update the Powered By domain to wpvip.com Apr 26, 2019
vip-jetpack Merge branch 'master' into fix/allow-jp-sync-in-cli May 22, 2019
vip-plugins Update version number Apr 25, 2019
vip-support @ 00dcbc1 Update vip-support with changes to default vip support user's locale May 7, 2019
vip-wp-cli-to-cron Run WP CLI commands via WP Cron Feb 2, 2018
wordpress-importer WordPress Importer 0.6.4 Apr 5, 2019
wp-cli wp vip two-factor report: Add option to set format May 22, 2019
wpcom-vip-two-factor Add some context to the SMS code message Jun 11, 2019
.ackrc Use a local version of PHPUnit (#1036) Dec 5, 2018
.deployignore Vary Cache: Developer docs (#1161) Mar 12, 2019
.gitignore Use a local version of PHPUnit (#1036) Dec 5, 2018
.gitmodules Add "next" version of Cron Control May 2, 2019
.travis.yml Travis: Restore DEPLOY_BRANCH env var (#1269) May 30, 2019
000-vip-init.php Refactor debug code Mar 2, 2019
001-core.php Added/improved header section for some MU plugins (#948) Aug 8, 2018
001-cron.php Check that value is true before loading next version of cron control May 2, 2019
LICENSE Create LICENSE Nov 10, 2016
Makefile Only run phpcs once on Travis Dec 26, 2018
README-PUBLIC.md Move testing details to README.md Oct 18, 2018
README.md Add PHPUnit/Docker details to README (#1037) Dec 11, 2018
a8c-files.php Updates files service to allow split URL setup, along with new go-vip… May 2, 2019
advanced-post-cache.php Re-add loader plugins Jun 14, 2017
akismet.php Akismet 4.1.2 (#1254) May 17, 2019
alloptions-limit.php Send alloptions alerts to vip-deploy-on-call (#1265) May 23, 2019
async-publish-actions.php Bump concurrency of the transition events. (#966) Sep 5, 2018
composer.json Bump PHPUnit version so that CI tests are consistent with local tests Feb 22, 2019
composer.lock Bump PHPUnit version so that CI tests are consistent with local tests Feb 22, 2019
debug-bar.php Update Debug Bar to 0.9 (#619) Jun 15, 2017
gutenberg-ramp.php Modify the 5.0 about page to be more VIP-specific (#1039) Dec 7, 2018
http-concat.php Retain < 5.0 behaviour for tinyMCE scripts. (#1043) Dec 12, 2018
jetpack-start.php Re-add loader plugins Jun 14, 2017
jetpack.php Jetpack 7.4 Jun 6, 2019
misc.php Add a check to see if wp_query is set before using is_404() Aug 16, 2018
performance.php Added/improved header section for some MU plugins (#948) Aug 8, 2018
phpcs.xml Roll back change to PHPCS ruleset Feb 14, 2019
phpdoc.dist.xml Phpdoc doesnt support private const variables in the most recent vers… Mar 5, 2019
phpunit-multisite.xml Fix is_ssl() for wp-cli Jul 31, 2017
phpunit.xml PHPUnit infrastructure, and kit to run PHPUnit tests on Travis, plus … May 21, 2015
plugin-fixes.php Check if constant defined first Apr 1, 2019
query-monitor.php Update to Query Monitor 3.1.1 (#1028) Dec 6, 2018
rewrite-rules-inspector.php replace deprecated wpcom_initiate_flush_rewrite_rules call Jun 20, 2018
schema.php Added/improved header section for some MU plugins (#948) Aug 8, 2018
security.php Prevent modifications of the VIP machine user (#1206) Apr 16, 2019
stats.php wp_handle_upload: Set default for context param (#1154) Mar 13, 2019
two-factor.php Allow VIP_2FA_TIME_GATE to be overwritten by other mu-plugins Jun 10, 2019
vaultpress.php VaultPress 1.9.10 (#1256) May 17, 2019
vip-cache-manager.php Introduce a TTL Manager class (#672) Jul 3, 2017
vip-dashboard.php Re-add loader plugins Jun 14, 2017
vip-feed-cache.php Added/improved header section for some MU plugins (#948) Aug 8, 2018
vip-light-term-count.php Add Lightweight term counting plugin Dec 6, 2017
vip-mail.php Make constant check more explicit Dec 5, 2018
vip-plugins.php Move Ramp loading code to separate file May 16, 2018
vip-rest-api.php Add note about allowing users with vip_support caps Nov 7, 2018
vip-support.php Bump VIP Support to latest, fixing incorrect a11n promotion Oct 13, 2017
vip-wp-cli-to-cron.php Add url and hostname to wp-cli emails Feb 21, 2018
wordpress-importer.php WordPress Importer 0.6.4 Apr 5, 2019
wp-cli.php Disable `display_errors` for wp-cli Oct 13, 2018
z-client-mu-plugins.php Don't load client-mu-plugins `--skip-plugins` Feb 8, 2019

README.md

VIP Go mu-plugins

This is the development repo for mu-plugins on VIP Go,

Development

PHPDoc

You can find selective PHPDoc documentation here: https://automattic.github.io/vip-go-mu-plugins/

These are generated via CI by the generate-docs.sh script.

Tests

PHP Lint

make lint

PHPUnit

Docker

We have a script that runs unit tests in a self-contained Docker environment.

usage: ./bin/phpunit-docker.sh [wp-version]

You can either pass a version number to test against a specific version, or leave it blank to test against the latest version.

VVV
  1. Set up VVV and your vagrant environment

  2. Navigate to your wp-content folder and clone this repo into mu-plugins:

$ git clone https://github.com/Automattic/vip-go-mu-plugins.git mu-plugins
  1. SSH into your box and navigate to the mu-plugins folder:
$ vagrant ssh
vagrant@vvv:~$cd /path/to/wp-content/mu-plugins
  1. Setup the WordPress tests:
vagrant@vvv:
vagrant@vvv:/wp-content/mu-plugins$ ./bin/install-wp-tests.sh %empty_DB_name% %db_user% %db_name%

Note: you need to replace the %placeholder% strings above with the appropriate values. Use a separate test database for this as the contents will get trashed during testing.

  1. Install dependencies

Note: need to have composer pre-installed.

composer install
  1. Run tests:
vagrant@vvv:/wp-content/mu-plugins$ vendor/bin/phpunit

Travis

PHP Linting and PHPUnit tests are also run by Travis as part of PRs and merges. See the script section of .travis.yml.

Deployment

Production

For Automattic Use: Instructions are in the FG :)

vip-go-mu-plugins-built

This is a repo primarily meant for local non-development use. It e

Every commit merged into master is automatically pushed to the public copy at Automattic/vip-go-mu-plugins-built. This is handled via CI by the deploy.sh script script, which builds pushes a copy of this repo and expanded submodules.

How this works

  1. The private part of a deploy key for Automattic/vip-mu-plugins-built is encrypted against this repository (Automattic/vip-mu-plugins-built), meaning it can only be decrypted by Travis running scripts related to this repo
  2. This repository and it's submodules are checked out, again, to start the build
  3. All VCS config and metadata is removed from the build
  4. Various files are removed, including the .travis.yml containing the encrypted private part of the deploy key
  5. The Automattic/vip-mu-plugins-built repo is checked out
  6. The .git directory from the Automattic/vip-go-mu-plugins-built repository is moved into the build directory, and a commit is created representing the changes from this build
  7. The commit is pushed to the Automattic/vip-go-mu-plugins-built repository
You can’t perform that action at this time.