This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Build frontend assets (after editing JS/CSS):
yarn build(runs Gulp: compiles SCSS → CSS, concatenates/minifies JS) - PHP lint:
herd composer phpcs - PHP autofix:
herd composer phpcbf - Local environment: Laravel Herd (PHP runs natively, no Docker wrapper needed)
- Git flow: Branch from
develop, feature branches asfeature/Name. Main branch isdevelop. - Conventional commits: Follow Conventional Commits spec.
- Changelog: BEFORE committing, document changes in
readme.txt. Use format= X.Y.Z =with* [Added/Changed/Fixed] Description. For unreleased changes, use2.7.0as the version header (e.g.,= 2.7.0 =). Keep entries meaningful — don't bloat with granular changes. Group entries by type: Added first, then Changed, then Fixed. - Text domain:
advanced-cron-manager - Version: Appears in two places in
advanced-cron-manager.php: plugin headerVersion:and$plugin_versionvariable.
- PHP: WordPress Coding Standards (WPCS 3.2), configured in
phpcs.xml. Notably allows short array syntax and non-underscored hook names. - JS/CSS: WordPress JS Standards and WordPress CSS Standards.
WordPress plugin for managing WP-Cron events and schedules. Namespace: underDEV\AdvancedCronManager, PSR-4 autoloaded from inc/.
advanced-cron-manager.php — bootstraps the entire plugin procedurally. Instantiates all classes, wires WordPress hooks (add_action/add_filter). No DI container; dependencies are composed via closures.
- Element/Event.php, Element/Schedule.php — value objects representing a single cron event or schedule
- Events.php / Schedules.php — collection managers that read from WP's cron system (
_get_cron_array(),wp_get_schedules()) - EventsLibrary.php / SchedulesLibrary.php — persistence layer (custom schedules stored in
wp_option, paused events stored inwp_option) - EventsActions.php / SchedulesActions.php — AJAX handlers for insert/edit/remove/run/pause operations
- AdminScreen.php — registers the Tools menu page, renders main layout, handles AJAX re-renders of tables
- Assets.php — enqueues CSS/JS only on the plugin's admin page
- FormProvider.php — AJAX handlers that return form HTML (add schedule, edit schedule, add event)
- views/ — PHP templates:
wrapper.phpis the main layout;parts/for sections (events table, schedules table, searchbox, slidebar);elements/for row templates;forms/for add/edit forms
- Settings.php — settings UI and save handler for disabling WP-Cron spawning
- Processor.php — conditionally blocks WP-Cron execution based on saved settings
- Source:
assets/src/js/(individual JS modules) andassets/src/sass/(SCSS with components/mixins/parts) - Built:
assets/dist/js/scripts.min.js(concatenated+minified) andassets/dist/css/style.css - Gulp pipeline (
gulpfile.js): SCSS → autoprefixed CSS; JS → concatenated → uglified. Both with sourcemaps.
All admin operations use WordPress AJAX (wp_ajax_acm/*). Each action class verifies nonces and capabilities, then returns JSON. The JS code in assets/src/js/ calls these endpoints and re-renders table HTML via AJAX.