allow to edit topics by anonymous users.
This commit is contained in:
@ -515,6 +515,16 @@ function cbsonline_wpforo_edit_topic_data_filter($args)
|
||||
|
||||
return $args;
|
||||
}
|
||||
// - allow to edit topics by anonymous user
|
||||
add_action('wpforo_start_edit_topic', 'cbsonline_wpforo_start_edit_topic');
|
||||
function cbsonline_wpforo_start_edit_topic($args)
|
||||
{
|
||||
if (!is_user_logged_in()) {
|
||||
if ($topic = WPF()->topic->get_topic($args['topicid'])) {
|
||||
WPF()->current_user_email = $topic['email'];
|
||||
}
|
||||
}
|
||||
}
|
||||
// - allow to delete topics by anonymous user
|
||||
add_action('wp_ajax_nopriv_wpforo_delete_ajax', 'cbsonline_wpforo_nopriv_delete');
|
||||
function cbsonline_wpforo_nopriv_delete()
|
||||
|
Reference in New Issue
Block a user