Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_prepare_post

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

Line Code
690                $enclosures = (array) get_post_meta( $post['ID'], 'enclosure' );
691                if ( ! empty( $enclosures ) ) {
692                     $encdata = explode( "\n", $enclosures[0] );
693                     $_post['enclosure']['url'] = trim( htmlspecialchars( $encdata[0] ) );
694                     $_post['enclosure']['length'] = (int) trim( $encdata[1] );
695                     $_post['enclosure']['type'] = trim( $encdata[2] );
696                }
697           }
698
699           return apply_filters( 'xmlrpc_prepare_post', $_post, $post, $fields );
700      }
701
702      /**
703       * Prepares post data for return in an XML-RPC object.
704       *
705       * @access protected
706       *
707       * @param object $post_type Post type object
708       * @param array $fields The subset of post fields to return