Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

get_header_image()

Parameters

ColumnTypeDefaultDescription
$full false

Location

include/config_functions.php lines 1192 to 1230

Definition

 
function get_header_image($full false)
    {
    global 
$linkedheaderimgsrc$baseurl_short$baseurl$storageurl;

    if(
trim($linkedheaderimgsrc) != "")
        {
        
$header_img_src $linkedheaderimgsrc;
        if(
substr($header_img_src04) !== 'http')
            {
            
// Set via System Config page?
            
if (substr($header_img_src013) == '[storage_url]')
                {
                
// Parse and replace the storage URL
                
$header_img_src str_replace('[storage_url]'$storageurl$header_img_src);
                }
            else
                {
                
// Set via config.php
                // if image source already has the baseurl short, then remove it and add it here
                
if(substr($header_img_src01) === '/')
                    {
                    
$header_img_src substr($header_img_src1);
                    }
                
$header_img_src $baseurl_short $header_img_src;
                }

            if(
$full && substr($header_img_src01) === '/')
                {
                
$header_img_src $baseurl substr($header_img_src1);
                }
            }
        }
    else 
        {
        
$header_img_src $baseurl.'/gfx/titles/title.svg';
        }
        
    return 
$header_img_src;
    }

This article was last updated 5th July 2020 04:35 Europe/London time based on the source file dated 18th May 2020 17:14 Europe/London time.