Skip to content

atmosphere_atproto_preview_transformers

github-actions[bot] edited this page Jul 8, 2026 · 2 revisions

Filters the transformers offered by the ?atproto preview endpoint.

?atproto=all. Entries that are not Base instances are ignored. A later transformer sharing a built-in's NSID supersedes it, the lets a registration override a default by NSID.

Auto-generated Example

/**
 * Filters the transformers offered by the `?atproto` preview endpoint.
 * 
 * `?atproto=all`. Entries that are not `Base` instances are ignored.
 * A later transformer sharing a built-in's NSID supersedes it, the
 * lets a registration override a default by NSID.
 *
 * @param Atmosphere\Base[] $transformers 
 * @param WP_Post           $post 
 * @return Atmosphere\Base[] The filtered value.
 */
function my_atmosphere_atproto_preview_transformers_callback( Atmosphere\Base[] $transformers, WP_Post $post = null ) {
    // Your code here.
    return $transformers;
}
add_filter( 'atmosphere_atproto_preview_transformers', 'my_atmosphere_atproto_preview_transformers_callback', 10, 2 );

Parameters

  • Atmosphere\Base[] $transformers Default transformers for the context.
  • WP_Post|null $post Queried post, or null on the front page.

Files

\apply_filters( 'atmosphere_atproto_preview_transformers', $defaults, $post )

← All Hooks

Clone this wiki locally