Skip to content

Instantly share code, notes, and snippets.

@janboddez
Last active May 7, 2022 19:40
Embed
What would you like to do?
<?php
add_action( 'webmention_post_send', function( $response, $source, $target, $post_id ) {
if ( is_wp_error( $response ) ) {
// Something went wrong.
error_log( 'Error trying to send webmention to ' . esc_url_raw( $target ) . ': ' . $response->get_error_message() );
} else {
error_log( 'Sent webmention to ' . esc_url_raw( $target ) . '; response code: ' . wp_remote_retrieve_response_code( $response ) );
}
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment