diff --git a/sqlite-database-integration-loader.php b/sqlite-database-integration-loader.php index ebc47d1..eb06710 100644 --- a/sqlite-database-integration-loader.php +++ b/sqlite-database-integration-loader.php @@ -1,4 +1,14 @@ &2 + exit 1 +fi + +for plugin in "${project_mu_plugins[@]}"; do + if [[ ! -f "${plugin}" ]]; then + echo "Project-owned MU Plugin source is missing: ${plugin}" >&2 + exit 1 + fi + if ! grep -Eq '^[[:space:]]*\*[[:space:]]+Plugin Name:[[:space:]]+[^[:space:]]' "${plugin}"; then + echo "Project-owned MU Plugin is missing Plugin Name metadata: ${plugin}" >&2 + exit 1 + fi + if ! grep -Eq '^[[:space:]]*\*[[:space:]]+Author:[[:space:]]+soulteary[[:space:]]*$' "${plugin}"; then + echo "Project-owned MU Plugin is not attributed to soulteary: ${plugin}" >&2 + exit 1 + fi +done + +echo "Project-owned MU Plugin metadata is valid."