get_trackback_url
函数
get_trackback_url ( No parameters )
- 返回值
-
- (string) The trackback URL after being filtered.
- 定义位置
-
-
wp-includes/comment-template.php
, line 1147
-
wp-includes/comment-template.php
- 引入
- 1.5.0
- 弃用
- –
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.
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 ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。