Function Reference: geodir_payments_action_details_post_tags


Filter the post tags.


Allows you to filter the post tags output on the details page of a post.

Global Values

(object) (required) The current post object.

Default: None


(string) (required) A comma seperated list of tags.

Default: None
(int) (required) The current post id.

Default: None

Change Log

Since: 1.0.0

Source Code

function geodir_payments_action_details_post_tags($post_tags, $post_id) {
	global $post;
	$package_info = geodir_post_package_info(array(), $post);
	$tag_limit_enabled = geodir_payments_tag_limit_enabled($package_info);
	$tag_limit = geodir_payments_get_tag_limit($package_info);
	if (!empty($post) && is_object($post) && ((!empty($post_id) && isset($post->ID) && $post->ID==$post_id) || isset($post->preview))&& isset($post->post_tags) && $tag_limit_enabled) {
		$post_tags = $post->post_tags;
		$post_tags = geodir_pm_substr($post_tags, (int)$tag_limit);
		$post->post_tags = $post_tags;
	return $post_tags;