Skip to content

feat: keyword-based filtering for post sharing#1089

Merged
vytisbulkevicius merged 4 commits into
developmentfrom
feat/pro/662
Jul 6, 2026
Merged

feat: keyword-based filtering for post sharing#1089
vytisbulkevicius merged 4 commits into
developmentfrom
feat/pro/662

Conversation

@vytisbulkevicius

@vytisbulkevicius vytisbulkevicius commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds keyword-based filtering so posts can be included/excluded from automatic sharing based on words or phrases in the post title or content — useful when taxonomies aren't granular enough (e.g. skipping "sponsored" posts).

  • Free / Starter: a global Keyword Filtering field under General Settings.
  • Pro: configured per account in the post-format panel (the global field is hidden), mirroring how taxonomy filtering already behaves in Pro.
  • An Exclude? toggle switches between "skip matching posts" and "share only matching posts".

Implemented as a scoped posts_where clause on the selector query (keywords escaped with esc_like + prepare). When no keywords are set, the query is unchanged, so existing behaviour is preserved.

Will affect the visual aspect of the product

YES — a Keyword Filtering field is added (General Settings on Free/Starter; per-account post-format panel on Pro).

Test instructions

  • Free/Starter: General Settings → enter e.g. sponsored, keep Exclude checked, Save. Posts with "sponsored" in title/content are skipped from the queue. Switch Exclude off → only matching posts are shared.
  • Pro: open an account's customization panel → set keywords there (the global field is hidden). Confirm different accounts can have different keyword rules.
  • Leave the field empty and confirm sharing/selection is unchanged.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/tweet-old-post-pro/issues/662

Add the ability to filter posts for automatic sharing by keywords in the post
title or content, in addition to taxonomies. A global field is available under
General Settings (Free/Starter); in Pro the filter is configured per account in
the post-format panel, mirroring how taxonomy filtering works. An Exclude toggle
switches between skipping matching posts and sharing only matching posts. The
match is applied as a scoped posts_where clause and is inactive when empty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jun 19, 2026
@pirate-bot

pirate-bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Plugin build for d9f285b is ready 🛎️!

@vytisbulkevicius

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	assets/js/build/dashboard.js

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in 7469d37. The only conflict was in the compiled assets/js/build/dashboard.js — the Vue source files auto-merged cleanly, so I rebuilt the bundle from the merged sources to produce a clean artifact.

@pirate-bot pirate-bot added pr-checklist-complete The Pull Request checklist is complete. (automatic label) and removed pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) labels Jul 6, 2026
@vytisbulkevicius vytisbulkevicius merged commit fcf99f5 into development Jul 6, 2026
10 of 11 checks passed
@pirate-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 9.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants