Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

display_size_option()

Description

display_size_option

Parameters

ColumnTypeDefaultDescription
$sizeID mixed
$sizeName mixed
$fordropdown mixed true

Return

void

Location

include/render_functions.php lines 4104 to 4144

Definition

 
function display_size_option($sizeID$sizeName$fordropdown=true)
    {
    global 
$available_sizes$lang$result;
    if(!
hook('replace_display_size_option','',array($sizeID$sizeName$fordropdown))){
        if (
$fordropdown)
            {
            
?><option value=" echo htmlspecialchars($sizeID?>">
            
echo $sizeName;
            }
        if(isset(
$available_sizes[$sizeID]))
            {
            
$availableCount count($available_sizes[$sizeID]);
            }
        else
            {
            
$availableCount=0;
            }
        
$resultCount count($result);
        if (
$availableCount != $resultCount && $sizeID != "largest")
            {
            echo 
" (" $availableCount " " $lang["of"] . " " $resultCount " ";
            switch (
$availableCount)
                {
                case 
0:
                    echo 
$lang["are_available-0"];
                    break;
                case 
1:
                    echo 
$lang["are_available-1"];
                    break;
                default:
                    echo 
$lang["are_available-2"];
                    break;
                }
            echo 
")";
            }
             if (
$fordropdown)
                {
            
?></option>
            
}
        }
    }

This article was last updated 27th November 2020 18:05 Europe/London time based on the source file dated 13th November 2020 15:00 Europe/London time.