user2458283
user2458283

Reputation: 11

Custom edit link wordpress

I have this code for create edit link custom from front website :

<?php
function my_edit_post_link($url,$post->ID,$context) 
{
$url="ddd";
return $url;
}
add_filter( 'get_edit_post_link', 'my_edit_post_link');
?>

But give problems , exactly this :

Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' 

I don´t know what bad into the function , if you know please tell me something

Thank´s

Upvotes: 0

Views: 767

Answers (1)

The Alpha
The Alpha

Reputation: 146269

You may try this

function my_edit_post_link( $url, $post_id, $context )
{

    //...
    return $url;
}
add_filter( 'get_edit_post_link', 'my_edit_post_link', 10, 3 );

Upvotes: 2

Related Questions