rep__get_listing_status_html()

This function is used to generate HTML representation for listing statuses based on the provided post ID.

Namespace

REP_Malcolm

Parameters

$post_id

int

Post ID of the listing

Return

string

Listing statuses.

Source

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

function rep__get_listing_status_html( $post_id ){

    $states = rep__get_listing_status( $post_id );

    ob_start(); 

        if( is_array( $states ) ) {
            foreach( $states as $state ) : ?>
        
                <div class="rep-property-status <?=strtolower($state)?>"><?=ucwords($state)?></div><?php
            
            endforeach;
        } 

    return ob_get_clean();

}