| Hook | Arguments | Fires |
|---|---|---|
lh_shadow_taxonomies_object_shadowed | $object_id, $type, $term_id, $taxonomy | When a new shadow term is created for a user or BuddyPress group. Not fired for post types. |
lh_shadow_taxonomies_object_unshadowed | $object_id, $type, $term_id, $taxonomy | Just before a user’s or group’s shadow term is deleted, so the term is still valid. Not fired for post types. |
lh_shadow_taxonomies_term_assigned | $object_id, $term_id, $taxonomy, $shadowed_id, $type, $tagged_by, $tagged_at | When a shadow term is newly set on an object (from set_object_terms), and again for existing assignments during cron reconciliation, with $tagged_by 0 and $tagged_at empty. $tagged_at is a UTC MySQL datetime. |
lh_shadow_taxonomies_term_removed | $object_id, $term_id, $taxonomy, $shadowed_id, $type | When a shadow term is removed from an object. |
lh_shadow_taxonomies_process, lh_shadow_taxonomies_initial | none | Cron events (daily and one-off at activation) that run the backfill and reconciliation passes. |
| Hook | Default and arguments | Purpose |
|---|---|---|
lh_shadow_taxonomies_init_plugin | true | Return false to stop the plugin registering any hooks, without deactivating it. Evaluated on plugins_loaded. |
lh_shadow_taxonomies_return_object_whitelist | array( 'user', 'bp_group', 'post' ) | Object types the lookup helpers accept; anything else is treated as post. |
lh_shadow_taxonomies_active_post_statuses | array( 'publish' ) | Post statuses that get a shadow term, on save and in the backfill. |
lh_shadow_taxonomies_get_blacklisted_ids_by_taxonomy | array(), $taxonomy, $object_type | Object IDs never to shadow in that taxonomy. Honoured by the backfill for all types and by maybe_shadow_user() for users; saving a post or group does not check it. |
lh_shadow_taxonomies_return_object_backfill_number | 50, $taxonomy, $object_type | Objects backfilled per taxonomy per cron run. |
lh_shadow_taxonomies_return_plugin_debugging_status | false | With WP_DEBUG on, return true to log term insert and update failures to the error log. |