@@ 1720-1732 (lines=13) @@ | ||
1717 | $password = $args[2]; |
|
1718 | $post_id = (int) $args[3]; |
|
1719 | ||
1720 | if ( isset( $args[4] ) ) { |
|
1721 | $fields = $args[4]; |
|
1722 | } else { |
|
1723 | /** |
|
1724 | * Filters the list of post query fields used by the given XML-RPC method. |
|
1725 | * |
|
1726 | * @since 3.4.0 |
|
1727 | * |
|
1728 | * @param array $fields Array of post fields. Default array contains 'post', 'terms', and 'custom_fields'. |
|
1729 | * @param string $method Method name. |
|
1730 | */ |
|
1731 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); |
|
1732 | } |
|
1733 | ||
1734 | if ( ! $user = $this->login( $username, $password ) ) |
|
1735 | return $this->error; |
|
@@ 1783-1788 (lines=6) @@ | ||
1780 | $password = $args[2]; |
|
1781 | $filter = isset( $args[3] ) ? $args[3] : array(); |
|
1782 | ||
1783 | if ( isset( $args[4] ) ) { |
|
1784 | $fields = $args[4]; |
|
1785 | } else { |
|
1786 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
|
1787 | $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' ); |
|
1788 | } |
|
1789 | ||
1790 | if ( ! $user = $this->login( $username, $password ) ) |
|
1791 | return $this->error; |