how to remove the edit, delete buttons/links from plugin
#1
hi all,

i have made a plugin and i want, if plugin is activated, on each post, remove the edit, delete buttons/links.

i think it is in post bit. but i dont know how to do it in plugin?

which method / function will replace which code block to empty or '' or simply remove the div, links etc?
With Regards and many thanks.
------------------------------------------
Reply
#2
Use the postbit hooks. It passes along the $post var, which has all of those buttons.

If you go an take a peek at the postbit template, you can see what you're going to want to do is:
function called_on_postbit_hook($post)
{
$post['button_quickdelete'] = '';
$post['button_edit'] = '';
return $post;
}
-Paul H.

Cogisne lingua latina?
Reply
#3
you mean this : and this works for my plugin , thanks


$plugins->add_hook("postbit", "called_on_postbit_hook");
function called_on_postbit_hook($post)
{
$post['button_quickdelete'] = '';
$post['button_edit'] = '';
return $post;
}



thanks a lot, i was struggling since last 3 days for it. can you refer me any tutorial or know how links , documentation where postbit type methos are written clearly, what arguments are passing there ect.

agian thanks
With Regards and many thanks.
------------------------------------------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)