Let Administrators Delete Messages
-
So, here is a fix to let ‘admins’ (assuming only admins have the ‘manage_options’ capability) delete messages:
Change the followingwp-dashboard-chat.php:166-170
if ($message->user_id == $this->current_user->ID ) { echo '<a href="javascript:void(0)" class="del" data-mid="' . $message->id . '"></a>'; } else { echo '<a href="javascript:void(0)" class="rep" data-mid="' . $message->id . '" username="' . $author->nickname . '"></a>'; }
to
if ($message->user_id == $this->current_user->ID ) { echo '<a href="javascript:void(0)" class="del" data-mid="' . $message->id . '"></a>'; } else { if (current_user_can('manage_options')) { echo '<a href="javascript:void(0)" class="del" data-mid="' . $message->id . '"></a>'; } echo '<a href="javascript:void(0)" class="rep" data-mid="' . $message->id . '" username="' . $author->nickname . '"></a>'; }
- The topic ‘Let Administrators Delete Messages’ is closed to new replies.