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 |
---|---|
2481 | } else { |
2482 | /** |
2483 | * Filters the default user query fields used by the given XML-RPC method. |
2484 | * |
2485 | * @since 3.5.0 |
2486 | * |
2487 | * @param array $fields User query fields for given method. Default 'all'. |
2488 | * @param string $method The method name. |
2489 | */ |
2490 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' ); |
2491 | } |
2492 |
|
2493 | if ( ! $user = $this->login( $username, $password ) ) |
2494 | return $this->error; |
2495 |
|
2496 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2497 | do_action( 'xmlrpc_call', 'wp.getUser' ); |
2498 |
|
2499 | if ( ! current_user_can( 'edit_user', $user_id ) ) |
Line | Code |
2539 |
|
2540 | $username = $args[1]; |
2541 | $password = $args[2]; |
2542 | $filter = isset( $args[3] ) ? $args[3] : array(); |
2543 |
|
2544 | if ( isset( $args[4] ) ) { |
2545 | $fields = $args[4]; |
2546 | } else { |
2547 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2548 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' ); |
2549 | } |
2550 |
|
2551 | if ( ! $user = $this->login( $username, $password ) ) |
2552 | return $this->error; |
2553 |
|
2554 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2555 | do_action( 'xmlrpc_call', 'wp.getUsers' ); |
2556 |
|
2557 | if ( ! current_user_can( 'list_users' ) ) |
Line | Code |
2612 | $this->escape( $args ); |
2613 |
|
2614 | $username = $args[1]; |
2615 | $password = $args[2]; |
2616 |
|
2617 | if ( isset( $args[3] ) ) { |
2618 | $fields = $args[3]; |
2619 | } else { |
2620 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2621 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' ); |
2622 | } |
2623 |
|
2624 | if ( ! $user = $this->login( $username, $password ) ) |
2625 | return $this->error; |
2626 |
|
2627 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
2628 | do_action( 'xmlrpc_call', 'wp.getProfile' ); |
2629 |
|
2630 | if ( ! current_user_can( 'edit_user', $user->ID ) ) |