get_trackback_url

The timeline below displays how wordpress function get_trackback_url has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Retrieves the current post's trackback URL.
 *
 * There is a check to see if permalink's have been enabled and if so, will
 * retrieve the pretty path. If permalinks weren't enabled, the ID of the
 * current post is used and appended to the correct page to go to.
 *
 * @since 1.5.0
 *
 * @return string The trackback URL after being filtered.
 */
function get_trackback_url()
{
    if (get_option('permalink_structure')) {
        $trackback_url = trailingslashit(get_permalink()) . user_trailingslashit('trackback', 'single_trackback');
    } else {
        $trackback_url = get_option('siteurl') . '/wp-trackback.php?p=' . get_the_ID();
    }
    /**
     * Filters the returned trackback URL.
     *
     * @since 2.2.0
     *
     * @param string $trackback_url The trackback URL.
     */
    return apply_filters('trackback_url', $trackback_url);
}

WordPress Version: 5.5

/**
 * Retrieves the current post's trackback URL.
 *
 * There is a check to see if permalink's have been enabled and if so, will
 * retrieve the pretty path. If permalinks weren't enabled, the ID of the
 * current post is used and appended to the correct page to go to.
 *
 * @since 1.5.0
 *
 * @return string The trackback URL after being filtered.
 */
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') . '/wp-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);
}

WordPress Version: 5.4

/**
 * Retrieves the current post's trackback URL.
 *
 * There is a check to see if permalink's have been enabled and if so, will
 * retrieve the pretty path. If permalinks weren't enabled, the ID of the
 * current post is used and appended to the correct page to go to.
 *
 * @since 1.5.0
 *
 * @return string The trackback URL after being filtered.
 */
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') . '/wp-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);
}

WordPress Version: 4.6

/**
 * Retrieve The current post's trackback URL.
 *
 * There is a check to see if permalink's have been enabled and if so, will
 * retrieve the pretty path. If permalinks weren't enabled, the ID of the
 * current post is used and appended to the correct page to go to.
 *
 * @since 1.5.0
 *
 * @return string The trackback URL after being filtered.
 */
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') . '/wp-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);
}

WordPress Version: 3.7

/**
 * Retrieve The current post's trackback URL.
 *
 * There is a check to see if permalink's have been enabled and if so, will
 * retrieve the pretty path. If permalinks weren't enabled, the ID of the
 * current post is used and appended to the correct page to go to.
 *
 * @since 1.5.0
 *
 * @return string The trackback URL after being filtered.
 */
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') . '/wp-trackback.php?p=' . get_the_ID();
    }
    /**
     * Filter the returned trackback URL.
     *
     * @since 2.2.0
     *
     * @param string $tb_url The trackback URL.
     */
    return apply_filters('trackback_url', $tb_url);
}