I’m trying to disable all functionality related to pingbacks/trackbacks in WordPress and so far I have this:
add_action( 'pre_ping', 'disable_pingback' );
function disable_pingback( &$links ) {
foreach ( $links as $l => $link ) {
if ( 0 === strpos( $link, get_option( 'home' ) ) ) {
unset( $links[ $l ] );
}
}
}
However when I open up the page options and enable discussion, I still see this:
I found this answer (method 2), but it is over 5 years old now and I wasn’t sure if totally replacing the whole section was the best way to do things compatibility wise, so I am asking again…
Is there a cleaner way to accomplish this?