Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: akismet_ua

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
775       *
776       * @param string $request The body of the request.
777       * @param string $path The path for the request.
778       * @param string $ip The specific IP address to hit.
779       * @return array A two-member array consisting of the headers and the response body, both empty in the case of a failure.
780       */
781      public static function http_post( $request, $path, $ip=null ) {
782
783           $akismet_ua = sprintf( 'WordPress/%s | Akismet/%s', $GLOBALS['wp_version'], constant( 'AKISMET_VERSION' ) );
784           $akismet_ua = apply_filters( 'akismet_ua', $akismet_ua );
785
786           $content_length = strlen( $request );
787
788           $api_key   = self::get_api_key();
789           $host      = self::API_HOST;
790
791           if ( !empty( $api_key ) )
792                $host = $api_key.'.'.$host;
793