Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

get_all_image_sizes()

Parameters

ColumnTypeDefaultDescription
$internal false
$restricted false

Location

include/resource_functions.php lines 7045 to 7063

Definition

 
function get_all_image_sizes($internal=false,$restricted=false)
    {
        
# Returns all image sizes available.
        # Standard image sizes are translated using $lang.  Custom image sizes are i18n translated.
        
$condition=($internal)?"":"WHERE internal!=1";
        if(
$restricted){$condition .= ($condition!=""?" AND ":" WHERE ") . " allow_restricted=1";}
        
        
# Executes query.
        
$r sql_query("select * from preview_size " $condition " order by width asc");
    
        
# Translates image sizes in the newly created array.
        
$return = array();
        for (
$n 0;$n<count($r);$n++) {
            
$r[$n]["name"] = lang_or_i18n_get_translated($r[$n]["name"], "imagesize-");
            
$return[] = $r[$n];
        }
        return 
$return;
    
    }

This article was last updated 11th July 2020 00:05 Europe/London time based on the source file dated 10th July 2020 16:06 Europe/London time.