Digital Sovereignty for everyone

LH Shadow Taxonomies

LH Shadow Taxonomies lets you relate one kind of WordPress object to another using ordinary taxonomy terms. Register a taxonomy with a shadow argument naming a post type, users or BuddyPress groups, and the plugin keeps one term in that taxonomy for every object of that type: created when the object is created, renamed when it changes and removed when it is deleted. Tagging a post with one of those terms then records a relationship to the underlying user, group or post, using the editor screens, queries and REST routes WordPress already has.

It is a developer library: it registers no taxonomies itself and does nothing until another plugin or theme declares a shadow taxonomy. LH Buddypress Group Tagger is one such plugin.

Features

  • Shadow any post type, WordPress users or BuddyPress groups, declared with a single argument to register_taxonomy().
  • Terms stay in step with their objects: name, slug and description follow the post title, user display name or group name.
  • Objects that existed before the taxonomy was registered are backfilled in batches by a daily cron job.
  • A Shadow column on the taxonomy’s admin screen links each term to the user, group or post it stands for.
  • Actions fire when objects are shadowed or unshadowed and when shadow terms are assigned to or removed from content, so other plugins can build on the relationships.
  • Filters to exclude particular objects, change which post statuses are shadowed and tune the backfill batch size.

Getting started

Activate the plugin, then register a taxonomy with 'shadow' => 'user' (or 'bp_group', or a post type name) among its arguments, attached to whichever post types should be tagged with it. Existing objects get their terms within a day; new ones get theirs immediately. BuddyPress is only needed for group shadowing.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.