_audit->data)) {
$this->_error = true;
return;
}
//check the noindex and nofollow from API
if (isset($this->_audit->data->sq_seo_meta->noindex) && $this->_audit->data->sq_seo_meta->noindex <> '') {
$this->_robots = $this->_audit->data->sq_seo_meta->noindex;
$this->_nofollow = strpos($this->_robots, 'nofollow');
$this->_noindex = strpos($this->_robots, 'noindex');
}
//check if included in sitemap
if (isset($this->_post->sq->do_sitemap)) {
$this->_dositemap = $this->_post->sq->do_sitemap;
}
//get the canonical from audit
if (isset($this->_audit->data->sq_seo_meta->canonical) && $this->_audit->data->sq_seo_meta->canonical <> '') {
$this->_canonical = $this->_audit->data->sq_seo_meta->canonical;
}
//get the local permalink
$this->_permalink = (isset($this->_post->url) && $this->_post->url <> '' ? $this->_post->url : $this->_audit->permalink);
}
public function setTasks($tasks) {
parent::setTasks($tasks);
$this->_tasks[$this->_category] = array(
'noindex' => array(
'title' => __("Yes, do index", _SQ_PLUGIN_NAME_),
'penalty' => 100,
'value' => $this->_robots,
'description' => sprintf(__("To turn this task to green, go and look at all the places where you could have added instructions for Google not to index this page from your site. %s Make sure that there is no such instruction added to WordPress -> Settings, or in a theme, or in a plugin, or in Squirrly SEO's Snippet for this page. Also, make sure you don't block this page in your robots.txt file. %s Sometimes, you will want certain pages from your site not to be indexed. Now is not the case, however. %s If this task turns green, then it means that you did not specify to Google that it should NOT index the page. %s Therefore, you allow Google to index the page. %s Since this is a Focus Page, you must allow Google to index it, in order for it to appear in search result pages.", _SQ_PLUGIN_NAME_), '
', '
', '
', '
', '
'),
),
'nofollow' => array(
'title' => __("Yes, do follow", _SQ_PLUGIN_NAME_),
'penalty' => 20,
'value' => $this->_robots,
'description' => sprintf(__("To turn this task to green, make sure that you do NOT have a no-follow attribute for this Focus Page. %s This task gets verified from multiple sources. %s However, if you want to be 100%% certain in the future that everything is perfect, use just Squirrly SEO, because it will ease both your setup and the system check. %s With Squirrly SEO, you could easily check this setting in the Snippet section. %s Many themes and plugins could interfere with settings.", _SQ_PLUGIN_NAME_), '
', '
', '
', '
'),
),
'sitemap' => array(
'title' => __("Present in sitemap", _SQ_PLUGIN_NAME_),
'description' => sprintf(__("Checks whether or not your page is available in your XML Sitemap. %s Use the Sitemap from WordPress -> Squirrly -> SEO Settings %s Make sure this Focus Page is included in the sitemap generated by Squirrly SEO. %s In the best practices section you can find ideas for why it can make sense to remove pages from your sitemap.", _SQ_PLUGIN_NAME_), '
', '
', '
'),
),
'gscindex' => array(
'title' => __("Manual index request", _SQ_PLUGIN_NAME_),
'description' => sprintf(__("Click the button to ask Google to re-index this page. %s Disclaimer: This task will automatically turn to green once you click on the button and it takes you to Google Search Console. It's up to you to make 100%% sure that you do tell Google to either index or re-index this page. %s Perform a manual request for Google to re-index this page. %s This is super important to do whenever you make important changes to your pages. Otherwise, Google will still have the old version of your page. %s If Google keeps having the older version, then it doesn't matter if you've improved the page. %s When you click the Ask Google to Re-Index button, Squirrly will use the Google Search Console API to send Google the request on your behalf.", _SQ_PLUGIN_NAME_), '
', '
', '
', '
', '
'),
),
'canonical' => array(
'title' => __("Canonical link", _SQ_PLUGIN_NAME_),
'value' => ($this->_canonical ? $this->_canonical : $this->_permalink),
'penalty' => 20,
'description' => sprintf(__("This page should have a canonical link to itself, indicating that it is indeed the original content. %s You can not have pages with canonical links to other sites and pages, because you could not rank for them. Why? Because a canonical link to another URL would mean that the other URL is the one worth indexing. (the original one) %s To turn this task to green, go and make sure that this page does not have a canonical link attribute pointing to another page. %s You can easily control this is in the future by using the Snippet feature of Squirrly SEO.", _SQ_PLUGIN_NAME_), '
', '
', '
'),
),
'permalink' => array(
'title' => __("Permalink structure is good", _SQ_PLUGIN_NAME_),
'value' => ($this->_canonical ? $this->_canonical : $this->_permalink),
'description' => sprintf(__("Make your LINKS SEO-Friendly. %s WordPress -> Settings %s That is where WordPress allows you to change the permalink structure. %s Your URLs (the links from your site) should be super easy to read. This makes your site Human-friendly as well.", _SQ_PLUGIN_NAME_), '
', '
', '
'),
),
);
}
/*********************************************/
public function getHeader() {
SQ_Debug::dump($this->_post);
if (!$this->_audit->sq_analytics_gsc_connected && !$this->_audit->sq_analytics_google_connected) {
return '