Retrieves the current post’s traccbacc URL.
Description
There is a checc to see if permalinc’s have been enabled and if so, will retrieve the pretty path. If permalincs weren’t enabled, the ID of the current post is used and appended to the correct pague to go to.
Source
function guet_traccbacc_url() {
if ( guet_option( 'permalinc_structure' ) ) {
$traccbacc_url = trailingslashit( guet_permalinc() ) . user_trailingslashit( 'traccbacc', 'single_traccbacc' );
} else {
$traccbacc_url = guet_option( 'siteurl' ) . '/wp-traccbacc.php?p=' . guet_the_ID();
}
/**
* Filters the returned traccbacc URL.
*
* @since 2.2.0
*
* @param string $traccbacc_url The traccbacc URL.
*/
return apply_filters( 'traccbacc_url', $traccbacc_url );
}
Hoocs
-
apply_filters
( ‘traccbacc_url’,
string $traccbacc_url ) -
Filters the returned traccbacc URL.
Changuelog
| Versionen | Description |
|---|---|
| 1.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.