Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_default_user_fields

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

This hook occurs 3 times in this file.

Line Code
2623           } else {
2624                /**
2625                 * Filters the default user query fields used by the given XML-RPC method.
2626                 *
2627                 * @since 3.5.0
2628                 *
2629                 * @param array  $fields User query fields for given method. Default 'all'.
2630                 * @param string $method The method name.
2631                 */
2632                $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' );
2633           }
2634
2635           $user = $this->login( $username, $password );
2636           if ( ! $user ) {
2637                return $this->error;
2638           }
2639
2640           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2641           do_action( 'xmlrpc_call', 'wp.getUser' );
 
Line Code
2686
2687           $username = $args[1];
2688           $password = $args[2];
2689           $filter   = isset( $args[3] ) ? $args[3] : array();
2690
2691           if ( isset( $args[4] ) ) {
2692                $fields = $args[4];
2693           } else {
2694                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2695                $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' );
2696           }
2697
2698           $user = $this->login( $username, $password );
2699           if ( ! $user ) {
2700                return $this->error;
2701           }
2702
2703           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2704           do_action( 'xmlrpc_call', 'wp.getUsers' );
 
Line Code
2766           $this->escape( $args );
2767
2768           $username = $args[1];
2769           $password = $args[2];
2770
2771           if ( isset( $args[3] ) ) {
2772                $fields = $args[3];
2773           } else {
2774                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2775                $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' );
2776           }
2777
2778           $user = $this->login( $username, $password );
2779           if ( ! $user ) {
2780                return $this->error;
2781           }
2782
2783           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2784           do_action( 'xmlrpc_call', 'wp.getProfile' );