rep__get_search_filter_page_url( $type, $category = "", $event_type = "" )

This function

is used to retrieve the URL of a search filter page based on the provided search type, listing category, and event type. It is a versatile function that can generate URLs for different types of search filters based on the parameters you provide.

Namespace

REP_Malcolm

Parameters

$type

string

Search type

$category

string

Listing Category

$event_type

string

Listing Event type

Return

string

Search filter url

Source

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

function rep__get_search_filter_page_url( $type, $category = "", $event_type = "", $default = null ){
    
    $type = strtolower( $type );
    $category = strtolower( $category );
    $event_type = strtolower( $event_type );

    $page_url = "";

    if( $event_type ){
        $page_url = rep__get_event_archive_page_url( $event_type );
    } elseif( in_array( $type, REP__Common::LEAD_TYPES ) ){
        $page_url = rep__get_appraisal_page_url( $type ); 
    } elseif( in_array( $type, REP__Common::LISTING_STATES ) || $type == 'default' ) {
        $page_url = rep__get_listing_archive_page_url( $type, $category );
    }

    return $page_url ? $page_url : ( $default === null ? home_url() : $default );
    
}