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 |
---|---|
4528 | } else { |
4529 | /** |
4530 | * Filters the default query fields used by the given XML-RPC method. |
4531 | * |
4532 | * @since 3.4.0 |
4533 | * |
4534 | * @param array $fields An array of post type query fields for the given method. |
4535 | * @param string $method The method name. |
4536 | */ |
4537 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' ); |
4538 | } |
4539 |
|
4540 | $user = $this->login( $username, $password ); |
4541 | if ( ! $user ) { |
4542 | return $this->error; |
4543 | } |
4544 |
|
4545 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4546 | do_action( 'xmlrpc_call', 'wp.getPostType', $args, $this ); |
Line | Code |
4585 |
|
4586 | $username = $args[1]; |
4587 | $password = $args[2]; |
4588 | $filter = isset( $args[3] ) ? $args[3] : array( 'public' => true ); |
4589 |
|
4590 | if ( isset( $args[4] ) ) { |
4591 | $fields = $args[4]; |
4592 | } else { |
4593 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4594 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' ); |
4595 | } |
4596 |
|
4597 | $user = $this->login( $username, $password ); |
4598 | if ( ! $user ) { |
4599 | return $this->error; |
4600 | } |
4601 |
|
4602 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4603 | do_action( 'xmlrpc_call', 'wp.getPostTypes', $args, $this ); |