trackback_url() WordPress Function

The trackback_url() function in WordPress is used to retrieve the URL of the current trackback. This function can be useful for displaying a link back to the trackback source.

trackback_url( bool $deprecated_echo = true ) #

Displays the current post’s trackback URL.


Parameters

$deprecated_echo

(bool)(Optional)Not used.

Default value: true


Top ↑

Return

(void|string) Should only be used to echo the trackback URL, use get_trackback_url() for the result instead.


Top ↑

Source

File: wp-includes/comment-template.php

function trackback_url( $deprecated_echo = true ) {
	if ( true !== $deprecated_echo ) {
		_deprecated_argument(
			__FUNCTION__,
			'2.5.0',
			sprintf(
				/* translators: %s: get_trackback_url() */
				__( 'Use %s instead if you do not want the value echoed.' ),
				'<code>get_trackback_url()</code>'
			)
		);
	}

	if ( $deprecated_echo ) {
		echo get_trackback_url();
	} else {
		return get_trackback_url();
	}
}


Top ↑

Changelog

Changelog
VersionDescription
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More