GetThemesFromRequest()

Description

Get a themes array

Parameters

ColumnTypeDefaultDescription
$levels int Number of levels to parse from request

Return

array Array containing names of themes matching the syntax used in the collection table i.e. theme, theme2, theme3

Location

include/collections_functions.php lines 4335 to 4351

Definition

 
function GetThemesFromRequest($levels)
{
    
$themes = array();
    for (
$n 0$n <= $levels$n++) {
        
$themeindex = ($n == "" $n);
        
$themename getval("theme$themeindex""");
        if (
$themename != "") {
            
$themes[] = $themename;
        }
        
// Legacy inconsistency when naming themes params. Sometimes the root theme was also named theme1. We check if theme
        // is found, but if not, we just go to theme1 rather than break.
        
elseif (!($themeindex == && $themename == "")) {
            break;
        }
    }
    return 
$themes;
}

This article was last updated 8th June 2025 07:35 Europe/London time based on the source file dated 3rd June 2025 16:40 Europe/London time.