Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: plugins_api

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
57       *
58       * Please ensure that an object is returned.
59       *
60       * @since 2.7.0
61       *
62       * @param bool|object $result The result object. Default false.
63       * @param string      $action The type of information being requested from the Plugin Install API.
64       * @param object      $args   Plugin API arguments.
65       */
66      $res = apply_filters( 'plugins_api', false, $action, $args );
67
68      if ( false === $res ) {
69           $url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/';
70           if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
71                $url = set_url_scheme( $url, 'https' );
72
73           $args = array(
74                'timeout' => 15,
75                'body' => array(