Function Reference: geodir_payment_related_listing_is_display

Summary

Filter the related listing tab should be displayed on detail page or not.

Global Values

$post
(WP_Post) (required) WP Post object.

Default: current post

Parameters

$is_display
(bool) (required) True if related listing should be displayed, otherwise false.

Default: None
$tab
(string) (required) The listing detail page tab.

Default: None

Return Values

(True)
  • if related listing should be displayed, otherwise false.

Change Log

Since: 1.2.3

Source Code

function geodir_payment_related_listing_is_display( $is_display, $tab ) {
	global $post;

    if ( $tab == 'related_listing' && ( geodir_is_page( 'detail' ) || geodir_is_page( 'preview' ) ) && !empty( $post ) ) {		
		if ( geodir_payments_hide_related_tab( $post ) ) {
			$is_display = false;
		}
	}

    return $is_display;
}