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 Description


Parameters 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


Top ↑

Return Return

(string) The custom post type permalink


Top ↑

Source Source

File: includes/admin/actions.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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.