Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

get_header_image()

Parameters

ColumnTypeDefaultDescription
$full false

Location

include/config_functions.php lines 1321 to 1359

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-black.svg';
        }
        
    return 
$header_img_src;
    }

This article was last updated 19th March 2024 02:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.