Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_allow_anonymous_comments

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2944
2945           $this->escape($args);
2946
2947           $blog_id     = (int) $args[0];
2948           $username     = $args[1];
2949           $password     = $args[2];
2950           $post          = $args[3];
2951           $content_struct = $args[4];
2952
2953           $allow_anon = apply_filters('xmlrpc_allow_anonymous_comments', false);
2954
2955           $user = $this->login($username, $password);
2956
2957           if ( !$user ) {
2958                $logged_in = false;
2959                if ( $allow_anon && get_option('comment_registration') )
2960                     return new IXR_Error( 403, __( 'You must be registered to comment' ) );
2961                else if ( !$allow_anon )
2962                     return $this->error;