e89317141d
Critical Safety Improvements: - Prevent duplicate DISABLE_WP_CRON entries - Detect and modify existing definitions (commented or not) - Automatic rollback on failure - Verification of changes before committing Safety Function Features: ✅ Checks file exists and is writable before modification ✅ Detects existing DISABLE_WP_CRON (even if set to false) ✅ Modifies existing line instead of adding duplicate ✅ Ignores commented lines when detecting existing definitions ✅ Creates temporary backup (.wpbak) during modification ✅ Verifies change was successful after modification ✅ Automatically restores backup if verification fails ✅ Removes temporary backup only on success Prevents Issues: ❌ No duplicate define() statements ❌ No syntax errors from malformed sed commands ❌ No broken wp-config.php files ❌ No accumulation of multiple entries on repeated runs Error Handling: - Returns 0 on success, 1 on failure - Calling code can gracefully handle failures - User feedback when modification fails - Skips sites that fail instead of breaking entire batch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>