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 |
---|---|
1782 | } else { |
1783 | /** |
1784 | * Filters the list of post query fields used by the given XML-RPC method. |
1785 | * |
1786 | * @since 3.4.0 |
1787 | * |
1788 | * @param array $fields Array of post fields. Default array contains 'post', 'terms', and 'custom_fields'. |
1789 | * @param string $method Method name. |
1790 | */ |
1791 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); |
1792 | } |
1793 |
|
1794 | if ( ! $user = $this->login( $username, $password ) ) |
1795 | return $this->error; |
1796 |
|
1797 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1798 | do_action( 'xmlrpc_call', 'wp.getPost' ); |
1799 |
|
1800 | $post = get_post( $post_id, ARRAY_A ); |
Line | Code |
1838 |
|
1839 | $username = $args[1]; |
1840 | $password = $args[2]; |
1841 | $filter = isset( $args[3] ) ? $args[3] : array(); |
1842 |
|
1843 | if ( isset( $args[4] ) ) { |
1844 | $fields = $args[4]; |
1845 | } else { |
1846 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1847 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' ); |
1848 | } |
1849 |
|
1850 | if ( ! $user = $this->login( $username, $password ) ) |
1851 | return $this->error; |
1852 |
|
1853 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
1854 | do_action( 'xmlrpc_call', 'wp.getPosts' ); |
1855 |
|
1856 | $query = array(); |