An blank boilerplate plugin, structured a bit more like a big-boy project; namespaces, autoloader, a (basic) renderer, Exceptions.
Ready for composer, and with webpack added in and configured to generate separate js & css for the frontend and admin areas.
An example shortcode, and wp-json
endpoint have been added.
- Clone into your
wp-content/plugins/
folder - Run
composer install
- Run
npm install
- Build the frontend bits with
npx webpack
Important
This requires both ACF and WPML to work
Running the tests
./vendor/bin/phpunit tests/
./vendor/bin/phpunit tests/phpunit/Utils/FunctionsTest.php
# Start container
docker-compose up -d
# Start (with view on the build logs)
docker-compose up --build
# Stop container
docker-compose down -v
# Start a shell
docker exec -it gcms-cloudflareonion bash
# Complete the creation of your environment (if it doesn't happen automagically)
docker exec -it gcms-cloudflareonion "/docker-entrypoint.sh"
# Running tests
composer run-tests --working-dir=./wp-content/plugins/
Visit: http://127.0.0.1:8081
In your local wordpress plugins folder, symlink the plugin
ln -sf /My-Versions/cloudflareonion global-plugin-cfo
# Inside the env if using lando !
ln -s /My-Versions/cloudflareonion /app/web/wp-content/plugins/prcfx
- Removes dev files at release (docker, dev, ...)
=======
This plugin creates multiple commands to be used through WP CLI
# Purge by prefix
wp cfo purgeprefix '/en/prefix/'
# Purge all markets
wp cfo purgemarkets
# Inside the env if using lando !
lando wp cfo ####