bbp_filter_sample_permalink( string $post_link, object $_post, bool $leavename = false, bool $sample = false )
Filter sample permalinks so that certain languages display properly.
Description
Parameters
- $post_link
-
(Required) Custom post type permalink
- $_post
-
(Required) Post data object
- $leavename
-
(Optional) defaults to false. Whether to keep post name or page name.
Default value: false
- $sample
-
(Optional) defaults to false. Is it a sample permalink.
Default value: false
Return
(string) The custom post type permalink
Source
File: bp-forums/admin/functions.php
function bbp_filter_sample_permalink( $post_link, $_post, $leavename = false, $sample = false ) { // Bail if not on an admin page and not getting a sample permalink if ( !empty( $sample ) && is_admin() && bbp_is_custom_post_type() ) return urldecode( $post_link ); // Return post link return $post_link; }
Changelog
Version | Description |
---|---|
bbPress (r3336) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.