Changeset 34164
- Timestamp:
- 09/15/2015 02:53:18 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-ixr-client.php
r32546 r34164 65 65 66 66 // Merge Custom headers ala #8145 67 foreach ( $this->headers as $header => $value ) 67 foreach ( $this->headers as $header => $value ) { 68 68 $args['headers'][$header] = $value; 69 } 69 70 70 if ( $this->timeout !== false ) 71 /** 72 * Filter to allow custom headers to be sent 73 * 74 * @since 4.4.0 75 * 76 * @param array $headers Header collection to be sent to the XML-RPC server. 77 */ 78 $args['headers'] = apply_filters( 'wp_http_ixr_client_headers', $args['headers'] ); 79 80 if ( $this->timeout !== false ) { 71 81 $args['timeout'] = $this->timeout; 82 } 72 83 73 84 // Now send the request 74 if ( $this->debug ) 85 if ( $this->debug ) { 75 86 echo '<pre class="ixr_request">' . htmlspecialchars($xml) . "\n</pre>\n\n"; 87 } 76 88 77 89 $response = wp_remote_post($url, $args); … … 89 101 } 90 102 91 if ( $this->debug ) 103 if ( $this->debug ) { 92 104 echo '<pre class="ixr_response">' . htmlspecialchars( wp_remote_retrieve_body( $response ) ) . "\n</pre>\n\n"; 105 } 93 106 94 107 // Now parse what we've got back
Note: See TracChangeset
for help on using the changeset viewer.