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 |
---|---|
3090 |
|
3091 | $blog_id = (int) $args[0]; |
3092 | $username = $args[1]; |
3093 | $password = $args[2]; |
3094 | $post_type_name = $args[3]; |
3095 |
|
3096 | if ( isset( $args[4] ) ) |
3097 | $fields = $args[4]; |
3098 | else |
3099 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' ); |
3100 |
|
3101 | if ( !$user = $this->login( $username, $password ) ) |
3102 | return $this->error; |
3103 |
|
3104 | do_action( 'xmlrpc_call', 'wp.getPostType' ); |
3105 |
|
3106 | if( ! post_type_exists( $post_type_name ) ) |
3107 | return new IXR_Error( 403, __( 'Invalid post type' ) ); |
3108 |
|
Line | Code |
3136 |
|
3137 | $blog_id = (int) $args[0]; |
3138 | $username = $args[1]; |
3139 | $password = $args[2]; |
3140 | $filter = isset( $args[3] ) ? $args[3] : array( 'public' => true ); |
3141 |
|
3142 | if ( isset( $args[4] ) ) |
3143 | $fields = $args[4]; |
3144 | else |
3145 | $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' ); |
3146 |
|
3147 | if ( ! $user = $this->login( $username, $password ) ) |
3148 | return $this->error; |
3149 |
|
3150 | do_action( 'xmlrpc_call', 'wp.getPostTypes' ); |
3151 |
|
3152 | $post_types = get_post_types( $filter, 'objects' ); |
3153 |
|
3154 | $struct = array(); |