Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

render_help_link()

Description

Generates a help icon that opens the relevant Knowledge Base article in a modal

These links can be disabled by setting $contextual_help_links=false;

Parameters

ColumnTypeDefaultDescription
$page string '' Knowledge Base article to display, leave blank to show the Knowledge Base homepage
$return_string boolean false Set to true to return the html as a single line string, False will cause the function to echo the html

Return

mixed if $return_string=true return is string, else void

Location

include/render_functions.php lines 2936 to 2956

Definition

 
function render_help_link($page='',$return_string=false)
    {
    global 
$contextual_help_links,$pagename,$lang,$help_modal,$baseurl;
    if (
$contextual_help_links === false){return;}

    
// Build html for link into a string
    
$help_link_html  =      '<a ';
    
$help_link_html .=          'href="' $baseurl '/pages/help.php?page=' $page '" ';
    
$help_link_html .=          'title="' $lang["help-tooltip"] . '" ';
    
$help_link_html .=          'class="HelpLink"';
    if (
$help_modal
        { 
$help_link_html .=    'onClick="return ModalLoad(this, true);" ';}
    else
        { 
$help_link_html .=    'target="_blank" ';}
    
$help_link_html .=      '>';
    
$help_link_html .=      '<i aria-hidden="true" class="fa fa-fw fa-question-circle"></i>';
    
$help_link_html .=      '</a>';

    if (
$return_string===false) {echo $help_link_html;return;}
    else {return 
$help_link_html;}
    }

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