Filter
rpress_embed_hide_comments
On this page
Filters whether the comments button is hidden in menu item embeds.
Runs in rpress_remove_embed_comments_button() with the current post. Only when the post is a menu item and the value is strictly true is the core embed comments button removed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$hide_comments | bool | Default true. |
$post | WP_Post|null | Current global post. |
Return value#
bool. True to remove the comments button from the embed.
Example#
function my_show_embed_comments( $hide_comments, $post ) {
return false;
}
add_filter( 'rpress_embed_hide_comments', 'my_show_embed_comments', 10, 2 );
Source#
Applied in:
includes/template-functions.php(line 978), inrpress_remove_embed_comments_button()
Was this page helpful?
