2.5.0
Adding scan-wp-patterns.php script
The scan-wp-patterns.php script gets installed into the vendor/bin folder, and is used to do basic scanning of WordPress patterns.
Here are some of the things it scans:
- Checks image tags (
<img>) to ensure thesrcattribute has PHP that references an image file in theassets/directory. - Checks link tags (
<a>) to ensurelocalhostis not part of thehrefattribute. - ... more to come as required
Note: The scan requires the patterns/ folder to be at the root of the theme or plugin.
Usage
"scripts": {
"scan-wp-patterns": "@php vendor/bin/scan-wp-patterns.php",
}