Skip to content

2.5.0

Choose a tag to compare

@ShawnTurple ShawnTurple released this 30 Jan 00:15
08eee71

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 the src attribute has PHP that references an image file in the assets/ directory.
  • Checks link tags (<a>) to ensure localhost is not part of the href attribute.
  • ... 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",
}