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 |
---|---|
4537 | } else { |
4538 | /** |
4539 | * Filters the default query fields used by the given XML-RPC method. |
4540 | * |
4541 | * @since 3.4.0 |
4542 | * |
4543 | * @param array $fields An array of post type query fields for the given method. |
4544 | * @param string $method The method name. |
4545 | */ |
4546 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' ); |
4547 | } |
4548 |
|
4549 | $user = $this->login( $username, $password ); |
4550 | if ( ! $user ) { |
4551 | return $this->error; |
4552 | } |
4553 |
|
4554 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4555 | do_action( 'xmlrpc_call', 'wp.getPostType', $args, $this ); |
Line | Code |
4594 |
|
4595 | $username = $args[1]; |
4596 | $password = $args[2]; |
4597 | $filter = isset( $args[3] ) ? $args[3] : array( 'public' => true ); |
4598 |
|
4599 | if ( isset( $args[4] ) ) { |
4600 | $fields = $args[4]; |
4601 | } else { |
4602 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4603 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' ); |
4604 | } |
4605 |
|
4606 | $user = $this->login( $username, $password ); |
4607 | if ( ! $user ) { |
4608 | return $this->error; |
4609 | } |
4610 |
|
4611 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4612 | do_action( 'xmlrpc_call', 'wp.getPostTypes', $args, $this ); |