Recent

tptn_pre_pop_posts filter

tptn_pre_pop_posts

Pre-filter the popular posts output.

Return a non-null value to short-circuit the default rendering, e.g. to replace it with a lazy load placeholder. Runs for all display methods.

Type: filter
Since: 4.4.0
Source: includes/frontend/class-display.php line 114

Parameters

TypeNameDescription
string|null$prePre-rendered output. Default null.
array$argsFully parsed arguments array.
\WP_Post|null$postCurrent post object.

Usage

add_filter( 'tptn_pre_pop_posts', function($pre, $args, $post) {
    // ...
    return $pre;
} );