_audit->data)) {
$this->_error = true;
return;
}
if (isset($this->_audit->data->sq_seo_keywords->value) && $this->_audit->data->sq_seo_keywords->value <> '') {
$this->_keyword = $this->_audit->data->sq_seo_keywords->value;
}
if (isset($this->_audit->data->sq_seo_open_graph->value) && $this->_audit->data->sq_seo_open_graph->value <> '') {
$og = json_decode($this->_audit->data->sq_seo_open_graph->value);
if (isset($og->image)) {
$this->_image = $og->image;
}
} elseif (isset($this->_audit->data->sq_seo_twittercard->value) && $this->_audit->data->sq_seo_twittercard->value <> '') {
$tc = json_decode($this->_audit->data->sq_seo_twittercard->value);
if (isset($tc->image)) {
$this->_image = $tc->image;
}
} elseif ($this->_post->post_content <> '') {
@preg_match_all('/]*src=[\'"]([^\'"]+)[\'"][^>]*>/i', stripslashes($this->_post->post_content), $out);
if (!empty($out)) {
if (is_array($out[1]) && count((array)$out[1]) > 0) {
foreach ($out[1] as $row) {
$this->_image = $row;
break;
}
}
}
}
}
public function setTasks($tasks) {
parent::setTasks($tasks);
$this->_tasks[$this->_category] = array(
'filename' => array(
'title' => __("Keyword in filename", _SQ_PLUGIN_NAME_),
'value' => ($this->_image ? $this->_image : ''),
'penalty' => 5,
'description' => sprintf(__('Your filename for one of the images in this Focus Page should be: %s keyword.jpg %s Download a relevant image from your page. Change the filename. Then re-upload with the SEO filename and add it your page\'s content again. %s It\'s best to keep this at only one filename which contains the main keyword of the page. %s Why? %s Because Google could consider over-optimization if you used it more than once.', _SQ_PLUGIN_NAME_), '
', '
', '
', '
', '
'),
),
);
}
/**
* @param $content
* @param $task
* @return string
*/
public function getHeader() {
$edit_link = '';
$header = '