rep__get_listing_status()

This function is used to retrieve the listing statuses based on the provided post ID. 

Namespace

REP_Malcolm

Parameters

$post_id

int

Post ID of the listing

Return

array

An array containing listing statuses

Source

File: \includes\rep-helper-functions.php

function rep__get_listing_status( $post_id ){

$states = [];

$search_category = explode( " ", lp__get_field_value( 'search_category', $post_id ) );

$states[] = lp__array_key_value( 1, $search_category );
$state2 = lp__array_key_value( 3, $search_category );

if( $state2 ) $states[] = $state2;

return $states;

}