Unofficial plugin to access the VoordeMensen ticket platform directly from WordPress
This package has been abandoned because none of our customers use this plugin anymore. Instead, VoordeMensen has their own plugin available in the WordPress plugin repository. You can also download it with Composer by requiring it from WPackagist.
To download and install this plugin in your WordPress website, follow the steps below:
- Go to the releases tab and find the latest release.
- Download the zip named
ll-voordemensen-x.x.x.zip(where x.x.x is the version number). - Rename the downloaded zip to
ll-voordemensen.zip. - Extract the zip file. Make sure it puts the contents in a directory called
ll-voordemensen. - Put the extracted folder and it's contents inside the
wp-content/pluginsdirectory of your WordPress installation. - Activate the plugin via the wp-admin panel.
It's also possible to download the plugin via Packagist.
Keep in mind that if you do, your composer should be setup in a way that packages of the type wordpress-plugin are installed in your wp-content/plugins directory.
To configure the plugin, just fill in your client name in the VoordeMensen plugin settings screen.
- Create a new WordPress installation using the latest twenty-* theme.
- Navigate to the
wp-content/pluginsdirectory. - Clone this repo there, so it creates the
ll-voordemensendirectory. - Navigate to the
ll-voordemensendirectory, and from there, run:
composer-install
npm ci
npm run buildRun composer run test to verify results locally (more info about tests later in this file).
- Merge all PR's in the
mainbranch. - Change the version number in
ll-voordemensen.php. - Wait for all GitHub Actions to finish.
- Update the created draft release, set a tag and version name, in SEMVER structure like vX.X.X.
- Publish the release.
Composer is used to manage the autoloading and automatic testing. More on the testing subject can be found later in this document.
npm run startnpm run lintnpm run fixnpm run buildnpm run scripts:lintnpm run scripts:fixnpm run styles:lintnpm run styles:fixnpm run browsersyncnpm run bundle-analyzer
If you run into any problems locally with the initial installation of the node_modules (especially webpack) try setting your local environment to DEV by executing the following on your CLI:
export NODE_ENV=developmentThe cause of the problem is probably the Node version and the default state it's in (it used to install all packages, but recently changed to production modules only).
Using custom config for webpack dev server. Duplicate the development/config.local.json.example file and save it as development/config.local.json. In this file you add your own project url, set secure based on your dev protocol and set a port. This config is being used to overwrite the default URL of your local dev environment. This applies to the webpack-dev-server and browser-sync.
Example:
{
"url": "http://local.my-site.test",
"secure": false,
"port": 1234
}Webpack automatically processes images used in the SCSS. For the images that you use directly in php, import them into index.js.
import 'images/logo.jpg';Get the image URL in the .php files by using the ( new \LevelLevel\VoorDeMensen\Assets() )->get_assets_directory_url() function.
For example placing a logo in the header:
<img src="<?php echo ( new \LevelLevel\VoorDeMensen\Assets() )->get_assets_directory_url(); ?>/images/logo.jpg" alt="">We use default browser lazyloading for images. Usage example:
<img src="<?php echo ( new \LevelLevel\VoorDeMensen\Assets() )->get_assets_directory_url(); ?>/images/thumbnail.jpg" loading="lazy" alt="">- Styleint: Styleint is used, rules are set in
.stylelintrc.json. View all doc rules - JS: eslint is used, rules are set in
.eslintrc.json. View all doc rules
Default text language for this repo is English.
Make sure you translate all strings with the text-domain ll-vdm.
Run: composer run make-pot for updating the .pot file.
There are multiple code tests in place.
- Composer, to check if the composer files are intact
- PHPCS, to check if you are following the Level Level PHP code standards
- Psalm tests, that searches for possible mistakes in your code
- PHP Doc Check, to check if complicated functions have comments explaining the functionality
On every pull-request, a GitHub action is run that verifies the project, based on the
composer run test results. You need to provide the following secret in the
repository (under settings/secrets):
- SATIS_DOMAIN (without protocol)
- SATIS_USERNAME
- SATIS_PASSWORD
Run composer run test to verify results locally.
Run composer run fix to use automated fixing tools such as phpcbf.
If you locally work with https you need to enable Chrome to allow invalid certificates. To enable this go to: chrome://flags/#allow-insecure-localhost and enable the Allow invalid certificates for resources loaded from localhost. option.
Theme comes with a .editorconfig file. For this to work you need to install a plugin that uses the .editorconfig file.