Skip to content

Social Relay 0.2.0 — hashtags from post tags

Choose a tag to compare

@johnjanney johnjanney released this 06 Sep 03:46
· 15 commits to main since this release
09ccf1f

Adds hashtags built from the post's own tags. Off by default.

Install

Download social-relay-0.2.0.zip below, then in WordPress: Plugins → Add New → Upload Plugin. Upgrading from 0.1.0 is a plain overwrite — no migration runs, and your settings are preserved.

Requires WordPress 6.5+ and PHP 8.2+.

sha256  12c66a7f272d379442de4124d73d4236fc7a5e34cdce0b40a1174e57a75f14a3

Read this before you turn it on

This is the current stable release and the version readme.txt serves. "Stable" here means the code is released and verified by the test suite — not that a post has been observed landing on X.

No post from this plugin has reached X in production, and the POST /2/tweets path is still untested against the live API.

Press "Send test post" on the settings page before relying on it. That one click exercises credentials, signing and the create-post endpoint, and it settles two open questions at once — including whether an App outside a Project can write, which a developer-forum report suggests may return HTTP 403 on precisely this endpoint.

What's new

Turn hashtags on under Settings → Social Relay → Hashtags. The post's own tags are appended, three at most by default.

A hashtag cannot contain a space, and X stops reading one at the first space or punctuation mark — so tags are joined and capitalised rather than merely stripped. That is the difference between a hashtag that works and one that is quietly wrong:

Your tag Posted Stripping spaces alone would give
machine learning #MachineLearning #machinelearning
iPhone SE #iPhoneSE #iphonese
co-op #CoOp #co — cut at the hyphen
rock 'n' roll #RockNRoll #rock — cut at the apostrophe
2026 nothing #2026, which X will not link

Capitalisation you typed is preserved, so iPhone SE is not flattened to #IphoneSe.

Hashtags never cost you words. If the post would exceed X's 280-character limit, hashtags are removed one at a time, whole, from the end. Your title is shortened only after every hashtag is gone — so a long title may post with fewer hashtags than it has tags, or none. That is the plugin protecting your title, not a fault.

Two new settings, both with safe defaults: hashtags_enabled (off) and hashtags_max (3, maximum 10).

Versioning

MINOR under VERSIONING.md. New functionality, and nothing on that document's exhaustive breaking list applies — the new settings keys carry safe defaults, which it names explicitly as not breaking, so schema_version stays at 1 and no migration runs.

0.1.0 remains flagged a pre-release: it was never a stable release, and reclassifying it now would rewrite that history.

Verification

php -l, every file                    clean
vendor/bin/phpcs                      clean
vendor/bin/phpstan analyse            [OK] No errors
phpunit, full suite (PHP 8.2/WP 6.5)  OK (181 tests, 717 assertions)
CI: PHP 8.2 + 8.4, WP 6.5 + latest    all green
bin/check-version.sh                  four version strings agree; tag matches

Full detail in CHANGELOG.md.

Full Changelog: v0.1.0...v0.2.0