Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_default_post_fields

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
1318
1319           $blog_id            = (int) $args[0];
1320           $username           = $args[1];
1321           $password           = $args[2];
1322           $post_id            = (int) $args[3];
1323
1324           if ( isset( $args[4] ) )
1325                $fields = $args[4];
1326           else
1327                $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' );
1328
1329           if ( ! $user = $this->login( $username, $password ) )
1330                return $this->error;
1331
1332           do_action( 'xmlrpc_call', 'wp.getPost' );
1333
1334           $post = wp_get_single_post( $post_id, ARRAY_A );
1335
1336           if ( empty( $post['ID'] ) )
 
Line Code
1375
1376           $blog_id    = (int) $args[0];
1377           $username   = $args[1];
1378           $password   = $args[2];
1379           $filter     = isset( $args[3] ) ? $args[3] : array();
1380
1381           if ( isset( $args[4] ) )
1382                $fields = $args[4];
1383           else
1384                $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' );
1385
1386           if ( ! $user = $this->login( $username, $password ) )
1387                return $this->error;
1388
1389           do_action( 'xmlrpc_call', 'wp.getPosts' );
1390
1391           $query = array();
1392
1393           if ( isset( $filter['post_type'] ) ) {