Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Delete Post by It’s Owner


_ck_
Participant

@_ck_

It’s a mini-plugin, just make a plugin out of it.

I keep a single plugin composed of all my mini-plugins called tweaks.php but you can call it anything.

<?php
/*
Plugin Name: Tweaks (mini-plugins)
*/

function delete_own_post($retvalue, $capability, $args) {
if ($capability=="delete_post") {return bb_current_user_can( 'edit_post', $args[1]);}
return $retvalue;
}
add_filter('bb_current_user_can', 'delete_own_post',10,3);

?>

Skip to toolbar