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 |
---|---|
2425 | } else { |
2426 | /** |
2427 | * Filters the default user query fields used by the given XML-RPC method. |
2428 | * |
2429 | * @since 3.5.0 |
2430 | * |
2431 | * @param array $fields User query fields for given method. Default 'all'. |
2432 | * @param string $method The method name. |
2433 | */ |
2434 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' ); |
2435 | } |
2436 |
|
2437 | if ( ! $user = $this->login( $username, $password ) ) |
2438 | return $this->error; |
2439 |
|
2440 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2441 | do_action( 'xmlrpc_call', 'wp.getUser' ); |
2442 |
|
2443 | if ( ! current_user_can( 'edit_user', $user_id ) ) |
Line | Code |
2483 |
|
2484 | $username = $args[1]; |
2485 | $password = $args[2]; |
2486 | $filter = isset( $args[3] ) ? $args[3] : array(); |
2487 |
|
2488 | if ( isset( $args[4] ) ) { |
2489 | $fields = $args[4]; |
2490 | } else { |
2491 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2492 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' ); |
2493 | } |
2494 |
|
2495 | if ( ! $user = $this->login( $username, $password ) ) |
2496 | return $this->error; |
2497 |
|
2498 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2499 | do_action( 'xmlrpc_call', 'wp.getUsers' ); |
2500 |
|
2501 | if ( ! current_user_can( 'list_users' ) ) |
Line | Code |
2556 | $this->escape( $args ); |
2557 |
|
2558 | $username = $args[1]; |
2559 | $password = $args[2]; |
2560 |
|
2561 | if ( isset( $args[3] ) ) { |
2562 | $fields = $args[3]; |
2563 | } else { |
2564 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2565 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' ); |
2566 | } |
2567 |
|
2568 | if ( ! $user = $this->login( $username, $password ) ) |
2569 | return $this->error; |
2570 |
|
2571 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2572 | do_action( 'xmlrpc_call', 'wp.getProfile' ); |
2573 |
|
2574 | if ( ! current_user_can( 'edit_user', $user->ID ) ) |