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 |
---|---|
1848 | } else { |
1849 | /** |
1850 | * Filters the list of post query fields used by the given XML-RPC method. |
1851 | * |
1852 | * @since 3.4.0 |
1853 | * |
1854 | * @param array $fields Array of post fields. Default array contains 'post', 'terms', and 'custom_fields'. |
1855 | * @param string $method Method name. |
1856 | */ |
1857 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); |
1858 | } |
1859 |
|
1860 | $user = $this->login( $username, $password ); |
1861 | if ( ! $user ) { |
1862 | return $this->error; |
1863 | } |
1864 |
|
1865 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1866 | do_action( 'xmlrpc_call', 'wp.getPost' ); |
Line | Code |
1909 |
|
1910 | $username = $args[1]; |
1911 | $password = $args[2]; |
1912 | $filter = isset( $args[3] ) ? $args[3] : array(); |
1913 |
|
1914 | if ( isset( $args[4] ) ) { |
1915 | $fields = $args[4]; |
1916 | } else { |
1917 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1918 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' ); |
1919 | } |
1920 |
|
1921 | $user = $this->login( $username, $password ); |
1922 | if ( ! $user ) { |
1923 | return $this->error; |
1924 | } |
1925 |
|
1926 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1927 | do_action( 'xmlrpc_call', 'wp.getPosts' ); |