Free yourself from third party crap.
Since the plugin is currently still under development you can only install it with Composer.
If you're managing your whole stack with Composer you'll need to add the Github repository with something like this:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/betterembed/wordpress-betterembed"
}
],
"require": {
"betterembed/wordpress-betterembed": "*"
}
}
Please consult the Composer documentation on how to require from github.
If you're not managing your whole stack with Composer download or git clone
from
Github and run composer install --no-dev
.
Later this plugin will probably be published as a package on Packagist as well as a regular plugin on wordpress.org.
If you just want to quickly try the plugin have a look at the "Development/Quick Start" section.
For development and quick testing it is recommended to use the included Docker Compose setup.
It offers a quick and easy way to launch a complete development environment.
To get yourself up and running quick just run the following commands:
docker-compose run --rm composer install
docker-compose run --rm wp bash docker/bootstrap.sh
If everything worked well you should see this line:
-------------------------------------------------------------------------------
All ready! ${NC}"
You can now open the demo page at http://localhost:8080/better-embed-demo/
Or you can log in with user/password wp/wp http://localhost:8080/wp-login.php
-------------------------------------------------------------------------------
To stop the development environment run this command:
docker-compose stop
To restart the development environment run this command:
docker-compose up -d
To completely wipe the development environment including the database and uploads run this command:
docker-compose down -v
For local development you'll need to install dependencies:
docker-compose run --rm composer install
docker-compose run --rm scripts npm install
This plugin uses the @wordpress/scripts
package for development.
You can watch changes and automatically rebuild using the start
script:
docker-compose run --rm scripts npm run start
To run some checks on the codebase (e.g. linting) and build everything in a production ready way:
docker-compose run --rm scripts npm run build
You should never commit anything created by the start script, always run the above build script before commiting.
This plugins coding standards are based on the WordPress Coding Standards for PHP_CodeSniffer
with some adaptions as can be seen in the phpunit.xml.dist
file.
You can automatically check your code style:
docker-compose run --rm composer run-script phpcs
A lot of errors can even be fixed automatically:
docker-compose run --rm composer run-script phpcbf
To run the tests you need to initialize the testing instance environment once:
docker-compose run --rm tests bash docker/bootstrap-tests.sh
After that you can run tests for the PHP code using PHPUnit:
docker-compose run --rm tests
GPL 2.0 or later