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

get_max_theme_levels()

Description

Return the maximum number of theme category levels (columns) present in the collection table

Parameters

This function accepts no parameters.

Return

integer

Location

include/collections_functions.php lines 1107 to 1121

Definition

 
function get_max_theme_levels(){
    
$sql "show columns from collection like 'theme%'";
    
$results sql_query($sql);
    foreach(
$results as $result) {
        if (
$result['Field'] == 'theme'){
            
$level 1;
        } else {
            
$thislevel substr($result['Field'],5);
            if (
is_numeric($thislevel) && $thislevel $level){
                
$level $thislevel;
            }
        }
    }
    return 
$level;
}

This article was last updated 22nd October 2020 11:35 Europe/London time based on the source file dated 2nd October 2020 15:40 Europe/London time.