xmlrpc_allow_anonymous_comments хук-фильтрWP 2.7.0

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_xmlrpc_server::wp_newComment()
xmlrpc_allow_anonymous_comments
wp-includes/class-wp-xmlrpc-server.php 3915
$allow_anon = apply_filters( 'xmlrpc_allow_anonymous_comments', false );

Где используется хук в WordPress

Использование не найдено.