_audit->data)) {
$this->_error = true;
return;
}
$this->_permalink = (isset($this->_post->url) && $this->_post->url <> '' ? $this->_post->url : $this->_audit->permalink);
if ($this->_permalink <> '') {
global $wpdb;
if ($row = $wpdb->get_row("SELECT COUNT(`ID`) as count FROM " . $wpdb->posts . " WHERE `post_status` = 'publish'")) {
$this->_total_posts = $row->count;
}
if ($row = $wpdb->get_row("SELECT COUNT(`ID`) as count FROM " . $wpdb->posts . " WHERE `post_content` LIKE '%" . $this->_permalink . "%' AND `post_status` = 'publish'")) {
$this->_inner_links = $row->count;
}
if (isset($this->_audit->data->sq_seo_innerlinks->value)) {
$this->_inner_links = max((int)$this->_inner_links, (int)$this->_audit->data->sq_seo_innerlinks->value);
}
SQ_Debug::dump($this->_inner_links, $this->_total_posts);
}
}
public function setTasks($tasks) {
parent::setTasks($tasks);
$this->_tasks[$this->_category] = array(
'innerlinks' => array(
'title' => sprintf(__("Get %s inner links", _SQ_PLUGIN_NAME_), self::INNERS_MINVAL),
'value' => (int)$this->_inner_links. ' ' . __('inner links', _SQ_PLUGIN_NAME_),
'penalty' => 5,
'description' => sprintf(__("Get %s Inner Links %s Recommended is: %s %s Inner Links are links that you send from one URL of your site to another URL of your site. %s Since your Focus Pages are the most important pages in your site, you should make sure that you link to them from many pages of your website. %s Follow the best practices for this. (highlighted in the Best Practices section)", _SQ_PLUGIN_NAME_), self::INNERS_MINVAL, '
', self::INNERS_RECOMMENDED, '
', '
', '
'),
),
);
}
/*********************************************/
public function getHeader() {
$header = '';
if (isset($this->_post->ID)) {
$edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('post.php?post=' . (int)$this->_post->ID . '&action=edit');
if ($this->_post->post_type <> 'profile') {
$edit_link = get_edit_post_link($this->_post->ID, false);
}
$header = '';
$header .= '