Skip to content

Conversation

@GaryJones
Copy link
Collaborator

Warning

Do not merge until January 6th 2026.

Release 0.8.0

This release requires WordPress 6.4 and PHP 7.4 as a minimum.

Added

Fixed

Changed

Documentation

Maintenance


Release checklist

  • CI checks pass
  • Merge to main
  • Create signed tag: git tag -s 0.8.0 -m "0.8.0"
  • Push tag: git push origin 0.8.0
  • Sync main back to develop

GaryJones and others added 30 commits September 9, 2023 14:23
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](ramsey/composer-install@v2...v3)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…sey/composer-install-3

Bump ramsey/composer-install from 2 to 3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Update GitHub action to install SVN before deploy to WordPress.org
Fix YAML syntax in GitHub Action for deploy to WordPress.org
Add .wp-env.json to standardize local development environment with:
- PHP 7.4 (plugin minimum)
- Latest WordPress (auto-updates)
- Query Monitor auto-installed
- Debug constants enabled
- Test environment with PHP 8.4 + WordPress trunk

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Normalize and expand on items like sorting packages, and script descriptions.
Updates the "Requires WP" header from 5.7 to 6.4 to align with current plugin standards and internal documentation.

Also updates:
- Test matrix to test against WP 6.4 and 6.8
- README to reflect WP 6.4 minimum and 6.8 tested version
- PHPCS minimum supported WP version to 6.4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Modernises the integration test infrastructure to use wp-env instead of
the legacy SVN-based test setup. GitHub-hosted runners no longer include
SVN by default, causing test failures. This migration aligns with
WordPress's recommended testing approach and ensures consistency between
local development and CI environments.

Updates the workflow to install wp-env, removes MySQL service
configuration (now provided by wp-env), and eliminates the prepare-ci
script. The WordPress matrix now uses concrete version numbers ('6.8')
and 'master' instead of 'latest' and 'trunk', as wp-env expects actual
Git branch/tag references.

Removes the Codecov integration from CI (coverage can still be run
locally via composer scripts). Simplifies the matrix by removing
coverage-specific configurations.

Renames composer scripts to reflect their integration test purpose:
test → test-integration, test-ms → test-integration-ms.

Removes bin/install-wp-tests.sh (182 lines) which is no longer needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Aligns CI configuration with Automattic plugin standards to improve security posture and reduce maintenance overhead across the plugin portfolio. These changes bring the repository in line with established patterns used in other a8c plugins, making it easier for the team to maintain consistent security practices and dependency update schedules.

The Dependabot configuration moves from daily to weekly updates with intelligent grouping of related dependencies, reducing PR noise whilst maintaining currency. GitHub Actions now use SHA-pinned references rather than mutable tags, preventing supply chain attacks where action maintainers could push malicious code to existing version tags. Template injection vulnerabilities in workflow commands are eliminated by using environment variables rather than direct context expansion. The addition of explicit permission blocks and credential persistence controls implements least privilege principles, ensuring workflows can only access the resources they genuinely require.

The yoast/wp-test-utils constraint is tightened to ^1.2 to ensure compatibility with the updated testing approach, whilst the integration workflow filename is simplified to match standard naming conventions across the plugin collection.
Standardises .gitignore with consistent patterns and adds .distignore
for WordPress.org release packaging. Development files like tests,
vendor, and node_modules are now properly excluded from distributions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds unit tests for Ad_Code_Manager class methods that can be tested
without WordPress, including validate_script_url() for URL whitelist
validation and filter_output_tokens() for token replacement logic.

Changes:
- Add tests/Unit/ directory with TestCase base class
- Add AdCodeManagerTest.php (10 tests) covering URL validation and
  token filtering
- Add tests/bootstrap.php to support both unit and integration tests
- Update phpunit.xml.dist to include Unit testsuite
- Add test:unit composer script
- Add phpunit ^9.6 to require-dev
- Rename test-integration to test:integration for consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds GitHub Actions workflow for running unit tests across multiple PHP
versions (7.4, 8.1, 8.2, 8.3). Unit tests run without WordPress using
Brain Monkey, enabling faster feedback on pure PHP logic.

Workflow is hardened with:
- Minimal permissions (contents: read)
- Pinned action versions with SHA
- persist-credentials: false

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move reviewer configuration from dependabot.yml to CODEOWNERS file
per GitHub's recommended approach. This allows the same reviewers
to be automatically assigned for all PRs, not just Dependabot ones.

See: https://github.com/dependabot/codeowner-migration-action

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves issue #72 where the ACM_Ad_Zones widget would output empty wrapper HTML (before_widget/after_widget) even when no valid ad codes were found for the specified tag. This created unnecessary empty markup in the page output.

The widget now uses output buffering to capture the ad content first, checks if any content was generated, and only outputs the wrapper HTML if there's actual ad content to display.

A new filter 'acm_display_empty_widget' has been added to allow themes to override this behaviour if they need the wrapper HTML to display even when empty (defaults to false).

Changes:
- Modified ACM_Ad_Zones::widget() to buffer ad output and conditionally render wrapper
- Added 'acm_display_empty_widget' filter with ad zone, args, and instance parameters
- Excluded short prefix warning from PHPCS for established 'acm' prefix
- Added 7 integration tests covering empty output behaviour and filter functionality
- Added unit tests verifying get_acm_tag() returns empty string when no ad codes found

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GaryJones and others added 27 commits December 16, 2025 23:57
Updates CI workflow to test against WP 6.4 and master with PHP 7.4 and
latest. Removes allowed_failure flag so CI fails if tests fail on any
supported configuration.

