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 |
---|---|
2374 | } else { |
2375 | /** |
2376 | * Filter the default user query fields used by the given XML-RPC method. |
2377 | * |
2378 | * @since 3.5.0 |
2379 | * |
2380 | * @param array $fields User query fields for given method. Default 'all'. |
2381 | * @param string $method The method name. |
2382 | */ |
2383 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' ); |
2384 | } |
2385 |
|
2386 | if ( ! $user = $this->login( $username, $password ) ) |
2387 | return $this->error; |
2388 |
|
2389 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2390 | do_action( 'xmlrpc_call', 'wp.getUser' ); |
2391 |
|
2392 | if ( ! current_user_can( 'edit_user', $user_id ) ) |
Line | Code |
2432 |
|
2433 | $username = $args[1]; |
2434 | $password = $args[2]; |
2435 | $filter = isset( $args[3] ) ? $args[3] : array(); |
2436 |
|
2437 | if ( isset( $args[4] ) ) { |
2438 | $fields = $args[4]; |
2439 | } else { |
2440 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2441 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' ); |
2442 | } |
2443 |
|
2444 | if ( ! $user = $this->login( $username, $password ) ) |
2445 | return $this->error; |
2446 |
|
2447 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2448 | do_action( 'xmlrpc_call', 'wp.getUsers' ); |
2449 |
|
2450 | if ( ! current_user_can( 'list_users' ) ) |
Line | Code |
2505 | $this->escape( $args ); |
2506 |
|
2507 | $username = $args[1]; |
2508 | $password = $args[2]; |
2509 |
|
2510 | if ( isset( $args[3] ) ) { |
2511 | $fields = $args[3]; |
2512 | } else { |
2513 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2514 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' ); |
2515 | } |
2516 |
|
2517 | if ( ! $user = $this->login( $username, $password ) ) |
2518 | return $this->error; |
2519 |
|
2520 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2521 | do_action( 'xmlrpc_call', 'wp.getProfile' ); |
2522 |
|
2523 | if ( ! current_user_can( 'edit_user', $user->ID ) ) |