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 2 times in this file.
Line | Code |
---|---|
1910 | } else { |
1911 | /** |
1912 | * Filters the list of post query fields used by the given XML-RPC method. |
1913 | * |
1914 | * @since 3.4.0 |
1915 | * |
1916 | * @param array $fields Array of post fields. Default array contains 'post', 'terms', and 'custom_fields'. |
1917 | * @param string $method Method name. |
1918 | */ |
1919 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); |
1920 | } |
1921 |
|
1922 | $user = $this->login( $username, $password ); |
1923 | if ( ! $user ) { |
1924 | return $this->error; |
1925 | } |
1926 |
|
1927 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1928 | do_action( 'xmlrpc_call', 'wp.getPost', $args, $this ); |
Line | Code |
1971 |
|
1972 | $username = $args[1]; |
1973 | $password = $args[2]; |
1974 | $filter = isset( $args[3] ) ? $args[3] : array(); |
1975 |
|
1976 | if ( isset( $args[4] ) ) { |
1977 | $fields = $args[4]; |
1978 | } else { |
1979 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1980 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' ); |
1981 | } |
1982 |
|
1983 | $user = $this->login( $username, $password ); |
1984 | if ( ! $user ) { |
1985 | return $this->error; |
1986 | } |
1987 |
|
1988 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1989 | do_action( 'xmlrpc_call', 'wp.getPosts', $args, $this ); |