bp_core_filter_edit_post_link( string $edit_link = '', int $post_id )

Filter the edit post link to avoid its display in BuddyPress pages.

Description

Parameters

$edit_link

(string) (Optional) The edit link.

Default value: ''

$post_id

(int) (Required) Post ID.

Return

(false|string) Will be a boolean (false) if $post_id is 0. Will be a string (the unchanged edit link) otherwise

Source

File: bp-core/bp-core-filters.php

function bp_core_filter_edit_post_link( $edit_link = '', $post_id = 0 ) {
	if ( 0 === $post_id ) {
		$edit_link = false;
	}

	return $edit_link;
}

Changelog

Changelog
Version Description
BuddyPress 2.1.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.