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 |
---|---|
4119 | } else { |
4120 | /** |
4121 | * Filters the default query fields used by the given XML-RPC method. |
4122 | * |
4123 | * @since 3.4.0 |
4124 | * |
4125 | * @param array $fields An array of post type query fields for the given method. |
4126 | * @param string $method The method name. |
4127 | */ |
4128 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' ); |
4129 | } |
4130 |
|
4131 | if ( !$user = $this->login( $username, $password ) ) |
4132 | return $this->error; |
4133 |
|
4134 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4135 | do_action( 'xmlrpc_call', 'wp.getPostType' ); |
4136 |
|
4137 | if ( ! post_type_exists( $post_type_name ) ) |
Line | Code |
4171 |
|
4172 | $username = $args[1]; |
4173 | $password = $args[2]; |
4174 | $filter = isset( $args[3] ) ? $args[3] : array( 'public' => true ); |
4175 |
|
4176 | if ( isset( $args[4] ) ) { |
4177 | $fields = $args[4]; |
4178 | } else { |
4179 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4180 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' ); |
4181 | } |
4182 |
|
4183 | if ( ! $user = $this->login( $username, $password ) ) |
4184 | return $this->error; |
4185 |
|
4186 | /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
4187 | do_action( 'xmlrpc_call', 'wp.getPostTypes' ); |
4188 |
|
4189 | $post_types = get_post_types( $filter, 'objects' ); |