Updates README to reflect tested versions (WP 6.9).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This addresses a long-standing request from 2013 for better styling control of ad output. Previously, themes needed to target ads by numeric IDs that could change, making consistent styling difficult.

The implementation wraps all ad output in a div with descriptive CSS classes: a generic 'acm-wrapper' class for broad styling rules, and a tag-specific 'acm-tag-{tag_id}' class for targeted control. This enables straightforward centering and other layout adjustments without depending on fragile numeric IDs.

A new 'acm_wrapper_classes' filter allows developers to customise the classes or disable the wrapper entirely by returning an empty array, ensuring backwards compatibility for sites that need to opt out.

Fixes #71
Previously, if a provider didn't define a specific column method for the
first data column, the fallback column_default() was used without row
actions. This left users unable to edit or delete ad codes for such
providers.

The fix adds automatic row action detection: when rendering via
column_default(), we now check if the current column is the first data
column (after 'cb' and 'id') and append the edit/delete links accordingly.

Fixes #51

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Users unfamiliar with Google Ad Manager (formerly DFP) or AdSense often
struggle to understand what values are required for fields like Tag ID,
DFP ID, Tag Name, and Publisher ID. This is a common support request.

The new "Provider Fields" help tab explains each field with examples and
guidance on where to find the values in the respective ad platforms.
This complements the existing help tabs for Overview, Configuration,
and Conditionals.

Fixes #123

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
DFP Async uses the tag_id field as a div ID in the rendered HTML. When
two ad codes share the same tag_id, Google's ad serving becomes confused
because the same element ID appears multiple times on the page.

This adds validation that prevents saving ad codes with duplicate tag_id
values. The implementation uses a new 'acm_validate_ad_code' filter that
providers can hook into for custom validation, keeping the solution
extensible for other providers that may need similar checks.

Fixes #69

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-version: 3.0.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Add comprehensive PHPDoc documentation for all 24 filters and 2 actions
in the Ad Code Manager plugin, improving discoverability and developer
experience.

Documented filters include:
- Configuration: acm_register_provider_slug, acm_provider_slug,
  acm_whitelisted_script_urls, acm_whitelisted_conditionals,
  acm_logical_operator, acm_manage_ads_cap, acm_ad_tag_ids,
  acm_ad_code_args
- Rendering: acm_output_html, acm_output_tokens,
  acm_output_html_after_tokens_processed, acm_disable_ad_rendering,
  acm_wrapper_classes (already documented in #188)
- Matching: acm_display_ad_codes_without_conditionals,
  acm_conditional_args, acm_reset_postdata_before_match,
  acm_matching_ad_code_cache_expiration
- Admin: acm_list_table_columns, acm_list_table_per_page,
  acm_validate_ad_code, acm_allowed_get_posts_args, acm_ad_code_count
- Other: acm_default_url, acm_should_do_robotstxt,
  acm_robotstxt_disallow

Documented actions:
- acm_tag: Displays an ad tag on the frontend
- acm_options_form: Fires in the options form

Fixes #157

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Select2-based autocomplete for conditional arguments (categories,
tags, pages, posts) to make it easier for users to select values when
configuring ad code conditions.

Key implementation details:
- Uses WordPress's bundled SelectWoo/Select2 library
- AJAX search with 3-character minimum and 100 result limit
- Supports both taxonomy terms and post type searches
- Allows custom values via Select2's tags option
- Extensible via `acm_autocomplete_conditionals` and
  `acm_autocomplete_results` filters

Fixes #42

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Select2 with AJAX data requires hidden inputs, not text inputs.
Also fix test pollution by dequeuing scripts between tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Select2/selectWoo is not bundled with WordPress core - it comes from
WooCommerce. When neither selectWoo nor select2 is registered, we now
load Select2 v4.0.13 from jsDelivr CDN.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Select2 with AJAX requires a <select> element, not an input.
Dynamically create a select element when initializing autocomplete
and restore the original input when switching conditionals.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Conditionals like is_home, is_front_page, is_404, etc. don't accept
arguments, so showing an input field is confusing. Now the arguments
field is hidden when these conditionals are selected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change "Add more" to "Add another condition"
- Remove boxed styling from Configuration section
- Fix Select2 field heights to match native inputs
- Fix Edit labels to use proper labels from provider config
- Link labels to their corresponding form fields
- Hide "Add another condition" button until first condition selected
- Show Logical Operator only when 2+ conditions are set
- Move Logical Operator field near Conditionals in Edit view

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove inline edit autocomplete initialization (will be addressed
  with dedicated edit page in future PR)
- Scope all autocomplete functionality to #add-adcode form only
- Add isSelect2Available() check to gracefully handle CDN failures
- Prevent JS errors when Select2 fails to load

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the inline edit functionality with a full-page edit interface that provides clearer layout and better autocomplete support for conditional arguments. The dedicated edit page allows users to see all ad code properties simultaneously without table layout constraints.

The new edit page includes Select2 autocomplete for conditional arguments, dynamically shows or hides the logical operator field based on the number of conditions, and provides a more intuitive editing experience. This change removes the legacy inline edit JavaScript (acm.js), associated CSS styles, and the column_id() and inline_edit() methods from the list table class.

Resolves #195
@GaryJones GaryJones self-assigned this Dec 21, 2025
@GaryJones GaryJones added the type: release Release-related tasks label Dec 21, 2025
@GaryJones GaryJones added this to the 0.8.0 milestone Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: release Release-related tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants