force accept to add topic by anonymous user.
This commit is contained in:
parent
cde2c85825
commit
3939af3396
@ -497,11 +497,12 @@ function cbsonline_wpforo_topic_get_topics($args = [], &$items_count = 0, $count
|
||||
return $topics;
|
||||
}
|
||||
}
|
||||
// - force approve edit by anonymous user
|
||||
// - force approve add/edit by anonymous user
|
||||
add_filter('wpforo_add_topic_data_filter', 'cbsonline_wpforo_edit_topic_data_filter', 100);
|
||||
add_filter('wpforo_edit_topic_data_filter', 'cbsonline_wpforo_edit_topic_data_filter', 100);
|
||||
function cbsonline_wpforo_edit_topic_data_filter($args)
|
||||
{
|
||||
if (isset($args['name']) && isset($args['email'])) {
|
||||
if (!is_user_logged_in() && isset($args['name']) && isset($args['email'])) {
|
||||
$args['status'] = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user