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
1386
1387           $blog_id            = (int) $args[0];
1388           $username           = $args[1];
1389           $password           = $args[2];
1390           $post_id            = (int) $args[3];
1391
1392           if ( isset( $args[4] ) )
1393                $fields = $args[4];
1394           else
1395                $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' );
1396
1397           if ( ! $user = $this->login( $username, $password ) )
1398                return $this->error;
1399
1400           do_action( 'xmlrpc_call', 'wp.getPost' );
1401
1402           $post = get_post( $post_id, ARRAY_A );
1403
1404           if ( empty( $post['ID'] ) )
 
Line Code
1442
1443           $blog_id    = (int) $args[0];
1444           $username   = $args[1];
1445           $password   = $args[2];
1446           $filter     = isset( $args[3] ) ? $args[3] : array();
1447
1448           if ( isset( $args[4] ) )
1449                $fields = $args[4];
1450           else
1451                $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' );
1452
1453           if ( ! $user = $this->login( $username, $password ) )
1454                return $this->error;
1455
1456           do_action( 'xmlrpc_call', 'wp.getPosts' );
1457
1458           $query = array();
1459
1460           if ( isset( $filter['post_type'] ) ) {