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 |
|---|---|
| 1563 | } else { |
| 1564 | /** |
| 1565 | * Filter the list of post query fields used by the given XML-RPC method. |
| 1566 | * |
| 1567 | * @since 3.4.0 |
| 1568 | * |
| 1569 | * @param array $fields Array of post fields. |
| 1570 | * @param string $method Method name. |
| 1571 | */ |
| 1572 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); |
| 1573 | } |
| 1574 | |
| 1575 | if ( ! $user = $this->login( $username, $password ) ) |
| 1576 | return $this->error; |
| 1577 | |
| 1578 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
| 1579 | do_action( 'xmlrpc_call', 'wp.getPost' ); |
| 1580 | |
| 1581 | $post = get_post( $post_id, ARRAY_A ); |
| Line | Code |
| 1621 | |
| 1622 | $username = $args[1]; |
| 1623 | $password = $args[2]; |
| 1624 | $filter = isset( $args[3] ) ? $args[3] : array(); |
| 1625 | |
| 1626 | if ( isset( $args[4] ) ) { |
| 1627 | $fields = $args[4]; |
| 1628 | } else { |
| 1629 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
| 1630 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' ); |
| 1631 | } |
| 1632 | |
| 1633 | if ( ! $user = $this->login( $username, $password ) ) |
| 1634 | return $this->error; |
| 1635 | |
| 1636 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
| 1637 | do_action( 'xmlrpc_call', 'wp.getPosts' ); |
| 1638 | |
| 1639 | $query = array(); |