Skip to content

Commit

Permalink
Added compability with SEOPro of Sterc
Browse files Browse the repository at this point in the history
  • Loading branch information
ershov-ilya committed Dec 25, 2013
1 parent 6b9e22c commit 7aba5f9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions core/components/metatager/elements/snippets/metatager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
/**
* Project: MetaTager
* File: metatager.php
* Date: 12.11.13, time: 13:16
* Author: ILYA ERSHOV
* http://about.me/ershov.ilya
* GitHub: https://github.com/ershov-ilya
* Date: 25.12.13, time: 19:22
* Author: MrAgr3ssive
* GitHub: http://github.com/MrAgr3ssive
* Edited in PhpStorm.
*/

Expand Down Expand Up @@ -57,6 +56,13 @@
// Keywords
if(!empty($config['keywords'])) $arr['keywords'] = $config['keywords'];
else $arr['keywords'] = $resource->getTVValue($config['kwTVname']);
// SEOPro compability
$seoPro = $modx->getService('seopro','seoPro',$modx->getOption('seopro.core_path',null,$modx->getOption('core_path').'components/seopro/').'model/seopro/',$config);
$seoKeywords = $modx->getObject('seoKeywords', array('resource' => $config['id']));
if($seoKeywords){
$arr['keywords'] = $seoKeywords->get('keywords');
}

// TVs
$arr['specific_title'] = $resource->getTVValue($config['spec_titleTVname']);

Expand Down Expand Up @@ -99,4 +105,4 @@
if(empty($description)) $description = $title;
$output.='<meta name="description" content="'.$description.'"/>'."\n";

if($config['debug']==0) return $output;
if($config['debug']==0) print $output;

0 comments on commit 7aba5f9

Please sign in to comment.