Files
wingedit.pl/AGENTS.md

2.6 KiB

Repository Guidelines

Project Structure & Module Organization

This repository is a WordPress site snapshot. Most contributor work should be limited to custom code:

  • wp-content/themes/restly-child/: primary customization area (functions.php, assets/js/custom.js, assets/styles/custom.scss, generated custom.css).
  • wp-content/themes/restly-child/plugins/CookieNoticePro/: child-theme-local cookie notice assets.
  • mail-test/: standalone PHPMailer test utility.

Treat wp-content/plugins/, wp-content/uploads/, and bundled default themes as third-party or generated content unless a task explicitly requires changing them.

Build, Test, and Development Commands

Run commands from repository root.

  • php -l wp-content/themes/restly-child/functions.php: syntax-check child theme PHP.
  • php -l mail-test/index.php: syntax-check mail test script.
  • npx sass wp-content/themes/restly-child/assets/styles/custom.scss wp-content/themes/restly-child/assets/styles/custom.css --style=expanded: compile SCSS to CSS.
  • git diff -- wp-content/themes/restly-child: review only intended child-theme changes before commit.

No unified CI pipeline is configured in this repo; validate changes in a local WordPress instance.

Coding Style & Naming Conventions

  • Use 4 spaces in PHP, semicolons required, and WordPress-style function names (snake_case, prefix custom helpers).
  • Use 2 spaces in JS/SCSS to match existing custom.js and custom.scss style.
  • Keep custom logic inside child theme files; avoid editing plugin vendor code.
  • Prefer descriptive IDs/classes and file names like custom.js, custom.scss for theme-level overrides.

Testing Guidelines

Automated tests are not currently present for custom code. Minimum validation per change:

  • PHP lint for edited .php files.
  • Manual browser QA for header behavior, accordions, and email-reveal interactions driven by assets/js/custom.js.
  • Re-test desktop and mobile layouts after SCSS updates.

Commit & Pull Request Guidelines

Current history includes mixed quality messages (FIX: ..., REFactor: ..., and generic Save). Use clear, imperative commits going forward:

  • fix: correct header z-index on sticky state
  • refactor: isolate scroll handler in custom.js

PRs should include:

  • Scope summary and changed paths.
  • Before/after screenshots for UI changes.
  • Manual test notes (what was checked and where).
  • Linked issue/task when available.

Security & Configuration Tips

Do not commit secrets (SMTP logins, API keys, production emails). Move credentials to environment-specific configuration and rotate any exposed values immediately.