seo_print
Copy Below Code
View As A Text File
Show Text Only
Show API
Edit Code
if (!function_exists('seo_print')) {
function seo_print($seoArr = array())
{
$metaTags = '';
$noFollowNoIndex = array();
if (isset($seoArr['title']) && $seoArr['title'] != '')
$metaTags .= '<title>' . $seoArr['title'] . '</title>' . "\r\n";
else
$metaTags .= '<title>' . config('Constants.SITE_NAME') . '</title>';
if (isset($seoArr['keywords']) && $seoArr['keywords'] != '')
$metaTags .= '<meta name="keywords" content="' . $seoArr['keywords'] . '">' . "\r\n";
if (isset($seoArr['descp']) && $seoArr['descp'] != '')
$metaTags .= '<meta name="description" content="' . $seoArr['descp'] . '">';
if (isset($seoArr['no_index']) && ($seoArr['no_index'] == '1' || $seoArr['no_index'] == 'yes'))
$noFollowNoIndex[] = 'NOINDEX';
if (isset($seoArr['no_follow']) && ($seoArr['no_follow'] == '1' || $seoArr['no_follow'] == 'yes'))
$noFollowNoIndex[] = 'NOFOLLOW';
if (count($noFollowNoIndex) > 0) {
$metaTags .= '<meta name="ROBOTS" content="' . implode(',', $noFollowNoIndex) . '">';
}
return $metaTags;
}
}