Skip to content

Releases: nimrod-cohen/help-center

v1.2.0

Choose a tag to compare

@nimrod-cohen nimrod-cohen released this 07 Aug 12:33

v1.2.0: public articles, and a login gate for everything else

An article can now be marked Public, making it readable by its own link
without a login. A new Visibility meta box carries the flag and shows the
shareable link; a Visibility column on the list view makes it clear at a
glance which articles are exposed.

The flag only means something once the rest is closed, and nothing was
closed before: the shortcode page has no visitor restriction, and both
AJAX endpoints registered nopriv handlers with no capability check, so
every article was already readable by anyone. So this also adds the gate:

  • get_article serves a logged-out visitor only a flagged-public article.
  • get_articles (the index and the search over it) always requires a login,
    so a public article is reachable by its link but is not discoverable by
    browsing or searching.
  • The front end shows a public article without a back button, since there
    is no index for that visitor, and shows a login prompt for anything
    else, including a bare /help/.
  • REST: the post type keeps show_in_rest so the block editor still works,
    but core's check_read_permission grants anonymous reads to anything with
    post_status publish regardless of public — which would have served
    every article from /wp-json/wp/v2/help_article and made the flag
    meaningless. A rest_pre_dispatch guard now requires a login on that
    route. Editors authenticate by cookie, so it costs them nothing.

Note on deploy: no article is flagged public, so the Support Center
becomes members-only until the box is ticked on whichever articles should
stay open.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

v1.1.0

Choose a tag to compare

@nimrod-cohen nimrod-cohen released this 07 Aug 11:33

v1.1.0: rename to Support Center, add video articles

Rename: plugin name/description, post type labels and the category
taxonomy now read "Support Center" / "Support Article". The CPT slug
stays help_article and the shortcode stays [help-center] — renaming
either would orphan existing articles and break the embedding page.

Video articles: a new Video meta box takes a Vimeo link and renders the
player above the article body, so an article can be a video instead of
text by leaving the body empty. Body text still renders underneath when
present. Clearing the field deletes the meta rather than storing an
empty value, so the article reverts to text only. The list marks video
articles with a play badge and falls back to a label when there is no
body text to build an excerpt from.

Also fixes the pre-existing bare-URL embed conversion, now shared with
the meta field through one parser:

  • it dropped the unlisted-video hash, so vimeo.com// embedded
    as a private video that would not play. Now emitted as ?h=,
    along with player.vimeo.com, /channels/ and /groups/ URL shapes.
  • its pattern could match a Vimeo URL already inside a tag attribute.
    the_content runs WP autoembed first, so a standalone link is often
    already an iframe, and rewriting its src corrupted the markup. A
    lookbehind now keeps the conversion off attribute values.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

v1.0.0

Choose a tag to compare

@nimrod-cohen nimrod-cohen released this 10 Apr 21:14

Initial release - Help Center plugin with SPA frontend, search, categories, share button, Vimeo embeds, GitHub auto-updater