wp_http_ixr_client_headers
Filters the headers collection to be sent to the XML-RPC server.
Description
Parameters (1)
- 0. $args_headers (array)
- Array of headers to be sent.
Usage
- To run the hook, copy the example below.
- $args_headers = apply_filters( 'wp_http_ixr_client_headers', $args_headers );
- if ( !empty( $args_headers ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wp_http_ixr_client_headers callback
- function filter_wp_http_ixr_client_headers( $args_headers ) {
- // make filter magic happen here...
- return $args_headers;
- };
- // add the filter
- add_filter( 'wp_http_ixr_client_headers', 'filter_wp_http_ixr_client_headers', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wp_http_ixr_client_headers', 'filter_wp_http_ixr_client_headers', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/class-wp-http-ixr-client.php
- $args['headers'] = apply_filters( 'wp_http_ixr_client_headers', $args['headers'] );