Last active
May 7, 2022 19:40
-
-
Save janboddez/f1eb69cee357995f311350a07e7defef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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