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 |
---|---|
2021 |
|
2022 | $blog_id = (int) $args[0]; |
2023 | $username = $args[1]; |
2024 | $password = $args[2]; |
2025 | $user_id = (int) $args[3]; |
2026 |
|
2027 | if ( isset( $args[4] ) ) |
2028 | $fields = $args[4]; |
2029 | else |
2030 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' ); |
2031 |
|
2032 | if ( ! $user = $this->login( $username, $password ) ) |
2033 | return $this->error; |
2034 |
|
2035 | do_action( 'xmlrpc_call', 'wp.getUser' ); |
2036 |
|
2037 | if ( ! current_user_can( 'edit_user', $user_id ) ) |
2038 | return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) ); |
2039 |
|
Line | Code |
2074 |
|
2075 | $blog_id = (int) $args[0]; |
2076 | $username = $args[1]; |
2077 | $password = $args[2]; |
2078 | $filter = isset( $args[3] ) ? $args[3] : array(); |
2079 |
|
2080 | if ( isset( $args[4] ) ) |
2081 | $fields = $args[4]; |
2082 | else |
2083 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' ); |
2084 |
|
2085 | if ( ! $user = $this->login( $username, $password ) ) |
2086 | return $this->error; |
2087 |
|
2088 | do_action( 'xmlrpc_call', 'wp.getUsers' ); |
2089 |
|
2090 | if ( ! current_user_can( 'list_users' ) ) |
2091 | return new IXR_Error( 401, __( 'Sorry, you cannot list users.' ) ); |
2092 |
|
Line | Code |
2141 | $this->escape( $args ); |
2142 |
|
2143 | $blog_id = (int) $args[0]; |
2144 | $username = $args[1]; |
2145 | $password = $args[2]; |
2146 |
|
2147 | if ( isset( $args[3] ) ) |
2148 | $fields = $args[3]; |
2149 | else |
2150 | $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' ); |
2151 |
|
2152 | if ( ! $user = $this->login( $username, $password ) ) |
2153 | return $this->error; |
2154 |
|
2155 | do_action( 'xmlrpc_call', 'wp.getProfile' ); |
2156 |
|
2157 | if ( ! current_user_can( 'edit_user', $user->ID ) ) |
2158 | return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) ); |
2159 |
|