Merge Fewer Tags Pro into free plugin (v2.0)#49
Open
jdevalk wants to merge 18 commits into
Open
Conversation
Bring all pro features into the free plugin: term merging (including cross-taxonomy), redirect-on-delete prompts, and redirect creation via Redirection plugin or Yoast SEO Premium. Strip all EDD licensing code. Also upgrades PHPStan to v2.1 for PHP 8.4 compatibility and fixes all resulting static analysis issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The svn command is not available on GitHub Actions runners. Download the WP test suite from GitHub zip archives instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
curl needs -L to follow GitHub redirects. Also check HTTP status code instead of file size to distinguish 404 from a valid download. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts in phpstan.neon.dist (keep PHPStan v2 config) and composer.lock. Pin php-compatibility to ^9.3 stable to avoid PHPCS 4 conflict with wpcs. Keep develop's svn auto-install in test script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Test on Playground |
Composer package changes
|
The lock file had doctrine/instantiator 2.2.x-dev requiring PHP 8.4, breaking CI jobs running on PHP 7.4. Setting platform.php ensures composer resolves packages compatible with the minimum PHP version. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add capability checks (manage_categories) to all AJAX handlers - Fix XSS: escape slug/taxonomy in HTML attributes and JS href contexts - Fix XSS: escape term names and URLs in AJAX response messages - Fix bug: Redirection group option key mismatch (redirect_group vs redirection_group) causing new group creation on every merge - Fix bug: inverted condition always recreating Redirection group - Fix bug: get_term_link called after term deletion; capture permalink in pre_delete_term hook instead - Add merge action to categories and custom taxonomies, not just tags - Scope redirect tool admin notice to edit-tags screens only - Scope MutationObserver to #the-list instead of document.body - Use rest_base from taxonomy object for REST API endpoints - Set allowHTML: false on Choices.js instances - Fix typo: cannnot -> cannot Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tasks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Consolidate the two separate wp_options entries (fewer_tags scalar and fewer_tags_pro array) into a single fewer_tags array option. The Option singleton is now the single source of truth. - Change Option class to use 'fewer_tags' instead of 'fewer_tags_pro' - Remove Plugin::$option_name, read min_posts_count from Option singleton - Expand migrate_option() to handle all upgrade scenarios idempotently - Add sanitize_callback to preserve other array keys when saving settings - Update settings field name/id for nested array structure - Remove fewer_tags_pro cleanup from uninstall.php Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
Fix security, bugs, and UX issues from PR #49 review
Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
- readme.txt: contributors, tags, tested-up-to 7.0, GPL-3.0-or-later - README.md: point CI badges at ProgressPlanner repo Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
ilicfilip
approved these changes
May 29, 2026
Contributor
There was a problem hiding this comment.
I have pushed commit with minor fixes and another one which syncs parts of the readme.txt and readme.md.
But I think that the rest of the files should be checked and corrected. For example on multiple places https://fewertags.com/ is used (including plugin header), but we moved plugin to https://progressplanner.com/plugins/fewer-tags/ ?
Addresses @ilicfilip's review note on #49: the plugin moved to progressplanner.com but still referenced the old fewertags.com home in the plugin header (Plugin URI + description) and the readme.txt footer. Left the /research/ deep link pointing at its live source, which has no progressplanner.com equivalent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…into-free # Conflicts: # README.md # readme.txt
Addresses @tacoverdo's report on #49: on a site with only Yoast SEO free (no Redirection, no Yoast SEO Premium), deleting a tag warned that a redirect tool was required, yet still offered "Redirect to homepage / another URL" links — and clicking them reported success even though no redirect was ever created. - class-helper.php: get_redirect_message() now checks for a redirect tool first; with none it tells the user to install Redirection or Yoast SEO Premium and stops, instead of offering links that silently fail. Also fix an inaccurate translator comment (%2$s is the singular label, not the slug). - class-admin-ajax.php: redirect_url_action() now reports a real failure via wp_send_json_error when the redirect could not be created, instead of always claiming success. - fewer-tags.js: render a notice-error vs notice-success based on response.success (wp_send_json_error still returns HTTP 200). - class-admin.php: correct the warning wording — the tool is needed to create redirects when merging/deleting terms, not to merge them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
@tacoverdo good catch — that was a genuine bug, not a feature you misunderstood. Fixed in 809f8bc. What was happening on a site with only Yoast SEO free (no Redirection, no Yoast SEO Premium):
The fixes:
Mind giving it another test on a free-Yoast site? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
New files
src/class-option.phpsrc/class-admin-ajax.phpsrc/class-helper.phpsrc/class-redirects.phpjs/fewer-tags.jsjs/vendor/choices.min.js+.cssModified files
fewer-tags.phpFEWER_TAGS_FILEconstant, updated descriptionsrc/class-plugin.phpsrc/class-admin.phpuninstall.phpfewer_tags_prooption on uninstallreadme.txt.phpcs.xml.dist.min.js)phpstan.neon.distcomposer.json/composer.lockTest plan
composer check-cspassescomposer phpstanpasses (0 errors)fewer_tags_prooption is cleaned up on uninstall🤖 Generated with Claude Code