wp/wp-includes/class-wp-http-requests-hooks.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    43 	/**
    43 	/**
    44 	 * Dispatch a Requests hook to a native WordPress action.
    44 	 * Dispatch a Requests hook to a native WordPress action.
    45 	 *
    45 	 *
    46 	 * @param string $hook       Hook name.
    46 	 * @param string $hook       Hook name.
    47 	 * @param array  $parameters Parameters to pass to callbacks.
    47 	 * @param array  $parameters Parameters to pass to callbacks.
    48 	 * @return boolean True if hooks were run, false if nothing was hooked.
    48 	 * @return bool True if hooks were run, false if nothing was hooked.
    49 	 */
    49 	 */
    50 	public function dispatch( $hook, $parameters = array() ) {
    50 	public function dispatch( $hook, $parameters = array() ) {
    51 		$result = parent::dispatch( $hook, $parameters );
    51 		$result = parent::dispatch( $hook, $parameters );
    52 
    52 
    53 		// Handle back-compat actions.
    53 		// Handle back-compat actions.
    57 				do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );
    57 				do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );
    58 				break;
    58 				break;
    59 		}
    59 		}
    60 
    60 
    61 		/**
    61 		/**
    62 		 * Transforms a native Request hook to a WordPress actions.
    62 		 * Transforms a native Request hook to a WordPress action.
    63 		 *
    63 		 *
    64 		 * This action maps Requests internal hook to a native WordPress action.
    64 		 * This action maps Requests internal hook to a native WordPress action.
    65 		 *
    65 		 *
    66 		 * @see https://github.com/rmccue/Requests/blob/master/docs/hooks.md
    66 		 * @see https://github.com/rmccue/Requests/blob/master/docs/hooks.md
       
    67 		 *
       
    68 		 * @since 4.7.0
    67 		 *
    69 		 *
    68 		 * @param array $parameters Parameters from Requests internal hook.
    70 		 * @param array $parameters Parameters from Requests internal hook.
    69 		 * @param array $request Request data in WP_Http format.
    71 		 * @param array $request Request data in WP_Http format.
    70 		 * @param string $url URL to request.
    72 		 * @param string $url URL to request.
    71 		 */
    73 		 */