Skip to content
Docs
Get RestroPress

Filter

rpress_embed_hide_comments

Updated
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#

ParameterTypeDescription
$hide_commentsboolDefault true.
$postWP_Post|nullCurrent 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), in rpress_remove_embed_comments_button()
Was this page helpful?