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 |
---|---|
1858 | } else { |
1859 | /** |
1860 | * Filters the list of post query fields used by the given XML-RPC method. |
1861 | * |
1862 | * @since 3.4.0 |
1863 | * |
1864 | * @param array $fields Array of post fields. Default array contains 'post', 'terms', and 'custom_fields'. |
1865 | * @param string $method Method name. |
1866 | */ |
1867 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); |
1868 | } |
1869 |
|
1870 | $user = $this->login( $username, $password ); |
1871 | if ( ! $user ) { |
1872 | return $this->error; |
1873 | } |
1874 |
|
1875 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1876 | do_action( 'xmlrpc_call', 'wp.getPost', $args, $this ); |
Line | Code |
1919 |
|
1920 | $username = $args[1]; |
1921 | $password = $args[2]; |
1922 | $filter = isset( $args[3] ) ? $args[3] : array(); |
1923 |
|
1924 | if ( isset( $args[4] ) ) { |
1925 | $fields = $args[4]; |
1926 | } else { |
1927 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1928 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' ); |
1929 | } |
1930 |
|
1931 | $user = $this->login( $username, $password ); |
1932 | if ( ! $user ) { |
1933 | return $this->error; |
1934 | } |
1935 |
|
1936 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1937 | do_action( 'xmlrpc_call', 'wp.getPosts', $args, $this ); |