Skip to content

Releases: SilverAssist/silver-assist-post-revalidate

v1.8.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 03:21
0248ada

What's Changed

  • ci(deps): bump the github-actions-updates group with 2 updates by @dependabot[bot] in #21
  • ci(deps): bump actions/setup-node from 4.4.0 to 6.3.0 by @dependabot[bot] in #22
  • ci(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 by @dependabot[bot] in #23
  • ci(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 in the github-actions-updates group by @dependabot[bot] in #24
  • ci(deps): bump actions/github-script from 8.0.0 to 9.0.0 by @dependabot[bot] in #26
  • ci(deps): bump softprops/action-gh-release from 2.6.1 to 3.0.0 by @dependabot[bot] in #25
  • ci(deps): bump the github-actions-updates group with 2 updates by @dependabot[bot] in #27
  • ci(deps): bump shivammathur/setup-php from 2.37.0 to 2.37.1 in the github-actions-updates group by @dependabot[bot] in #28
  • deps(deps-dev): update php-stubs/wordpress-tests-stubs requirement from ^6.6 to ^7.0 by @dependabot[bot] in #29
  • ci(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the github-actions-updates group by @dependabot[bot] in #30
  • ci(deps): bump shivammathur/setup-php from 2.37.1 to 2.37.2 in the github-actions-updates group by @dependabot[bot] in #31
  • ci(deps): bump softprops/action-gh-release from 3.0.0 to 3.0.1 in the github-actions-updates group by @dependabot[bot] in #32
  • ci(deps): bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #33
  • ci(deps): bump dependabot/fetch-metadata from 2 to 3 by @dependabot[bot] in #34
  • ci(deps): bump softprops/action-gh-release from 3.0.1 to 3.0.2 in the github-actions-updates group by @dependabot[bot] in #35
  • ci(deps): bump actions/checkout from 7.0.0 to 7.0.1 in the github-actions-updates group by @dependabot[bot] in #36
  • ci(deps): bump actions/setup-node from 6.4.0 to 7.0.0 by @dependabot[bot] in #37
  • Adopt silverassist/coding-standards + silverassist/wp-coding-standards by @miguelcolmenares in #38
  • Adopt silverassist/wp-plugin-kernel for plugin bootstrap by @miguelcolmenares in #39
  • Adopt shared quality-check scripts by @miguelcolmenares in #40
  • ci(deps): bump actions/checkout from 5 to 7 by @dependabot[bot] in #41
  • Release v1.8.0 by @miguelcolmenares in #42

Full Changelog: v1.7.0...v1.8.0

v1.7.0

Choose a tag to compare

@github-actions github-actions released this 10 Mar 01:20
a9d64a5

What's Changed

New Contributors

Full Changelog: v1.6.1...v1.7.0

v1.6.1

Choose a tag to compare

@github-actions github-actions released this 09 Mar 19:47

What's Changed

  • ci(deps): bump actions/checkout from 4.3.1 to 6.0.2 by @dependabot[bot] in #19

Full Changelog: v1.6.0...v1.6.1

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 03 Mar 22:08

What's Changed

  • ci(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 by @dependabot[bot] in #18

Full Changelog: v1.5.0...v1.6.0

Silver Assist Post Revalidate v1.5.0

Choose a tag to compare

@github-actions github-actions released this 02 Mar 20:18

What's New in v1.5.0

Changed

  • Admin Dashboard UI: Aligned with card-based design system for improved visual consistency

Fixed

  • Settings Link: Corrected Settings link URL to use admin.php after Settings Hub integration

Security

  • GitHub Actions: Pinned all GitHub Actions to specific commit SHAs for supply chain security
  • Workflow Permissions: Added explicit permissions to all GitHub Actions workflows
  • CodeQL Scanning: Added CodeQL security scanning workflow (later removed for optimization)

CI/CD

  • Centralized Quality Checks: Refactored quality checks into reusable run-quality-checks.sh script
  • Dependency Updates: Updated GitHub Actions dependencies (checkout v5→v6, upload-artifact v4→v6, github-script v8)
  • Dependabot: Enhanced configuration with groups and improved ignore rules

Development

  • PHPStan: Updated from ^1.10 to ^2.1
  • Dependencies: Updated development dependencies constraints

Installation

  1. Download silver-assist-post-revalidate-v1.5.0.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your revalidation endpoint at Settings > Post Revalidate

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • PHP 8.2 or higher
  • WordPress 6.5 or higher

Support

Silver Assist Post Revalidate v1.4.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 00:27

What's New in v1.4.0

Added

  • Configuration Class: New centralized post type management system
    • Singleton Pattern: Configuration::instance() for centralized access
    • Post Type Methods: get_enabled_post_types(), is_post_type_enabled($type)
    • Label Helpers: get_post_type_label($type), get_post_type_label_plural($type)
    • Future-Ready: Prepared with @todo comments for settings UI integration
    • Type-Safe: Uses WordPress WP_Post_Type objects
    • Test Coverage: 10 unit tests covering all Configuration methods
  • Manual Revalidation UI: New admin interface for manual cache revalidation
    • Row Actions: "Revalidate" link in post list table (alongside Edit, Quick Edit, Trash, View)
    • Meta Box: "Revalidate" button in post editor sidebar (Gutenberg + Classic Editor)
    • AJAX Support: Real-time revalidation with loading states and feedback
    • Admin Notices: WordPress-style success/error messages
    • Non-AJAX Fallback: Row action works without JavaScript (accessibility)
    • Security: Nonce validation + edit_posts capability checks on all endpoints
    • Trigger Tracking: Log entries now include trigger field ('manual' vs 'auto')
    • Comprehensive Tests: 10 integration tests for complete feature coverage
  • New Class: ManualRevalidation handles all manual revalidation functionality
  • New JavaScript: manual-revalidate.js provides AJAX handler for meta box button
  • Performance Test Suite: Comprehensive benchmark tests for performance optimization
    • 6 Performance Tests: Bulk operations, memory limits, N+1 queries, transient performance, single operations, log rotation
    • Baseline Metrics: Establishes performance benchmarks for future optimization work
    • Test Coverage: All tests passing with metrics within acceptable limits
      • Bulk revalidation: 395ms for 100 posts (target <10s) ✅
      • Memory usage: <10MB for 100 entries ✅
      • N+1 queries: No linear scaling detected ✅
      • Transient operations: 35ms for 100 operations ✅
      • Single revalidation: 4.82ms (target <100ms) ✅
      • Log rotation: 482ms with FIFO verified ✅

Changed

  • Post Type Management: Refactored to use Configuration class (no more hardcoded 'post')
    • All post type checks now use Configuration::is_post_type_enabled()
    • Removed hardcoded 'post' strings from Revalidate.php
    • Removed hardcoded 'post' strings from ManualRevalidation.php
    • Dynamic post type in meta box registration
    • Dynamic post type in redirect URLs
    • Prepared for future custom post types support
  • JavaScript Namespace: Renamed global functions to avoid collision with other Silver Assist plugins
    • Function: silverAssistCheckUpdates()silverAssistRevalidateCheckUpdates()
    • Data object: silverAssistCheckUpdatesDatasilverAssistRevalidateCheckUpdatesData
    • Each Silver Assist plugin now uses plugin-specific function names
    • Prevents function overwriting when multiple plugins are active
  • Revalidate Class: Extended with trigger parameter support
    • Added revalidate_path($path, $trigger = 'auto') method
    • Updated revalidate_paths() to accept $trigger parameter
    • Log entries now include 'trigger' field for analytics
    • Backward compatible: default trigger is 'auto'
  • Test Infrastructure: Updated factory calls from $this->factory to static::factory() across all test files
    • Fixes deprecation warnings in recent PHPUnit versions
    • Updated in: ManualRevalidation_Test, TransientCooldown_Test, Revalidate_Test, Performance_Test

Improved

  • Update Check UX: Replaced JavaScript alert() calls with WordPress-style admin notices
    • Added showAdminNotice() helper function for consistent UI
    • Success/info notices auto-dismiss after 5 seconds
    • Error/warning notices require manual dismissal
    • Smooth fade animations for better user experience
    • Added "Checking for updates..." notice during AJAX request
    • Added 2-second delay before redirect when update available

Fixed

  • Settings Hub Integration: Added missing echo statement in update check callback
    • Settings Hub requires callbacks to echo JavaScript, not return it
    • Ensures "Check Updates" button functions correctly in Settings Hub dashboard
  • PHPStan Compliance: Fixed type error in ManualRevalidation.php - cast post ID to string for esc_attr()
  • Code Quality: All PHPStan level 8 checks passing

Installation

  1. Download silver-assist-post-revalidate-v1.4.0.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your revalidation endpoint at Settings > Post Revalidate

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • PHP 8.2 or higher
  • WordPress 6.5 or higher

Support

Silver Assist Post Revalidate v1.3.1

Choose a tag to compare

@github-actions github-actions released this 12 Oct 06:56

What's New in v1.3.1

Changed

  • PHP Requirement: Lowered minimum PHP version from 8.3 to 8.2
    • Expands compatibility to more hosting providers
    • All core functionality tested and working on PHP 8.2+
    • CI/CD pipeline now tests PHP 8.2, 8.3, and 8.4
    • Updated all documentation and configuration files
    • Validated with PHPCS, PHPStan Level 8, and 126 passing tests

Installation

  1. Download silver-assist-post-revalidate-v1.3.1.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your revalidation endpoint at Settings > Post Revalidate

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • PHP 8.2 or higher
  • WordPress 6.5 or higher

Support

Silver Assist Post Revalidate v1.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 05:01

What's New in v1.3.0

Added

  • Comprehensive Integration Tests (Phase 3): Added 20 new integration tests for WordPress compatibility
    • Asset Management Tests (AssetsLoading_Test.php): 8 tests verifying CSS/JS loading, versioning, localization
      • Debug logs CSS/JS load only on settings page
      • Assets not loaded on other admin pages
      • Version strings for cache busting
      • Localized script data structure and nonces
      • jQuery dependency declarations
    • Status Transitions Tests (StatusTransitions_Test.php): 6 tests for post status workflows
      • Publish→Trash and Trash→Publish trigger revalidation
      • Draft→Draft does NOT trigger revalidation
      • Pending→Publish and Future→Publish trigger revalidation
      • Hook argument validation (3 args, priority 10)
    • Gutenberg Integration Tests (GutenbergIntegration_Test.php): 6 tests for Block Editor compatibility
      • Multiple rapid saves trigger only ONE revalidation (cooldown)
      • Meta updates during save do NOT duplicate revalidation
      • Taxonomy saves during post save do NOT duplicate
      • processed_posts array prevents same-request duplicates
      • Block editor autosaves filtered correctly
      • Classic Editor behavior matches Block Editor

Changed

  • Test Suite: Expanded from 106 to 126 tests (47 Unit + 79 Integration)
  • Test Coverage: All Phase 3 WordPress integration tests completed
  • Test Execution: Full suite runs in ~6 seconds with 100% pass rate

Technical Details

  • All integration tests use HTTP mocking (pre_http_request filter) for fast execution
  • Proper test isolation with setUp/tearDown cleanup
  • Manual hook triggering with do_action for precise control
  • Asset tearDown cleanup prevents cross-test contamination
  • Status transition tests handle WordPress state changes correctly

Installation

  1. Download silver-assist-post-revalidate-v1.3.0.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your revalidation endpoint at Settings > Post Revalidate

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • WordPress 6.5 or higher
  • PHP 8.3 or higher

Support

Silver Assist Post Revalidate v1.2.1

Choose a tag to compare

@github-actions github-actions released this 09 Oct 20:48

What's New in v1.2.1

Added

  • Check Updates Button: Manual update checking with one-click convenience
    • Added "Check Updates" button on Settings Hub dashboard card
    • Integration with silverassist/wp-settings-hub v1.1.0 custom actions feature
    • AJAX-powered update check with immediate visual feedback
    • Automatic redirect to updates page when new version available
    • New method: AdminSettings::render_check_updates_script() for AJAX handling

Changed

  • Updated Dependencies:
    • Upgraded silverassist/wp-settings-hub from v1.0.0 to v1.1.0
    • Added support for custom dashboard action buttons

Technical Details

  • AdminSettings.php (lines 118-127): Added actions parameter in register_plugin() with "Check Updates" button configuration
  • AdminSettings.php (lines 211-272): New render_check_updates_script() method with complete AJAX handling
    • Uses wp-github-updater's manualVersionCheck() endpoint
    • Security: nonce verification with silver_assist_revalidate_version_check
    • User feedback: Button state changes (Checking... → Update Available! / Up to Date / Error)
    • Error handling: Network errors and API failures with 3-second auto-reset
    • Redirect: Automatic navigation to plugins.php?plugin_status=upgrade on update availability

Installation

  1. Download silver-assist-post-revalidate-v1.2.1.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your revalidation endpoint at Settings > Post Revalidate

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • WordPress 6.5 or higher
  • PHP 8.3 or higher

Support

Silver Assist Post Revalidate v1.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 18:50

What's New in v1.2.0

Added

  • Tag Support: Complete tag revalidation functionality

    • Automatic revalidation when tags are created, edited, or deleted
    • Tag paths included when posts are saved or deleted
    • All posts with a tag are revalidated when tag is modified
    • New hooks: created_post_tag, edited_post_tag, delete_post_tag
    • New method: on_tag_updated() for tag lifecycle events
  • Post Status Transition Support: Smart revalidation on status changes

    • Revalidation triggered when posts are published or unpublished
    • Handles draft → publish transitions
    • Handles publish → draft transitions (unpublishing)
    • Handles publish → private transitions
    • New hook: transition_post_status
    • New method: on_post_status_changed() for status transitions
  • Post Deletion Support: Revalidation on post deletion

    • Automatic revalidation when posts are permanently deleted
    • Revalidates post permalink, categories, and tags
    • New hook: delete_post
    • New method: on_post_deleted() for deletion events
  • Path Deduplication: Prevents duplicate revalidation requests

    • Uses array_unique() to remove duplicate paths
    • Ensures each path is only revalidated once per operation
    • Improves performance and reduces API calls
  • Revalidation Debug Logs: Complete traceability system for revalidation requests

    • Accordion-style debug section in admin settings page
    • Displays last 100 revalidation requests (FIFO rotation)
    • Shows request details (URL, method, headers, timeout) in formatted JSON
    • Shows response details (status code, message, body, headers) in formatted JSON
    • Color-coded status indicators (green for success, red for error)
    • Timestamp for each request
    • "Clear All Logs" button with AJAX confirmation
    • Helps identify duplicate requests and track server responses
    • Stores logs in WordPress options (silver_assist_revalidate_logs)
  • Comprehensive Test Suite: 36 tests covering all scenarios (100% passing)

    • Unified test file with organized sections
    • Post lifecycle tests (create, edit, delete, draft filtering)
    • Post status transition tests (3 scenarios)
    • Taxonomy invalidation tests (categories + tags)
    • Deduplication tests
    • Category lifecycle tests (create, edit, delete)
    • Tag lifecycle tests (create, edit, delete)
    • Log management tests (entries, fields, FIFO, clear, empty endpoint)
    • Uses WordPress Test Suite (PHPUnit 9.6.29)
    • HTTP mocking for fast, reliable tests (0.3s execution time)

Changed

  • Enhanced Revalidate.php: Extended core revalidation class

    • Added 6 new WordPress action hooks (3 for posts, 3 for tags)
    • on_post_saved() now includes tag path revalidation
    • on_post_status_changed() bypasses status check for unpublish scenarios
    • revalidate_paths() now deduplicates paths before processing
    • Import added: use WP_Post; for type safety
  • Enhanced revalidate_paths() method to capture and log all request/response data

  • Admin settings page now includes debug section below configuration

  • Refactored assets to external files: Moved inline CSS and JavaScript to separate files

    • CSS variables (design tokens) for consistent styling
    • Better maintainability and separation of concerns
    • Uses wp_enqueue_style() and wp_enqueue_script() properly
    • Uses wp_localize_script() for internationalization

Fixed

  • Status transition revalidation now works correctly for unpublishing posts
    • Previously failed because on_post_saved() checked for publish status
    • Now on_post_status_changed() handles revalidation directly
    • Properly revalidates post permalink, categories, and tags even after status change

Technical

  • New on_post_deleted() method for post deletion handling (lines 197-249)
  • New on_post_status_changed() method for status transitions (lines 254-323)
  • New on_tag_updated() method for tag lifecycle events (lines 325-374)
  • New save_log_entry() private method in Revalidate class
  • New clear_logs() static method in Revalidate class
  • New render_debug_logs_section() method in AdminSettings class
  • New enqueue_admin_scripts() method for proper asset loading
  • New ajax_clear_logs() AJAX handler in AdminSettings class
  • New assets/css/admin-debug-logs.css with CSS variables for design tokens
  • New assets/js/admin-debug-logs.js with accordion and AJAX functionality
  • Accordion functionality with jQuery for expanding/collapsing log details
  • Responsive CSS styling with mobile breakpoints
  • Build script updated to include assets/ directory and validation
  • Test files unified: Revalidate_Test.php (710 lines, 36 tests)
  • WordPress Test Suite integration with PHP 8.4.1 and WordPress 6.8.3

Installation

  1. Download silver-assist-post-revalidate-v1.2.0.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your revalidation endpoint at Settings > Post Revalidate

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • WordPress 6.5 or higher
  • PHP 8.3 or higher

Support