xmlrpc_allow_anonymous_comments
Filters whether to allow anonymous comments over XML-RPC.
Использование
add_filter( 'xmlrpc_allow_anonymous_comments', 'wp_kama_xmlrpc_allow_anonymous_comments_filter' ); /** * Function for `xmlrpc_allow_anonymous_comments` filter-hook. * * @param bool $allow Whether to allow anonymous commenting via XML-RPC. * * @return bool */ function wp_kama_xmlrpc_allow_anonymous_comments_filter( $allow ){ // filter... return $allow; }
- $allow(true|false)
- Whether to allow anonymous commenting via XML-RPC.
По умолчанию: false
Список изменений
С версии 2.7.0 | Введена. |
Где вызывается хук
wp-includes/class-wp-xmlrpc-server.php 3902
$allow_anon = apply_filters( 'xmlrpc_allow_anonymous_comments', false );