X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=b61e863c5c92b49555f5040b6d994438084ab582;hp=62aa009248af7c6c1c1b9d9140043c9aeb2ff6be;hb=8b4478db59f4631cae077d87cc40aa8a56bfba0c;hpb=ccf34a2a92d80d01debd84b4b6e1f294d8f90cce diff --git a/inc/functions.php b/inc/functions.php index 62aa009248..b61e863c5c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3947,7 +3947,7 @@ function loadHtmlHeader () { // Add meta description to header if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { // Add meta description not in admin and login module and when the script is installed - generateMetaDescriptionCode(getModule(), getWhat()); + generateMetaDescriptionCode(); } // END - if } // END - if @@ -3967,6 +3967,21 @@ function addPageHeaderFooter () { $GLOBALS['output'] = $GLOBALS['page_header'] . $GLOBALS['output'] . $GLOBALS['page_footer']; } +// Generates meta description for current module and 'what' value +function generateMetaDescriptionCode () { + // Only include from guest area + if (getModule() == 'index') { + // Construct dynamic description + $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', getWhat()); + + // Output it directly + $GLOBALS['page_header'] .= ''; + } // END - if + + // Remove depth + unset($GLOBALS['ref_level']); +} + ////////////////////////////////////////////////// // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS // //////////////////////////////////////////////////