Skip to content

Instantly share code, notes, and snippets.

@janboddez
Last active May 7, 2022 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janboddez/f1eb69cee357995f311350a07e7defef to your computer and use it in GitHub Desktop.
Save janboddez/f1eb69cee357995f311350a07e7defef to your computer and use it in GitHub Desktop.
<?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