get_trackback_url()

最后更新于:2021-11-27 03:05:16

get_trackback_url()

Retrieves the current post’s trackback URL.

响应

(string) The trackback URL after being filtered.

源文件

文件: gc-includes/comment-template.php

function get_trackback_url() {
	if ( get_option( 'permalink_structure' ) ) {
		$tb_url = trailingslashit( get_permalink() ) . user_trailingslashit( 'trackback', 'single_trackback' );
	} else {
		$tb_url = get_option( 'siteurl' ) . '/gc-trackback.php?p=' . get_the_ID();
	}

	/**
	 * Filters the returned trackback URL.
	 *
	 * @since 2.2.0
	 *
	 * @param string $tb_url The trackback URL.
	 */
	return apply_filters( 'trackback_url', $tb_url );
}