xmlrpc_allow_anonymous_comments
Filters whether to allow anonymous comments over XML-RPC.
Usage
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.
Default: false
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
wp-includes/class-wp-xmlrpc-server.php 3914
$allow_anon = apply_filters( 'xmlrpc_allow_anonymous_comments', false );