WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 3 times in this file.
Line | Code |
---|---|
2222 | } else { |
2223 | /** |
2224 | * Filter the default user query fields used by the given XML-RPC method. |
2225 | * |
2226 | * @since 3.5.0 |
2227 | * |
2228 | * @param array $fields User query fields for given method. Default 'all'. |
2229 | * @param string $method The method name. |
2230 | */ |
2231 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' ); |
2232 | } |
2233 |
|
2234 | if ( ! $user = $this->login( $username, $password ) ) |
2235 | return $this->error; |
2236 |
|
2237 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2238 | do_action( 'xmlrpc_call', 'wp.getUser' ); |
2239 |
|
2240 | if ( ! current_user_can( 'edit_user', $user_id ) ) |
Line | Code |
2277 |
|
2278 | $username = $args[1]; |
2279 | $password = $args[2]; |
2280 | $filter = isset( $args[3] ) ? $args[3] : array(); |
2281 |
|
2282 | if ( isset( $args[4] ) ) { |
2283 | $fields = $args[4]; |
2284 | } else { |
2285 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2286 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' ); |
2287 | } |
2288 |
|
2289 | if ( ! $user = $this->login( $username, $password ) ) |
2290 | return $this->error; |
2291 |
|
2292 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2293 | do_action( 'xmlrpc_call', 'wp.getUsers' ); |
2294 |
|
2295 | if ( ! current_user_can( 'list_users' ) ) |
Line | Code |
2346 | $this->escape( $args ); |
2347 |
|
2348 | $username = $args[1]; |
2349 | $password = $args[2]; |
2350 |
|
2351 | if ( isset( $args[3] ) ) { |
2352 | $fields = $args[3]; |
2353 | } else { |
2354 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2355 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' ); |
2356 | } |
2357 |
|
2358 | if ( ! $user = $this->login( $username, $password ) ) |
2359 | return $this->error; |
2360 |
|
2361 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2362 | do_action( 'xmlrpc_call', 'wp.getProfile' ); |
2363 |
|
2364 | if ( ! current_user_can( 'edit_user', $user->ID ) ) |