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 |
---|---|
3420 |
|
3421 | $blog_id = (int) $args[0]; |
3422 | $username = $args[1]; |
3423 | $password = $args[2]; |
3424 | $post_type_name = $args[3]; |
3425 |
|
3426 | if ( isset( $args[4] ) ) |
3427 | $fields = $args[4]; |
3428 | else |
3429 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' ); |
3430 |
|
3431 | if ( !$user = $this->login( $username, $password ) ) |
3432 | return $this->error; |
3433 |
|
3434 | do_action( 'xmlrpc_call', 'wp.getPostType' ); |
3435 |
|
3436 | if( ! post_type_exists( $post_type_name ) ) |
3437 | return new IXR_Error( 403, __( 'Invalid post type' ) ); |
3438 |
|
Line | Code |
3466 |
|
3467 | $blog_id = (int) $args[0]; |
3468 | $username = $args[1]; |
3469 | $password = $args[2]; |
3470 | $filter = isset( $args[3] ) ? $args[3] : array( 'public' => true ); |
3471 |
|
3472 | if ( isset( $args[4] ) ) |
3473 | $fields = $args[4]; |
3474 | else |
3475 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' ); |
3476 |
|
3477 | if ( ! $user = $this->login( $username, $password ) ) |
3478 | return $this->error; |
3479 |
|
3480 | do_action( 'xmlrpc_call', 'wp.getPostTypes' ); |
3481 |
|
3482 | $post_types = get_post_types( $filter, 'objects' ); |
3483 |
|
3484 | $struct = array(); |