Skip to content

friend_post_edit_link

Alex Kirk edited this page Jan 5, 2023 · 15 revisions

Allow overriding the link for editing friend posts.

By default on the Frontend, a post cannot be edited because $new_link is false.

Example:

add_filter( 'friend_post_edit_link', function( $link, $original_link ) {
    if ( ! $link ) {
         $link = $original_link; // always allow editing.
     }
     return $link;
}, 10, 2 );

## Files

- [includes/class-frontend.php:700](https://github.com/akirk/friends/blob/main/includes/class-frontend.php#L700)


[Hooks](Hooks)
Clone this wiki locally