SEO SQUIRRLY™ - Version 11.0.01

Version Description

  • 01/19/2021 =
  • Update - Compatibility with PHP 8
  • Update - Verify the local SEO Snippet in Focus Pages
  • Update - Show all the optimimzed keywords for a Focus Page
  • Update - Change the minimum optimization score for the main keyword to 75% in the Focus Page
  • Fix - Fixed small style bugs in the Focus Pages
  • Fix - Label edit and delete on secondary pages
Download this release

Release Info

Developer cifi
Plugin Icon 128x128 SEO SQUIRRLY™
Version 11.0.01
Comparing to
See all releases

Code changes from version 10.2.05 to 11.0.01

classes/helpers/Tools.php CHANGED
@@ -152,7 +152,6 @@ class SQ_Classes_Helpers_Tools {
152
  'sq_sla_frontend' => 1,
153
  'sq_sla_type' => 'auto',
154
  'sq_sla_exclude_post_types' => array(),
155
- 'sq_keyword_information' => 0,
156
  'sq_keyword_help' => 1,
157
  'sq_local_images' => 1,
158
  'sq_img_licence' => 1,
152
  'sq_sla_frontend' => 1,
153
  'sq_sla_type' => 'auto',
154
  'sq_sla_exclude_post_types' => array(),
 
155
  'sq_keyword_help' => 1,
156
  'sq_local_images' => 1,
157
  'sq_img_licence' => 1,
models/bulkseo/Twittercard.php CHANGED
@@ -43,8 +43,8 @@ class SQ_Models_Bulkseo_Twittercard extends SQ_Models_Abstract_Assistant {
43
  $this->_pattern = true;
44
  }
45
 
46
- $this->_tw_title = ($this->_post->sq->tw_title <> '' ? $this->_post->sq->tw_title : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->title, 10, $this->_post->sq->tw_title_maxlength));
47
- $this->_tw_description = ($this->_post->sq->tw_description <> '' ? $this->_post->sq->tw_description : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->description, 10, $this->_post->sq->tw_description_maxlength));
48
 
49
  if (function_exists('mb_strlen')) {
50
  $this->_title_length = mb_strlen(html_entity_decode(utf8_decode($this->_tw_title), ENT_QUOTES));
43
  $this->_pattern = true;
44
  }
45
 
46
+ $this->_tw_title = ($this->_post->sq->tw_title <> '' ? $this->_post->sq->tw_title : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->title, self::TITLE_MINLENGTH, $this->_post->sq->tw_title_maxlength));
47
+ $this->_tw_description = ($this->_post->sq->tw_description <> '' ? $this->_post->sq->tw_description : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->description, self::DESCRIPTION_MINLENGTH, $this->_post->sq->tw_description_maxlength));
48
 
49
  if (function_exists('mb_strlen')) {
50
  $this->_title_length = mb_strlen(html_entity_decode(utf8_decode($this->_tw_title), ENT_QUOTES));
models/focuspages/Clicks.php CHANGED
@@ -61,7 +61,16 @@ class SQ_Models_Focuspages_Clicks extends SQ_Models_Abstract_Assistant {
61
  if (!$this->_audit->sq_analytics_gsc_connected) {
62
  $header .= '<a href="' . SQ_Classes_RemoteController::getApiLink('gscoauth') . '" target="_blank" class="btn btn-success text-white col-sm-10 offset-1 mt-3">' . esc_html__("Connect Google Search", _SQ_PLUGIN_NAME_) . '</a>';
63
  } elseif ($this->_keyword) {
64
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong> </div>';
 
 
 
 
 
 
 
 
 
65
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research', array('keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword))). '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
66
 
67
  } else {
61
  if (!$this->_audit->sq_analytics_gsc_connected) {
62
  $header .= '<a href="' . SQ_Classes_RemoteController::getApiLink('gscoauth') . '" target="_blank" class="btn btn-success text-white col-sm-10 offset-1 mt-3">' . esc_html__("Connect Google Search", _SQ_PLUGIN_NAME_) . '</a>';
63
  } elseif ($this->_keyword) {
64
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
65
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
66
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
67
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
68
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
69
+ }
70
+ $header .= '</table></div>';
71
+ }else {
72
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
73
+ }
74
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research', array('keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword))). '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
75
 
76
  } else {
models/focuspages/Content.php CHANGED
@@ -8,7 +8,7 @@ class SQ_Models_Focuspages_Content extends SQ_Models_Abstract_Assistant {
8
  protected $_optimization = false;
9
  protected $_modified = false;
10
 
11
- const OPTIMIZATION_MINVAL = 100;
12
  const UPDATEDAT_MAXVAL = 3;
13
 
14
  public function init() {
@@ -45,11 +45,11 @@ class SQ_Models_Focuspages_Content extends SQ_Models_Abstract_Assistant {
45
  'optimization' => array(
46
  'title' => sprintf(esc_html__("Optimize to %s", _SQ_PLUGIN_NAME_), self::OPTIMIZATION_MINVAL . '%'),
47
  'value' => (int)$this->_optimization . '%',
48
- 'description' => sprintf(esc_html__("Make sure this Focus Page is optimized to 100%% using the %sSquirrly SEO Live Assistant%s. %s As you can see clearly on Google search result pages, Googles tries to find the closest match (inside web content) to what the user searched for. %s That is why using this method of optimizing a page as outlined by the Live Assistant feature is mandatory. %s Don't worry about over-optimizing anything, as the Live Assistant checks for many over-optimization traps you may fall into.", _SQ_PLUGIN_NAME_), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_assistant') . '" target="_blank">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
49
  ),
50
  'snippet' => array(
51
  'title' => esc_html__("Snippet is green", _SQ_PLUGIN_NAME_),
52
- 'description' => sprintf(esc_html__("The tasks inside the %sSnippet section%s of the Focus Pages feature must all be turned green. %s Why? %s If the Snippet elements are Not green, then your Focus Page is not 100%% optimized. %s We've built this SEO Content section especially because we wanted to help you understand that there's a lot more to On-Page SEO than just a content analysis, or a snippet. You need all these elements working together in order to achieve high rankings.", _SQ_PLUGIN_NAME_), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo', array('sid=' . (isset($this->_post->ID) ? $this->_post->ID : ''), 'stype=' . (isset($this->_post->post_type) ? $this->_post->post_type : ''))) . '" target="_blank">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
53
  ),
54
  'onpageseo' => array(
55
  'title' => esc_html__("Platform SEO is green", _SQ_PLUGIN_NAME_),
@@ -76,20 +76,39 @@ class SQ_Models_Focuspages_Content extends SQ_Models_Abstract_Assistant {
76
  $header .= '<a href="' . $this->_post->url . '" target="_blank" style="word-break: break-word;">' . urldecode($this->_post->url) . '</a>';
77
  $header .= '</li>';
78
 
79
- $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('/post-new.php');
80
- if (isset($this->_post->ID)) {
81
- $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('post.php?post=' . (int)$this->_post->ID . '&action=edit');
82
- if ($this->_post->post_type <> 'profile') {
83
- $edit_link = get_edit_post_link($this->_post->ID, false);
84
- }
85
- }
86
  $header .= '<li class="completed">';
87
  if ($this->_keyword) {
88
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  if ((int)$this->_post->ID > 0) {
90
- $header .= '<button class="sq_research_selectit btn btn-success text-white col-sm-8 offset-2 my-2" data-post="' . $edit_link . '" data-keyword="' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword) . '">' . esc_html__("Optimize for this", _SQ_PLUGIN_NAME_) . '</a>';
91
  }
92
  } else {
 
 
 
 
 
 
 
 
93
  $header .= '<div class="font-weight-bold text-warning m-0 text-center">' . esc_html__("No Keyword Found", _SQ_PLUGIN_NAME_) . '</div>';
94
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research') . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
95
 
8
  protected $_optimization = false;
9
  protected $_modified = false;
10
 
11
+ const OPTIMIZATION_MINVAL = 75;
12
  const UPDATEDAT_MAXVAL = 3;
13
 
14
  public function init() {
45
  'optimization' => array(
46
  'title' => sprintf(esc_html__("Optimize to %s", _SQ_PLUGIN_NAME_), self::OPTIMIZATION_MINVAL . '%'),
47
  'value' => (int)$this->_optimization . '%',
48
+ 'description' => sprintf(esc_html__("Make sure this Focus Page is optimized to 100%% using the %sSquirrly SEO Live Assistant%s. %s As you can see clearly on Google search result pages, Googles tries to find the closest match (inside web content) to what the user searched for. %s That is why using this method of optimizing a page as outlined by the Live Assistant feature is mandatory. %s Don't worry about over-optimizing anything, as the Live Assistant checks for many over-optimization traps you may fall into.", _SQ_PLUGIN_NAME_), '<div href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_assistant') . '" target="_blank">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
49
  ),
50
  'snippet' => array(
51
  'title' => esc_html__("Snippet is green", _SQ_PLUGIN_NAME_),
52
+ 'description' => sprintf(esc_html__("The tasks inside the %sSnippet%s section of the Focus Pages feature must all be turned green. %s Why? %s If the Snippet elements are Not green, then your Focus Page is not 100%% optimized. %s We've built this SEO Content section especially because we wanted to help you understand that there's a lot more to On-Page SEO than just a content analysis, or a snippet. You need all these elements working together in order to achieve high rankings.", _SQ_PLUGIN_NAME_), '<strong style="color: darkred;">', '</strong>', '<br /><br />', '<br /><br />', '<br /><br />'),
53
  ),
54
  'onpageseo' => array(
55
  'title' => esc_html__("Platform SEO is green", _SQ_PLUGIN_NAME_),
76
  $header .= '<a href="' . $this->_post->url . '" target="_blank" style="word-break: break-word;">' . urldecode($this->_post->url) . '</a>';
77
  $header .= '</li>';
78
 
79
+
 
 
 
 
 
 
80
  $header .= '<li class="completed">';
81
  if ($this->_keyword) {
82
+ $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('/post-new.php?keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword, 'url'));
83
+ if (isset($this->_post->ID)) {
84
+ $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('post.php?post=' . (int)$this->_post->ID . '&keyword='.SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword, 'url').'&action=edit');
85
+ if ($this->_post->post_type <> 'profile') {
86
+ $edit_link = get_edit_post_link($this->_post->ID, false) . '&keyword='.SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword, 'url');
87
+ }
88
+ }
89
+
90
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
91
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
92
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
93
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
94
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
95
+ }
96
+ $header .= '</table></div>';
97
+ }else {
98
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
99
+ }
100
  if ((int)$this->_post->ID > 0) {
101
+ $header .= '<a href="'.$edit_link.'" target="_blank" class="sq_research_selectit btn btn-success text-white col-sm-8 offset-2 my-2" data-keyword="' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword) . '">' . esc_html__("Optimize for this", _SQ_PLUGIN_NAME_) . '</a>';
102
  }
103
  } else {
104
+ $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('/post-new.php');
105
+ if (isset($this->_post->ID)) {
106
+ $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('post.php?post=' . (int)$this->_post->ID . '&action=edit');
107
+ if ($this->_post->post_type <> 'profile') {
108
+ $edit_link = get_edit_post_link($this->_post->ID, false);
109
+ }
110
+ }
111
+
112
  $header .= '<div class="font-weight-bold text-warning m-0 text-center">' . esc_html__("No Keyword Found", _SQ_PLUGIN_NAME_) . '</div>';
113
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research') . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
114
 
models/focuspages/Ctr.php CHANGED
@@ -61,7 +61,16 @@ class SQ_Models_Focuspages_Ctr extends SQ_Models_Abstract_Assistant {
61
  if (!$this->_audit->sq_analytics_gsc_connected) {
62
  $header .= '<a href="' . SQ_Classes_RemoteController::getApiLink('gscoauth') . '" target="_blank" class="btn btn-success text-white col-sm-10 offset-1 mt-3">' . esc_html__("Connect Google Search", _SQ_PLUGIN_NAME_) . '</a>';
63
  } elseif ($this->_keyword) {
64
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong> </div>';
 
 
 
 
 
 
 
 
 
65
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research', array('keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword))) . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
66
 
67
  } else {
61
  if (!$this->_audit->sq_analytics_gsc_connected) {
62
  $header .= '<a href="' . SQ_Classes_RemoteController::getApiLink('gscoauth') . '" target="_blank" class="btn btn-success text-white col-sm-10 offset-1 mt-3">' . esc_html__("Connect Google Search", _SQ_PLUGIN_NAME_) . '</a>';
63
  } elseif ($this->_keyword) {
64
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
65
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
66
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
67
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
68
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
69
+ }
70
+ $header .= '</table></div>';
71
+ }else {
72
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
73
+ }
74
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research', array('keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword))) . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
75
 
76
  } else {
models/focuspages/Image.php CHANGED
@@ -93,7 +93,16 @@ class SQ_Models_Focuspages_Image extends SQ_Models_Abstract_Assistant {
93
 
94
  $header .= '<li class="completed">';
95
  if ($this->_keyword) {
96
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword) . '</strong></div>';
 
 
 
 
 
 
 
 
 
97
  if (isset($this->_post->ID)) {
98
  if (isset($this->_post->ID)) {
99
  $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo', array('sid=' . $this->_post->ID, 'stype=' . $this->_post->post_type));
93
 
94
  $header .= '<li class="completed">';
95
  if ($this->_keyword) {
96
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
97
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
98
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
99
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
100
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
101
+ }
102
+ $header .= '</table></div>';
103
+ }else {
104
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
105
+ }
106
  if (isset($this->_post->ID)) {
107
  if (isset($this->_post->ID)) {
108
  $edit_link = SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo', array('sid=' . $this->_post->ID, 'stype=' . $this->_post->post_type));
models/focuspages/Impressions.php CHANGED
@@ -61,7 +61,16 @@ class SQ_Models_Focuspages_Impressions extends SQ_Models_Abstract_Assistant {
61
  if (!$this->_audit->sq_analytics_gsc_connected) {
62
  $header .= '<a href="' . SQ_Classes_RemoteController::getApiLink('gscoauth') . '" target="_blank" class="btn btn-success text-white col-sm-10 offset-1 mt-3">' . esc_html__("Connect Google Search", _SQ_PLUGIN_NAME_) . '</a>';
63
  } elseif ($this->_keyword) {
64
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong> </div>';
 
 
 
 
 
 
 
 
 
65
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research', array('keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword))) . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
66
 
67
  } else {
61
  if (!$this->_audit->sq_analytics_gsc_connected) {
62
  $header .= '<a href="' . SQ_Classes_RemoteController::getApiLink('gscoauth') . '" target="_blank" class="btn btn-success text-white col-sm-10 offset-1 mt-3">' . esc_html__("Connect Google Search", _SQ_PLUGIN_NAME_) . '</a>';
63
  } elseif ($this->_keyword) {
64
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
65
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
66
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
67
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
68
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
69
+ }
70
+ $header .= '</table></div>';
71
+ }else {
72
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
73
+ }
74
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'research', array('keyword=' . SQ_Classes_Helpers_Sanitize::escapeKeyword($this->_keyword))) . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
75
 
76
  } else {
models/focuspages/Keyword.php CHANGED
@@ -94,10 +94,28 @@ class SQ_Models_Focuspages_Keyword extends SQ_Models_Abstract_Assistant {
94
  }
95
 
96
  if ($this->_competition && $this->_trend) {
97
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong></div>';
 
 
 
 
 
 
 
 
 
98
  $header .= '<a href="' . $research_link . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3" >' . esc_html__("Find Better Keywords", _SQ_PLUGIN_NAME_) . '</a>';
99
  } else {
100
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong></div>';
 
 
 
 
 
 
 
 
 
101
  $header .= '<a href="' . $research_link . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
102
  }
103
 
94
  }
95
 
96
  if ($this->_competition && $this->_trend) {
97
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
98
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
99
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
100
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
101
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
102
+ }
103
+ $header .= '</table></div>';
104
+ }else {
105
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
106
+ }
107
  $header .= '<a href="' . $research_link . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3" >' . esc_html__("Find Better Keywords", _SQ_PLUGIN_NAME_) . '</a>';
108
  } else {
109
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
110
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
111
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
112
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
113
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
114
+ }
115
+ $header .= '</table></div>';
116
+ }else {
117
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
118
+ }
119
  $header .= '<a href="' . $research_link . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Do a research", _SQ_PLUGIN_NAME_) . '</a>';
120
  }
121
 
models/focuspages/Snippet.php CHANGED
@@ -14,6 +14,9 @@ class SQ_Models_Focuspages_Snippet extends SQ_Models_Abstract_Assistant {
14
  protected $_json = false;
15
  protected $_customized = false;
16
 
 
 
 
17
  public function init() {
18
  parent::init();
19
 
@@ -26,13 +29,41 @@ class SQ_Models_Focuspages_Snippet extends SQ_Models_Abstract_Assistant {
26
  $this->_keyword = $this->_audit->data->sq_seo_keywords->value;
27
  }
28
 
29
- if (isset($this->_audit->data->sq_seo_open_graph->value) && $this->_audit->data->sq_seo_open_graph->value <> '') {
30
- $this->_open_graph = json_decode($this->_audit->data->sq_seo_open_graph->value);
 
 
 
 
 
 
31
  }
32
 
33
- if (isset($this->_audit->data->sq_seo_twittercard->value) && $this->_audit->data->sq_seo_twittercard->value <> '') {
34
- $this->_twitter_card = json_decode($this->_audit->data->sq_seo_twittercard->value);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
 
 
 
 
 
 
 
 
36
 
37
  if (isset($this->_audit->data->sq_seo_jsonld->value) && $this->_audit->data->sq_seo_jsonld->value <> '') {
38
  $this->_json = json_decode($this->_audit->data->sq_seo_jsonld->value, true);
@@ -148,7 +179,16 @@ class SQ_Models_Focuspages_Snippet extends SQ_Models_Abstract_Assistant {
148
 
149
  $header .= '<li class="completed">';
150
  if ($this->_keyword) {
151
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong></div>';
 
 
 
 
 
 
 
 
 
152
  } else {
153
  $header .= '<div class="font-weight-bold text-warning m-0 text-center">' . esc_html__("No Keyword Found", _SQ_PLUGIN_NAME_) . '</div>';
154
  }
14
  protected $_json = false;
15
  protected $_customized = false;
16
 
17
+ const TITLE_MINLENGTH = 10;
18
+ const DESCRIPTION_MINLENGTH = 10;
19
+
20
  public function init() {
21
  parent::init();
22
 
29
  $this->_keyword = $this->_audit->data->sq_seo_keywords->value;
30
  }
31
 
32
+ if ($this->_post->sq->og_media == '') {
33
+ $images = SQ_Classes_ObjController::getNewClass('SQ_Models_Services_OpenGraph')->getPostImages();
34
+ if (!empty($images)) {
35
+ $image = current($images);
36
+ if (isset($image['src'])) {
37
+ $this->_post->sq->og_media = $image['src'];
38
+ }
39
+ }
40
  }
41
 
42
+ $this->_open_graph = json_decode(json_encode(
43
+ array(
44
+ 'title' => ($this->_post->sq->og_title <> '' ? $this->_post->sq->og_title : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->title, self::TITLE_MINLENGTH, $this->_post->sq->og_title_maxlength)),
45
+ 'description' => ($this->_post->sq->og_description <> '' ? $this->_post->sq->og_description : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->description, self::DESCRIPTION_MINLENGTH, $this->_post->sq->og_description_maxlength)),
46
+ 'image' => $this->_post->sq->og_media,
47
+ )
48
+ ));
49
+
50
+ if ($this->_post->sq->tw_media == '') {
51
+ $images = SQ_Classes_ObjController::getNewClass('SQ_Models_Services_OpenGraph')->getPostImages();
52
+ if (!empty($images)) {
53
+ $image = current($images);
54
+ if (isset($image['src'])) {
55
+ $this->_post->sq->tw_media = $image['src'];
56
+ }
57
+ }
58
  }
59
+ $this->_twitter_card = json_decode(json_encode(
60
+ array(
61
+ 'title' => ($this->_post->sq->tw_title <> '' ? $this->_post->sq->tw_title : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->title, self::TITLE_MINLENGTH, $this->_post->sq->tw_title_maxlength)),
62
+ 'description' => ($this->_post->sq->tw_description <> '' ? $this->_post->sq->tw_description : SQ_Classes_Helpers_Sanitize::truncate($this->_post->sq->description, self::DESCRIPTION_MINLENGTH, $this->_post->sq->tw_description_maxlength)),
63
+ 'image' => $this->_post->sq->tw_media,
64
+ )
65
+ ));
66
+
67
 
68
  if (isset($this->_audit->data->sq_seo_jsonld->value) && $this->_audit->data->sq_seo_jsonld->value <> '') {
69
  $this->_json = json_decode($this->_audit->data->sq_seo_jsonld->value, true);
179
 
180
  $header .= '<li class="completed">';
181
  if ($this->_keyword) {
182
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
183
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
184
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
185
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
186
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
187
+ }
188
+ $header .= '</table></div>';
189
+ }else {
190
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
191
+ }
192
  } else {
193
  $header .= '<div class="font-weight-bold text-warning m-0 text-center">' . esc_html__("No Keyword Found", _SQ_PLUGIN_NAME_) . '</div>';
194
  }
models/focuspages/Strategy.php CHANGED
@@ -100,7 +100,16 @@ class SQ_Models_Focuspages_Strategy extends SQ_Models_Abstract_Assistant {
100
 
101
  $header .= '<li class="completed">';
102
  if ($this->_keyword) {
103
- $header .= '<div class="font-weight-bold text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <strong class="text-info">' . $this->_keyword . '</strong></div>';
 
 
 
 
 
 
 
 
 
104
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'briefcase') . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Manage Strategy", _SQ_PLUGIN_NAME_) . '</a>';
105
  } else {
106
  if (isset($this->_post->ID)) {
100
 
101
  $header .= '<li class="completed">';
102
  if ($this->_keyword) {
103
+ if (isset($this->_audit->data->sq_seo_briefcase) && !empty($this->_audit->data->sq_seo_briefcase)) {
104
+ $header .= '<div class="sq_keywords" ><table class="table table-striped">';
105
+ $header .= '<tr><th>'.esc_html__("Keywords", _SQ_PLUGIN_NAME_).'</th><th title="'.esc_html__("Squirrly Live Assistant Optimization", _SQ_PLUGIN_NAME_).'">'.esc_html__("SLA", _SQ_PLUGIN_NAME_).'</th></tr>';
106
+ foreach ($this->_audit->data->sq_seo_briefcase as $lsikeyword) {
107
+ $header .= '<tr style="'.($lsikeyword->main ? 'background-color:#fafad2' : '').'"><td class="text-black-50 mb-2 text-left">' . '<span class="text-info">' . $lsikeyword->keyword . '</span></td><td>'.$lsikeyword->optimized . '%' .'</td></tr>';
108
+ }
109
+ $header .= '</table></div>';
110
+ }else {
111
+ $header .= '<div class="text-black-50 mb-2 text-center">' . esc_html__("Keyword", _SQ_PLUGIN_NAME_) . ': <span class="text-info">' . $this->_keyword . '</span></div>';
112
+ }
113
  $header .= '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'briefcase') . '" target="_blank" class="btn btn-success text-white col-sm-8 offset-2 mt-3">' . esc_html__("Manage Strategy", _SQ_PLUGIN_NAME_) . '</a>';
114
  } else {
115
  if (isset($this->_post->ID)) {
readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- ===SEO 2020 by Squirrly (Smart Strategy)===
2
  Contributors: cifi, calinvingan, florinmuresan, nagy.sorel
3
  Tags: seo, wordpress seo, seo plugin, seo optimization, seo content, seo meta, open graph, e-commerce, plugins, content, marketing, ecommerce, keyword research, content seo, yoast, all in one seo, search engine optimization, XML sitemap for google, multisite SEO, squirrly, meta title, meta description, favicon, mobile, canonical, seo correction, seo title, twitter, woocommerce, feeds, social media, blogging, google-analytics, tracking, best seo tools audit website, content audit tool, ecommerce seo strategy, marketing research tools, research tools for writers, seo audit tool, SEO keyword research tool,duplicate removal tool, ecommerce SEO, facebook open graph wordpress, google keyword planner alternative, Google ranking, how to install facebook pixel on wordpress, JSON-LD structure, Live Assistant, meta duplicate removal, open graph generator, pinterest rich pin validator, related links
4
  Requires at least: 4.3
@@ -18,7 +18,7 @@ Your search traffic can finally increase and you now have the means to make your
18
 
19
  A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services.
20
 
21
- SEO 2020 by Squirrly is the Popular Tool that NON-SEO Experts use to increase their search engine traffic. You will see success in the first few weeks if you follow the Daily SEO Goals and work with the included tools.
22
 
23
  See the Keynote from our Launch Event
24
 
@@ -52,7 +52,7 @@ https://www.youtube.com/watch?v=m2R2d2Q4Sfk
52
  It's a Non-Human Private SEO Consultant.
53
  Powered by Machine Learning and Cloud Services.
54
  It's the First of its kind.
55
- It's the new Squirrly 2020: Smart Strategy and it lives and works inside your WordPress.
56
 
57
  We've made Expert-Level SEO Advice (the kind you'd pay consultants $2,500 USD / month) very accessible for WordPress site owners, small business owners, professional bloggers, freelancers, agencies.
58
 
@@ -215,7 +215,7 @@ Squirrly SEO (Strategy) helps you create and focus on amazing SEO Strategies:
215
 
216
  See how we fix common SEO problems with this brand new release: <a title="Years of Bad SEO Can Easily Be Fixed" href="https://www.squirrly.co/most-common-seo-problems-that-we-see-in-customers-sites-time-and-again/">We've made it incredibly easy to fix SEO issues which are found on almost every site you'll see.</a>
217
 
218
- See why Generic WordPress SEO Plugins just aren't enough anymore (not in 2020) <a title="Generic Plugins for WordPress SEO are dangerous" href="https://www.squirrly.co/how-do-generic-seo-plugins-work-in-wordpress-and-why-is-squirrly-seo-different/">Generic SEO Plugins are dangerous because they let the user believe that SEO involves no work at all.</a>
219
 
220
  See the multiple levels of WordPress SEO. <a title="Levels of SEO: Keyword Competition, Time on Page, Bounce Rate, Exit Rates, Impressions, and a lot more" href="https://www.squirrly.co/all-the-important-levels-of-search-engine-optimization-explained/">Just adding a rich snippet or validating a Twitter card doesn't increase your rankings on Google. Just makes things look nice. To make these elements really work for ranking higher, you need all levels of SEO.</a>
221
 
@@ -417,6 +417,14 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
417
  28. Wp Seo - Facebook Pixel, Google Analytics and Google Search Console
418
 
419
  == Changelog ==
 
 
 
 
 
 
 
 
420
  = 10.2.05 - 12/28/2020 =
421
  * Update - Squirrlt SEO Snippet load in the main side of post editor
422
  * Update - GA loads the correct javascript based on the received GA code (UA- or G-)
1
+ ===SEO 2021 by Squirrly (Smart Strategy)===
2
  Contributors: cifi, calinvingan, florinmuresan, nagy.sorel
3
  Tags: seo, wordpress seo, seo plugin, seo optimization, seo content, seo meta, open graph, e-commerce, plugins, content, marketing, ecommerce, keyword research, content seo, yoast, all in one seo, search engine optimization, XML sitemap for google, multisite SEO, squirrly, meta title, meta description, favicon, mobile, canonical, seo correction, seo title, twitter, woocommerce, feeds, social media, blogging, google-analytics, tracking, best seo tools audit website, content audit tool, ecommerce seo strategy, marketing research tools, research tools for writers, seo audit tool, SEO keyword research tool,duplicate removal tool, ecommerce SEO, facebook open graph wordpress, google keyword planner alternative, Google ranking, how to install facebook pixel on wordpress, JSON-LD structure, Live Assistant, meta duplicate removal, open graph generator, pinterest rich pin validator, related links
4
  Requires at least: 4.3
18
 
19
  A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services.
20
 
21
+ SEO 2021 by Squirrly is the Popular Tool that NON-SEO Experts use to increase their search engine traffic. You will see success in the first few weeks if you follow the Daily SEO Goals and work with the included tools.
22
 
23
  See the Keynote from our Launch Event
24
 
52
  It's a Non-Human Private SEO Consultant.
53
  Powered by Machine Learning and Cloud Services.
54
  It's the First of its kind.
55
+ It's the new Squirrly 2021: Smart Strategy and it lives and works inside your WordPress.
56
 
57
  We've made Expert-Level SEO Advice (the kind you'd pay consultants $2,500 USD / month) very accessible for WordPress site owners, small business owners, professional bloggers, freelancers, agencies.
58
 
215
 
216
  See how we fix common SEO problems with this brand new release: <a title="Years of Bad SEO Can Easily Be Fixed" href="https://www.squirrly.co/most-common-seo-problems-that-we-see-in-customers-sites-time-and-again/">We've made it incredibly easy to fix SEO issues which are found on almost every site you'll see.</a>
217
 
218
+ See why Generic WordPress SEO Plugins just aren't enough anymore (not in 2021) <a title="Generic Plugins for WordPress SEO are dangerous" href="https://www.squirrly.co/how-do-generic-seo-plugins-work-in-wordpress-and-why-is-squirrly-seo-different/">Generic SEO Plugins are dangerous because they let the user believe that SEO involves no work at all.</a>
219
 
220
  See the multiple levels of WordPress SEO. <a title="Levels of SEO: Keyword Competition, Time on Page, Bounce Rate, Exit Rates, Impressions, and a lot more" href="https://www.squirrly.co/all-the-important-levels-of-search-engine-optimization-explained/">Just adding a rich snippet or validating a Twitter card doesn't increase your rankings on Google. Just makes things look nice. To make these elements really work for ranking higher, you need all levels of SEO.</a>
221
 
417
  28. Wp Seo - Facebook Pixel, Google Analytics and Google Search Console
418
 
419
  == Changelog ==
420
+ = 11.0.01 - 01/19/2021 =
421
+ * Update - Compatibility with PHP 8
422
+ * Update - Verify the local SEO Snippet in Focus Pages
423
+ * Update - Show all the optimimzed keywords for a Focus Page
424
+ * Update - Change the minimum optimization score for the main keyword to 75% in the Focus Page
425
+ * Fix - Fixed small style bugs in the Focus Pages
426
+ * Fix - Label edit and delete on secondary pages
427
+
428
  = 10.2.05 - 12/28/2020 =
429
  * Update - Squirrlt SEO Snippet load in the main side of post editor
430
  * Update - GA loads the correct javascript based on the received GA code (UA- or G-)
squirrly.php CHANGED
@@ -3,12 +3,12 @@
3
  * Copyright (c) 2012-2021, SEO Squirrly.
4
  * The copyrights to the software code in this file are licensed under the (revised) BSD open source license.
5
 
6
- * Plugin Name: Squirrly SEO 2020 (Smart Strategy)
7
  * Plugin URI: https://wordpress.org/plugins/squirrly-seo/
8
  * Description: A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services. Over 300 functionalities for SEO available when you need them.<BR> <a href="http://cloud.squirrly.co/user" target="_blank"><strong>Account Info</strong></a>
9
  * Author: Squirrly SEO
10
  * Author URI: https://plugin.squirrly.co
11
- * Version: 10.2.05
12
  * License: GPLv2 or later
13
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14
  * Text Domain: squirrly-seo
@@ -17,9 +17,9 @@
17
 
18
  if (!defined('SQ_VERSION')) {
19
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
20
- define('SQ_VERSION', '10.2.05');
21
  //The last stable version
22
- define('SQ_STABLE_VERSION', '10.2.03');
23
  // Call config files
24
  try {
25
  require_once(dirname(__FILE__) . '/config/config.php');
3
  * Copyright (c) 2012-2021, SEO Squirrly.
4
  * The copyrights to the software code in this file are licensed under the (revised) BSD open source license.
5
 
6
+ * Plugin Name: Squirrly SEO 2021 (Smart Strategy)
7
  * Plugin URI: https://wordpress.org/plugins/squirrly-seo/
8
  * Description: A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services. Over 300 functionalities for SEO available when you need them.<BR> <a href="http://cloud.squirrly.co/user" target="_blank"><strong>Account Info</strong></a>
9
  * Author: Squirrly SEO
10
  * Author URI: https://plugin.squirrly.co
11
+ * Version: 10.2.06
12
  * License: GPLv2 or later
13
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14
  * Text Domain: squirrly-seo
17
 
18
  if (!defined('SQ_VERSION')) {
19
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
20
+ define('SQ_VERSION', '10.2.06');
21
  //The last stable version
22
+ define('SQ_STABLE_VERSION', '10.2.05');
23
  // Call config files
24
  try {
25
  require_once(dirname(__FILE__) . '/config/config.php');
view/FocusPages/FocusPageRow.php CHANGED
@@ -51,7 +51,7 @@ if ($view->focuspage->indexed) {
51
  }
52
  if ($view->focuspage->id <> '') {
53
  ?>
54
- <td style="width: 400px;min-width: 400px;word-break: break-word;">
55
  <?php if (SQ_Classes_Helpers_Tools::getValue('sid', false)) { ?>
56
  <div class="sq_focus_visibility">
57
  <?php if ($view->focuspage->indexed) { ?>
51
  }
52
  if ($view->focuspage->id <> '') {
53
  ?>
54
+ <td style="width: 360px;min-width: 360px;word-break: break-word;">
55
  <?php if (SQ_Classes_Helpers_Tools::getValue('sid', false)) { ?>
56
  <div class="sq_focus_visibility">
57
  <?php if ($view->focuspage->indexed) { ?>
view/assets/css/assistant.min.css CHANGED
@@ -1 +1 @@
1
- #sq_wrap .sq_col_side .sq_assistant li{font-size:14px;line-height:120%;margin:0;padding:25px 10px;position:relative;border-bottom:1px dashed #ddd;border-left:1px solid #0c6588;cursor:pointer}#sq_wrap .sq_col_side .sq_assistant li.sq_task i:before{content:' ';color:#fff;background:#f2000c;display:inline-block;width:25px;height:25px;border-radius:20px;line-height:25px;text-align:center}#sq_wrap .sq_col_side .sq_assistant li.sq_practice i:before{color:#fff!important;background:#ffc107!important}#sq_wrap .sq_col_side .sq_assistant li.completed,#sq_wrap .sq_col_side .sq_assistant li.ignore{border-left:none}#sq_wrap .sq_col_side .sq_assistant li.sq_task.completed i:before,#sq_wrap .sq_col_side .sq_assistant li.sq_task.pattern i:before{content:'\f00c';background:#20bc49;font-size:13px;line-height:192%;text-align:center}#sq_wrap .sq_col_side .sq_assistant li.sq_task.ignore i:before{content:'';background:#5f5f5f;font-size:13px;line-height:192%;text-align:center}#sq_wrap .sq_col_side .sq_assistant li.sq_task.error i:before{background:#ddd}#sq_wrap .sq_col_side .sq_assistant li h4{display:inline-block;font-weight:500;font-size:16px;color:#777;line-height:25px;text-align:left;margin:0 0 0 8px;padding:0;max-width:85%}#sq_wrap .sq_col_side .sq_assistant li:not(.completed):not(.pattern) h4:after{content:"\f107";display:inline;font-family:FontAwesome,Arial,sans-serif!important;font-size:16px!important;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:6px;font-weight:700;color:#cd5c5c}#sq_assistant_modal .modal-body{font-size:15px;line-height:25px;color:#636363}#sq_assistant_modal .modal-body a{color:#f16112;text-decoration:underline;text-decoration-color:#f2814e47;text-decoration-style:double}div.sticky{position:-webkit-sticky;position:sticky;top:15px}.tooltip-inner{max-width:350px}@media (min-width:992px){div.sticky{align-self:flex-start}}
1
+ #sq_wrap .sq_col_side .sq_assistant li{font-size:14px;line-height:120%;margin:0;padding:25px 10px;position:relative;border-bottom:1px dashed #ddd;border-left:1px solid #0c6588;cursor:pointer}#sq_wrap .sq_col_side .sq_assistant li.sq_task i:before{content:' ';color:#fff;background:#f2000c;display:inline-block;width:25px;height:25px;border-radius:20px;line-height:25px;text-align:center}#sq_wrap .sq_col_side .sq_assistant li.sq_practice i:before{color:#fff!important;background:#ffc107!important}#sq_wrap .sq_col_side .sq_assistant li.completed,#sq_wrap .sq_col_side .sq_assistant li.ignore{border-left:none}#sq_wrap .sq_col_side .sq_assistant li.sq_task.completed i:before,#sq_wrap .sq_col_side .sq_assistant li.sq_task.pattern i:before{content:'\f00c';background:#20bc49;font-size:13px;line-height:192%;text-align:center}#sq_wrap .sq_col_side .sq_assistant li.sq_task.ignore i:before{content:'';background:#5f5f5f;font-size:13px;line-height:192%;text-align:center}#sq_wrap .sq_col_side .sq_assistant li.sq_task.error i:before{background:#ddd}#sq_wrap .sq_col_side .sq_assistant li h4{display:inline-block;font-weight:500;font-size:16px;color:#777;line-height:25px;text-align:left;margin:0 0 0 8px;padding:0;max-width:85%}#sq_wrap .sq_col_side .sq_assistant li:not(.completed):not(.pattern) h4:after{content:"\f107";display:inline;font-family:FontAwesome,Arial,sans-serif!important;font-size:16px!important;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:6px;font-weight:700;color:#cd5c5c}#sq_assistant_modal .modal-body{font-size:15px;line-height:25px;color:#636363}#sq_assistant_modal .modal-body a{color:#f16112;text-decoration:underline;text-decoration-color:#f2814e47;text-decoration-style:double}#sq_wrap .sq_col_side .sq_focuspages_assistant .sq_keywords{width:100%;max-height:200px;overflow:auto;display:block}#sq_wrap .sq_col_side .sq_focuspages_assistant .sq_keywords table td:first-child{text-align:left}#sq_wrap .sq_col_side .sq_focuspages_assistant .sq_keywords table td:last-child{text-align:right}div.sticky{position:-webkit-sticky;position:sticky;top:15px}.tooltip-inner{max-width:350px}@media (min-width:992px){div.sticky{align-self:flex-start}}
view/assets/js/briefcase.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";var briefcaseTable;$.fn.sq_Briefcase=function(){var $this=this;var $popupAddKeyword=$this.find(".sq_add_keyword_dialog");var $popupAddLabel=$this.find(".sq_add_labels_dialog");var $popupEditLabel=$this.find(".sq_edit_label_dialog");$this.listenAdd=function(){$popupAddLabel.find("#sq_labelcolor").wpColorPicker();$popupAddLabel.find("#sq_save_label").on("click",function(){var $button=$(this);var $name=$popupAddLabel.find("input#sq_labelname").val();var $color=$popupAddLabel.find("input#sq_labelcolor").val();$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_addlabel",name:$name,color:$color,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.saved!=="undefined"){location.reload();$button.removeClass("sq_minloading")}else if(typeof response.error!=="undefined"){$button.removeClass("sq_minloading");$.sq_showMessage(response.error).addClass("sq_error")}}).fail(function(){$button.removeClass("sq_minloading")},"json")});$this.find(".sq_save_keyword_labels").on("click",function(){var $popup=$(this).parents(".sq_label_manage_popup:last");var $button=$(this);var $keyword=$(this).data("keyword");var $labels=[];$popup.find('input[name="sq_labels"]:checked').each(function(){$labels.push(this.value)});$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_keywordlabel",keyword:$keyword,labels:$labels,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.saved!=="undefined"){location.reload();$button.removeClass("sq_minloading")}else if(typeof response.error!=="undefined"){$button.removeClass("sq_minloading");$.sq_showMessage(response.error).addClass("sq_error")}}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenEdit=function(){$popupEditLabel.find("#sq_labelcolor").wpColorPicker();$this.find(".sq_edit_label").on("click",function(){$("#element .wp-picker-clear").trigger("click");$popupEditLabel.find("input#sq_labelid").val($(this).attr("data-id"));$popupEditLabel.find("input#sq_labelname").val($(this).attr("data-name"));$popupEditLabel.find("input#sq_labelcolor").val($(this).attr("data-color"));$popupEditLabel.find("input#sq_labelcolor").trigger("change");$popupAddKeyword.modal("hide");$popupAddLabel.modal("hide");$popupEditLabel.modal("show")});$popupEditLabel.find("#sq_save_label").on("click",function(){var $button=$(this);var $id=$popupEditLabel.find("#sq_labelid").val();var $name=$popupEditLabel.find("#sq_labelname").val();var $color=$popupEditLabel.find("#sq_labelcolor").val();$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_editlabel",id:$id,name:$name,color:$color,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.saved!=="undefined"){location.reload();$button.removeClass("sq_minloading")}else if(typeof response.error!=="undefined"){$button.removeClass("sq_minloading");$.sq_showMessage(response.error).addClass("sq_error")}}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenCount=function(){$this.find(".sq_open_subrow").on("click",function(){var $button=$(this);var $id=$(this).data("id");var $keyword=$(this).data("keyword");$this.find(".fa_showmore").removeClass("fa-sort-asc");if($("#sq_subrow_"+$id).is(":visible")){$("#sq_subrow_"+$id).hide();return}$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_article",keyword:$keyword,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){if(response.error==="limit_exceeded"){$.sq_showMessage(response.error).addClass("sq_error")}else{$.sq_showMessage(response.error,1e4).addClass("sq_error")}}else if(typeof response.articles!=="undefined"){$(".sq_subrow").hide();$("#sq_subrow_"+$id).find("td").html(response.articles);$("#sq_subrow_"+$id).show()}$("#sq_row_"+$id).find(".fa_showmore").addClass("fa-sort-asc");$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenDelete=function(){$this.find(".sq_delete").on("click",function(){if(confirm("Are you sure ?")){var $button=$(this);var $keyword=$(this).data("keyword");var $id=$(this).data("id");$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_deletekeyword",keyword:$keyword,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.message!=="undefined"){$this.find("#sq_row_"+$id).remove();$this.find("#sq_subrow_"+$id).remove()}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error).addClass("sq_error")}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")}});$this.find(".sq_delete_label").on("click",function(){if(confirm("Are you sure ?")){var $button=$(this).parents(".sq_saved_label:last");var $id=$(this).data("id");$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_deletelabel",id:$id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.deleted!=="undefined"){location.reload();$button.remove();$this.find("label[data-id="+$id+"]").remove();$this.find(".sq_circle_label[data-id="+$id+"]").remove()}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error).addClass("sq_error")}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")}})};$this.listenDoSerp=function(){$this.find(".sq_research_doserp").on("click",function(){var $button=$(this);var $keyword=$(this).data("keyword");$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_briefcase_doserp",keyword:$keyword,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.message!=="undefined"){$.sq_showMessage(response.message).addClass("sq_success");$button.hide()}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error)}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenOptions=function(){$("#sq_briefcase .sq_filter_label input[type=checkbox]").click(function(){$("#sq_briefcase .sq_filter_label input[type=checkbox]").each(function(){if(!$(this).is(":checked")){$(this).next("label").removeClass("sq_active")}});if($(this).is(":checked")){$(this).next("label").addClass("sq_active")}});$("#sq_briefcase .sq_add_keyword_dialog input[type=checkbox]").click(function(){$("#sq_briefcase .sq_add_keyword_dialog input[type=checkbox]").each(function(){if(!$(this).is(":checked")){$(this).next("label").removeClass("sq_active")}});if($(this).is(":checked")){$(this).next("label").addClass("sq_active")}});$("#sq_briefcase .sq_label_manage_popup input[type=checkbox]").click(function(){var $popup=$(this).parents(".sq_label_manage_popup:last");$popup.find("input[type=checkbox]").each(function(){if(!$(this).is(":checked")){$(this).next("label").removeClass("sq_active")}});if($(this).is(":checked")){$(this).next("label").addClass("sq_active")}})};$this.bulkAction=function(){$this.find(".sq_bulk_submit").on("click",function(){var $button=$(this);if($this.find(".sq_bulk_action").find(":selected").val()!==""){if(!$button.hasClass("btn-modal")&&$this.find(".sq_bulk_action").find(":selected").val()==="sq_ajax_briefcase_bulk_label"){$this.find("#sq_label_manage_popup_bulk").modal("show");return}if($this.find(".sq_bulk_action").find(":selected").data("confirm")){if(!confirm($this.find(".sq_bulk_action").find(":selected").data("confirm"))){return}}var $sq_bulk_input=[];jQuery($this.find(".sq_bulk_input").serializeArray()).each(function(){$sq_bulk_input.push($(this).attr("value"))});var $sq_bulk_labels=[];jQuery($this.find(".sq_bulk_labels").serializeArray()).each(function(){$sq_bulk_labels.push($(this).attr("value"))});$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:$this.find(".sq_bulk_action").find(":selected").val(),inputs:$sq_bulk_input,labels:$sq_bulk_labels,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.message!=="undefined"){$.sq_showMessage(response.message).addClass("sq_success");if($this.find(".sq_bulk_action").find(":selected").val()==="sq_ajax_briefcase_bulk_doserp"){$this.find(".sq_bulk_input").each(function(){if($(this).is(":checked")){$(this).parents("tr:last").find(".sq_research_doserp").remove();$(this).prop("checked",false)}})}else if($this.find(".sq_bulk_action").find(":selected").val()==="sq_ajax_briefcase_bulk_delete"){$this.find(".sq_bulk_input").each(function(){if($(this).is(":checked")){briefcaseTable.row($(this).parents("tr:last")).remove().draw()}})}else{location.reload()}}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error)}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")}})};$this.listenAdd();$this.listenEdit();$this.listenDelete();$this.listenDoSerp();$this.listenOptions();$this.bulkAction();return $this};$.fn.loadTable=function(){$.extend($.fn.dataTableExt.oSort,{"formatted-posts-pre":function(a){return parseInt($("<div></div>").append(a).find("span").data("value"))},"formatted-posts-asc":function(a,b){return a-b},"formatted-posts-desc":function(a,b){return b-a},"formatted-value-pre":function(a){return $("<div></div>").append(a).find("span").data("value")},"formatted-value-asc":function(a,b){return a-b},"formatted-value-desc":function(a,b){return b-a},"formatted-progress-pre":function(a){return $("<div></div>").append(a).find("button").data("value")},"formatted-progress-asc":function(a,b){return a-b},"formatted-progress-desc":function(a,b){return b-a},"formatted-num-pre":function(a){return parseInt(a.replace(/[^\d\-\.]/g,""))},"formatted-num-asc":function(a,b){return a-b},"formatted-num-desc":function(a,b){return b-a},"formatted-rank-pre":function(a){var div=$("<div>"+a+"</div>");div.find(".badge").remove();if(div.text()==="N/A"||div.text()==="GSC")return 999;return parseFloat(div.text())},"formatted-rank-asc":function(a,b){return a-b},"formatted-rank-desc":function(a,b){return b-a}});return $(this).DataTable({columnDefs:[{targets:2,sortable:true,type:"formatted-posts"},{targets:3,sortable:true,type:"formatted-rank"},{targets:4,sortable:true,type:"formatted-value"},{targets:5,sortable:true,type:"formatted-progress"},{targets:[0,6],sortable:false}],bPaginate:true,bLengthChange:false,bFilter:false,iDisplayLength:10,aaSorting:[3,"asc",2,"desc"]})};$(document).ready(function(){$("#sq_briefcase").sq_Briefcase();$("#sq_briefcaselabels").sq_Briefcase();briefcaseTable=$("#sq_briefcase table.table").loadTable()})})(jQuery);
1
+ if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";var briefcaseTable;var briefcaseLabelTable;$.fn.sq_Briefcase=function(){var $this=this;var $popupAddKeyword=$this.find(".sq_add_keyword_dialog");var $popupAddLabel=$this.find(".sq_add_labels_dialog");var $popupEditLabel=$this.find(".sq_edit_label_dialog");$this.listenAdd=function(){$popupAddLabel.find("#sq_labelcolor").wpColorPicker();$popupAddLabel.find("#sq_save_label").on("click",function(){var $button=$(this);var $name=$popupAddLabel.find("input#sq_labelname").val();var $color=$popupAddLabel.find("input#sq_labelcolor").val();$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_addlabel",name:$name,color:$color,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.saved!=="undefined"){location.reload();$button.removeClass("sq_minloading")}else if(typeof response.error!=="undefined"){$button.removeClass("sq_minloading");$.sq_showMessage(response.error).addClass("sq_error")}}).fail(function(){$button.removeClass("sq_minloading")},"json")});$this.find(".sq_save_keyword_labels").on("click",function(){var $popup=$(this).parents(".sq_label_manage_popup:last");var $button=$(this);var $keyword=$(this).data("keyword");var $labels=[];$popup.find('input[name="sq_labels"]:checked').each(function(){$labels.push(this.value)});$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_keywordlabel",keyword:$keyword,labels:$labels,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.saved!=="undefined"){location.reload();$button.removeClass("sq_minloading")}else if(typeof response.error!=="undefined"){$button.removeClass("sq_minloading");$.sq_showMessage(response.error).addClass("sq_error")}}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenEdit=function(){$popupEditLabel.find("#sq_labelcolor").wpColorPicker();$this.find(".sq_edit_label").on("click",function(){$("#element .wp-picker-clear").trigger("click");$popupEditLabel.find("input#sq_labelid").val($(this).attr("data-id"));$popupEditLabel.find("input#sq_labelname").val($(this).attr("data-name"));$popupEditLabel.find("input#sq_labelcolor").val($(this).attr("data-color"));$popupEditLabel.find("input#sq_labelcolor").trigger("change");$popupAddKeyword.modal("hide");$popupAddLabel.modal("hide");$popupEditLabel.modal("show")});$popupEditLabel.find("#sq_save_label").on("click",function(){var $button=$(this);var $id=$popupEditLabel.find("#sq_labelid").val();var $name=$popupEditLabel.find("#sq_labelname").val();var $color=$popupEditLabel.find("#sq_labelcolor").val();$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_editlabel",id:$id,name:$name,color:$color,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.saved!=="undefined"){location.reload();$button.removeClass("sq_minloading")}else if(typeof response.error!=="undefined"){$button.removeClass("sq_minloading");$.sq_showMessage(response.error).addClass("sq_error")}}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenDelete=function(){$this.find(".sq_delete").on("click",function(){if(confirm("Are you sure ?")){var $button=$(this);var $keyword=$(this).data("keyword");var $id=$(this).data("id");$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_deletekeyword",keyword:$keyword,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.message!=="undefined"){$this.find("#sq_row_"+$id).remove();$this.find("#sq_subrow_"+$id).remove()}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error).addClass("sq_error")}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")}});$this.find(".sq_delete_label").on("click",function(){if(confirm("Are you sure ?")){var $button=$(this).parents(".sq_saved_label:last");var $id=$(this).data("id");$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_deletelabel",id:$id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.deleted!=="undefined"){location.reload();$button.remove();$this.find("label[data-id="+$id+"]").remove();$this.find(".sq_circle_label[data-id="+$id+"]").remove()}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error).addClass("sq_error")}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")}})};$this.listenDoSerp=function(){$this.find(".sq_research_doserp").on("click",function(){var $button=$(this);var $keyword=$(this).data("keyword");$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_briefcase_doserp",keyword:$keyword,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.message!=="undefined"){$.sq_showMessage(response.message).addClass("sq_success");$button.hide()}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error)}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")})};$this.listenOptions=function(){$("#sq_briefcase .sq_filter_label input[type=checkbox]").click(function(){$("#sq_briefcase .sq_filter_label input[type=checkbox]").each(function(){if(!$(this).is(":checked")){$(this).next("label").removeClass("sq_active")}});if($(this).is(":checked")){$(this).next("label").addClass("sq_active")}});$("#sq_briefcase .sq_add_keyword_dialog input[type=checkbox]").click(function(){$("#sq_briefcase .sq_add_keyword_dialog input[type=checkbox]").each(function(){if(!$(this).is(":checked")){$(this).next("label").removeClass("sq_active")}});if($(this).is(":checked")){$(this).next("label").addClass("sq_active")}});$("#sq_briefcase .sq_label_manage_popup input[type=checkbox]").click(function(){var $popup=$(this).parents(".sq_label_manage_popup:last");$popup.find("input[type=checkbox]").each(function(){if(!$(this).is(":checked")){$(this).next("label").removeClass("sq_active")}});if($(this).is(":checked")){$(this).next("label").addClass("sq_active")}})};$this.bulkAction=function(){$this.find(".sq_bulk_submit").on("click",function(){var $button=$(this);if($this.find(".sq_bulk_action").find(":selected").val()!==""){if(!$button.hasClass("btn-modal")&&$this.find(".sq_bulk_action").find(":selected").val()==="sq_ajax_briefcase_bulk_label"){$this.find("#sq_label_manage_popup_bulk").modal("show");return}if($this.find(".sq_bulk_action").find(":selected").data("confirm")){if(!confirm($this.find(".sq_bulk_action").find(":selected").data("confirm"))){return}}var $sq_bulk_input=[];jQuery($this.find(".sq_bulk_input").serializeArray()).each(function(){$sq_bulk_input.push($(this).attr("value"))});var $sq_bulk_labels=[];jQuery($this.find(".sq_bulk_labels").serializeArray()).each(function(){$sq_bulk_labels.push($(this).attr("value"))});$button.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:$this.find(".sq_bulk_action").find(":selected").val(),inputs:$sq_bulk_input,labels:$sq_bulk_labels,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.message!=="undefined"){$.sq_showMessage(response.message).addClass("sq_success");if($this.find(".sq_bulk_action").find(":selected").val()==="sq_ajax_briefcase_bulk_doserp"){$this.find(".sq_bulk_input").each(function(){if($(this).is(":checked")){$(this).parents("tr:last").find(".sq_research_doserp").remove();$(this).prop("checked",false)}})}else if($this.find(".sq_bulk_action").find(":selected").val()==="sq_ajax_briefcase_bulk_delete"){$this.find(".sq_bulk_input").each(function(){if($(this).is(":checked")){briefcaseTable.row($(this).parents("tr:last")).remove().draw()}})}else{location.reload()}}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error)}$button.removeClass("sq_minloading")}).fail(function(){$button.removeClass("sq_minloading")},"json")}})};$("#dataTables tbody tr").on("click","td",function(event){});$this.listenAdd();$this.listenEdit();$this.listenDelete();$this.listenDoSerp();$this.listenOptions();$this.bulkAction();return $this};$.fn.loadTable=function(){$.extend($.fn.dataTableExt.oSort,{"formatted-posts-pre":function(a){return parseInt($("<div></div>").append(a).find("span").data("value"))},"formatted-posts-asc":function(a,b){return a-b},"formatted-posts-desc":function(a,b){return b-a},"formatted-value-pre":function(a){return $("<div></div>").append(a).find("span").data("value")},"formatted-value-asc":function(a,b){return a-b},"formatted-value-desc":function(a,b){return b-a},"formatted-progress-pre":function(a){return $("<div></div>").append(a).find("button").data("value")},"formatted-progress-asc":function(a,b){return a-b},"formatted-progress-desc":function(a,b){return b-a},"formatted-num-pre":function(a){return parseInt(a.replace(/[^\d\-\.]/g,""))},"formatted-num-asc":function(a,b){return a-b},"formatted-num-desc":function(a,b){return b-a},"formatted-rank-pre":function(a){var div=$("<div>"+a+"</div>");div.find(".badge").remove();if(div.text()==="N/A"||div.text()==="GSC")return 999;return parseFloat(div.text())},"formatted-rank-asc":function(a,b){return a-b},"formatted-rank-desc":function(a,b){return b-a}});return $(this).DataTable({columnDefs:[{targets:2,sortable:true,type:"formatted-posts"},{targets:3,sortable:true,type:"formatted-rank"},{targets:4,sortable:true,type:"formatted-value"},{targets:5,sortable:true,type:"formatted-progress"},{targets:[0,6],sortable:false}],bPaginate:true,bLengthChange:false,bFilter:false,iDisplayLength:10,aaSorting:[3,"asc",2,"desc"]})};$.fn.loadLabelTable=function(){return $(this).DataTable({columnDefs:[{targets:[1],searchable:true,sortable:true},{targets:[0,2,3],sortable:false}],bPaginate:true,bLengthChange:false,bFilter:false,iDisplayLength:10,aaSorting:[1,"desc"],fixedColumns:true})};$(document).ready(function(){$("#sq_briefcase").sq_Briefcase();$("#sq_briefcaselabels").sq_Briefcase();briefcaseTable=$("#sq_briefcase table.table").loadTable();briefcaseLabelTable=$("#sq_briefcaselabels table.table").loadLabelTable()})})(jQuery);
view/assets/js/bulkseo.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";$.fn.sq_bulkSeo=function(){var $this=this;var lastScrollLeft=0;var scrollLeft=0;var maxScrollLeft=0;$this.find(".sq_overflow").css("max-width",$this.width()-20).show();$(window).resize(function(){$this.find(".sq_overflow").hide().css("max-width",$this.width()-20).show();$this.find(".sq_overflow").scrollLeft(0);maxScrollLeft=$this.find(".sq_overflow").prop("scrollWidth")-$this.find(".sq_overflow").width();if(maxScrollLeft>0){$this.find(".sq_overflow_arrow_right").show()}else{$this.find(".sq_overflow_arrow_right").hide()}});$this.find(".sq_overflow_arrow_right").on("click",function(){$this.find(".sq_overflow").scrollLeft(scrollLeft+$this.find(".sq_overflow").width())});$this.find(".sq_overflow_arrow_left").on("click",function(){$this.find(".sq_overflow").scrollLeft(scrollLeft-$this.find(".sq_overflow").width())});$this.find(".sq_overflow").scroll(function(){scrollLeft=parseInt($this.find(".sq_overflow").scrollLeft());maxScrollLeft=$this.find(".sq_overflow").prop("scrollWidth")-$this.find(".sq_overflow").width();if(lastScrollLeft!==scrollLeft){if(scrollLeft===0){$(".sq_overflow_arrow_right").show();$(".sq_overflow_arrow_left").hide()}else if(scrollLeft>=maxScrollLeft-10){$(".sq_overflow_arrow_right").hide();$(".sq_overflow_arrow_left").show()}lastScrollLeft=scrollLeft}})};var sq_Assistant=$.fn.sq_Assistant;$.fn.sq_Assistant=function(options){var $this=this;var $modal=$("#sq_assistant_modal");var settings=$.extend({category:"metas",post_hash:""},options);$this.listenTableBullets=function(){$this.find(".sq_show_snippet").off("click").on("click",function(){var $id=$(this).data("id");settings.category=$(this).data("category");if(!$this.find("#sq_edit_"+$id).length){$this.find("#sq_row_"+$id).after('<tr id="sq_edit_'+$id+'" class="sq_edit"><td colspan="5" class="p-0 m-0"></td></tr>');$this.find("#sq_edit_"+$id).find("td").html($this.find("#sq_blocksnippet_"+$id))}$this.find("#sq_blocksnippet_"+$id).show().sq_loadSnippet();$this.find("div.sq_assistant").find("ul").hide();$this.find("ul#sq_assistant_tasks_"+$(this).data("category")+"_"+$(this).data("id")).show(0,function(){$(this).fadeTo(0,.1).fadeTo("fast",1)})});$this.find(".sq_show_snippet").tooltip({placement:"left",trigger:"hover"})};$this.listenSnippet=function(){var $snippet=$this.find(".sq_blocksnippet").each(function(){return $(this).off("sq_snippet_loaded sq_reloaded").on("sq_snippet_loaded sq_reloaded",function(){var $csnippet=$(this);$csnippet.find(".sq-tab-content").addClass("sq_minloading");return $.post(sqQuery.ajaxurl,{action:"sq_ajax_assistant_bulkseo",post_id:$csnippet.find("input[name=sq_post_id]").val(),term_id:$csnippet.find("input[name=sq_term_id]").val(),taxonomy:$csnippet.find("input[name=sq_taxonomy]").val(),post_type:$csnippet.find("input[name=sq_post_type]").val(),sq_nonce:sqQuery.nonce}).done(function(response){$csnippet.find(".sq-tab-content").removeClass("sq_minloading");if(typeof response.html!=="undefined"){if(response.html!==""&&response.html_dest){$this.find(".sq_show_snippet").tooltip("hide");$(response.html_dest).html(response.html);if(response.assistant!==""&&response.assistant_dest){var show_tasks_id=$this.find(".sq_assistant").find("ul:visible").attr("id");$(response.assistant_dest).html(response.assistant);if(show_tasks_id)$this.find("#"+show_tasks_id).show()}$("#sq_wrap").sq_Assistant({category:settings.category});var $tab=$csnippet.find(".sq_snippet_menu").find("#sq-nav-item_"+settings.category);$tab.addClass("active");$csnippet.find($tab.attr("href")).addClass("active")}}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error)}else{location.reload();SQ_DEBUG&&console.log("no data received")}}).fail(function(){location.reload();SQ_DEBUG&&console.log("no data received")},"json")})});$this.find(".sq-nav-item.sq-nav-link").on("click",function(){settings.category=$(this).data("category");settings.post_hash=$snippet.find("input[name=sq_hash]").val();if($("#sq_row_"+settings.post_hash).length>0){$this.find("div.sq_assistant").find("ul").hide();$this.find("ul#sq_assistant_tasks_"+settings.category+"_"+settings.post_hash).show()}})};$this.listenTableBullets();$this.listenSnippet();var args=Array.prototype.slice.call(arguments,0);return sq_Assistant.apply($this,args)};$(document).ready(function(){$("#sq_seosettings").sq_bulkSeo();if($.sq_getParam("sid")){$("#sq_wrap").find(".sq_show_snippet:first").trigger("click")}})})(jQuery);
1
+ if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";$.fn.sq_bulkSeo=function(){};var sq_Assistant=$.fn.sq_Assistant;$.fn.sq_Assistant=function(options){var $this=this;var $modal=$("#sq_assistant_modal");var settings=$.extend({category:"metas",post_hash:""},options);$this.listenTableBullets=function(){$this.find(".sq_show_snippet").off("click").on("click",function(){var $id=$(this).data("id");settings.category=$(this).data("category");if(!$this.find("#sq_edit_"+$id).length){$this.find("#sq_row_"+$id).after('<tr id="sq_edit_'+$id+'" class="sq_edit"><td colspan="5" class="p-0 m-0"></td></tr>');$this.find("#sq_edit_"+$id).find("td").html($this.find("#sq_blocksnippet_"+$id))}$this.find("#sq_blocksnippet_"+$id).show().sq_loadSnippet();$this.find("div.sq_assistant").find("ul").hide();$this.find("ul#sq_assistant_tasks_"+$(this).data("category")+"_"+$(this).data("id")).show(0,function(){$(this).fadeTo(0,.1).fadeTo("fast",1)})});$this.find(".sq_show_snippet").tooltip({placement:"left",trigger:"hover"})};$this.listenSnippet=function(){var $snippet=$this.find(".sq_blocksnippet").each(function(){return $(this).off("sq_snippet_loaded sq_reloaded").on("sq_snippet_loaded sq_reloaded",function(){var $csnippet=$(this);$csnippet.find(".sq-tab-content").addClass("sq_minloading");return $.post(sqQuery.ajaxurl,{action:"sq_ajax_assistant_bulkseo",post_id:$csnippet.find("input[name=sq_post_id]").val(),term_id:$csnippet.find("input[name=sq_term_id]").val(),taxonomy:$csnippet.find("input[name=sq_taxonomy]").val(),post_type:$csnippet.find("input[name=sq_post_type]").val(),sq_nonce:sqQuery.nonce}).done(function(response){$csnippet.find(".sq-tab-content").removeClass("sq_minloading");if(typeof response.html!=="undefined"){if(response.html!==""&&response.html_dest){$this.find(".sq_show_snippet").tooltip("hide");$(response.html_dest).html(response.html);if(response.assistant!==""&&response.assistant_dest){var show_tasks_id=$this.find(".sq_assistant").find("ul:visible").attr("id");$(response.assistant_dest).html(response.assistant);if(show_tasks_id)$this.find("#"+show_tasks_id).show()}$("#sq_wrap").sq_Assistant({category:settings.category});var $tab=$csnippet.find(".sq_snippet_menu").find("#sq-nav-item_"+settings.category);$tab.addClass("active");$csnippet.find($tab.attr("href")).addClass("active")}}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error)}else{location.reload();SQ_DEBUG&&console.log("no data received")}}).fail(function(){location.reload();SQ_DEBUG&&console.log("no data received")},"json")})});$this.find(".sq-nav-item.sq-nav-link").on("click",function(){settings.category=$(this).data("category");settings.post_hash=$snippet.find("input[name=sq_hash]").val();if($("#sq_row_"+settings.post_hash).length>0){$this.find("div.sq_assistant").find("ul").hide();$this.find("ul#sq_assistant_tasks_"+settings.category+"_"+settings.post_hash).show()}})};$this.listenTableBullets();$this.listenSnippet();var args=Array.prototype.slice.call(arguments,0);return sq_Assistant.apply($this,args)};$(document).ready(function(){$("#sq_seosettings").sq_bulkSeo();if($.sq_getParam("sid")){$("#sq_wrap").find(".sq_show_snippet:first").trigger("click")}})})(jQuery);
view/assets/js/focuspages.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";$.fn.sq_focusPages=function(){var $this=this;var lastScrollLeft=0;var scrollLeft=0;var maxScrollLeft=0;$this.listenScrollbar=function(){$this.find(".sq_overflow").css("max-width",$this.width()-10).show();$(window).resize(function(){$this.find(".sq_overflow").hide().css("max-width",$this.width()-10).show();maxScrollLeft=$this.find(".sq_overflow").prop("scrollWidth")-$this.find(".sq_overflow").width()});$this.find(".sq_overflow_arrow_right").show();$this.find(".sq_overflow_arrow_right").on("click",function(){$this.find(".sq_overflow").scrollLeft(scrollLeft+$this.find(".sq_overflow").width());$(".sq_overflow_arrow_left").show()});$this.find(".sq_overflow_arrow_left").on("click",function(){$this.find(".sq_overflow").scrollLeft(scrollLeft-$this.find(".sq_overflow").width());$(".sq_overflow_arrow_right").show()});$this.find(".sq_overflow").scroll(function(){$(".sq_overflow_arrow_right").show();$(".sq_overflow_arrow_left").show();scrollLeft=parseInt($this.find(".sq_overflow").scrollLeft());maxScrollLeft=$this.find(".sq_overflow").prop("scrollWidth")-$this.find(".sq_overflow").width();if(lastScrollLeft!==scrollLeft){if(scrollLeft===0){$(".sq_overflow_arrow_right").show();$(".sq_overflow_arrow_left").hide()}else if(scrollLeft>=maxScrollLeft-20){$(".sq_overflow_arrow_right").hide();$(".sq_overflow_arrow_left").show()}lastScrollLeft=scrollLeft}})};var sq_Assistant=$.fn.sq_Assistant;$.fn.sq_Assistant=function(options){var $this=this;var $modal=$("#sq_assistant_modal");var settings=$.extend({category:"metas"},options);if($(".sq_focuspages_content").find(".sq_assistant").length>0){$(".sq_focuspages_assistant").html($(".sq_focuspages_content").find(".sq_assistant"))}$this.listenTableBullets=function(){$this.find(".sq_show_assistant").off("click").on("click",function(){$this.find("div.sq_assistant").find("ul").hide();$this.find("ul#sq_assistant_tasks_"+$(this).data("category")+"_"+$(this).data("id")).show(0,function(){$(this).fadeTo(0,.1).fadeTo("fast",1)})});$this.find(".sq_show_assistant").tooltip({placement:"left",trigger:"hover",html:true});$this.find(".sq_show_tooltip").tooltip({placement:"left",trigger:"hover",html:true})};$this.listenTableBullets();$this.find(".sq_show_snippet").tooltip({placement:"left",trigger:"hover"});var args=Array.prototype.slice.call(arguments,0);return sq_Assistant.apply($this,args)};$(".sq_focuspages_refresh").on("click",function(){var $refresh=$(this);$refresh.addClass("fa-spin");$this.sq_getFocusPages();$this.on("sq_focuspages_loaded",function(){$this.listen();$refresh.removeClass("fa-spin")})});$this.listen=function(){$this.listenScrollbar();$("#sq_wrap").sq_Assistant();$(".sq_circle_label_input").on("change",function(){$this.sq_getFocusPages()});$(".sq_assistant_help ul").show()};$this.on("sq_focuspages_loaded",function(){$(".sq_save_ajax").find("input").on("change",function(){$(this).sq_ajaxCallListen()});$(".sq_save_ajax").find("button").on("click",function(){$(this).sq_ajaxCallListen()})});$this.listen()};$.fn.sq_getFocusPages=function(){var $this=this;var $sid=$.sq_getParam("sid");var $sq_slabels=[];$this.find(".sq_circle_label_input:checked").each(function(){$sq_slabels.push($(this).val())});$this.addClass("sq_minloading");return $.post(sqQuery.ajaxurl,{action:"sq_focuspages_getpage",sid:$sid?$sid:null,slabel:$sq_slabels,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"){$("div.tooltip").hide();$this.find(".sq_focuspages_content").html(response.html);$this.trigger("sq_focuspages_loaded");SQ_DEBUG&&console.log("sq_focuspages_loaded")}else{$("#sq_focuspages").trigger("error.refresh",response)}if(typeof response.error!=="undefined"){$.sq_showMessage(response.error,5e3).addClass("sq_error")}}else{$("#sq_focuspages").trigger("error.refresh",response);SQ_DEBUG&&console.log("no data received")}$this.removeClass("sq_minloading")}).fail(function(error){SQ_DEBUG&&console.log("no data received");$("#sq_focuspages").trigger("error.refresh",error);$this.removeClass("sq_minloading")},"json")};$.fn.sq_inspectURL=function(){var $this=this;$this.find(".modal-body").addClass("sq_loading");$this.find(".modal-body").html("");var post_id=$this.attr("data-post_id");$this.modal("show");$.post(sqQuery.ajaxurl,{action:"sq_focuspages_inspecturl",post_id:post_id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"&&response.html){$this.find(".modal-body").html(response.html)}else{$this.find(".modal-body").html("Page could not load")}if(typeof response.error!=="undefined"){$.sq_showMessage(response.error,5e3).addClass("sq_error")}}$this.find(".modal-body").removeClass("sq_loading")}).fail(function(error){$this.trigger("error.refresh",error);$this.find(".modal-body").removeClass("sq_loading")},"json")};$(document).ready(function(){$("#sq_focuspages").sq_focusPages();$("#sq_focuspages").on("error.refresh",function(){$.sq_showMessage("Couldn't load the data. <span class='sq_refresh' style='color:#f1d432; cursor:pointer;'>Please refresh</span>.",1e4).addClass("sq_error");$(".sq_refresh").on("click",function(){location.reload()})})})})(jQuery);
1
+ if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";$.fn.sq_focusPages=function(){var $this=this;var lastScrollLeft=0;var scrollLeft=0;var maxScrollLeft=0;$this.listenScrollbar=function(){$this.find(".sq_overflow").css("max-width",$this.width()-10).show();$(window).resize(function(){$this.find(".sq_overflow").hide().css("max-width",$this.width()-10).show();maxScrollLeft=$this.find(".sq_overflow").prop("scrollWidth")-$this.find(".sq_overflow").width()});$this.find(".sq_overflow_arrow_right").show();$this.find(".sq_overflow_arrow_right").off().on("click",function(){if($.isFunction($this.find(".sq_overflow").animate)){$this.find(".sq_overflow").animate({scrollLeft:scrollLeft+400},500)}else{$this.find(".sq_overflow").scrollLeft(scrollLeft+400)}$(".sq_overflow_arrow_left").show()});$this.find(".sq_overflow_arrow_left").off().on("click",function(){if($.isFunction($this.find(".sq_overflow").animate)){$this.find(".sq_overflow").animate({scrollLeft:scrollLeft-400},500)}else{$this.find(".sq_overflow").scrollLeft(scrollLeft-400)}$(".sq_overflow_arrow_right").show()});$this.find(".sq_overflow").scroll(function(){$(".sq_overflow_arrow_right").show();$(".sq_overflow_arrow_left").show();scrollLeft=parseInt($this.find(".sq_overflow").scrollLeft());maxScrollLeft=$this.find(".sq_overflow").prop("scrollWidth")-$this.find(".sq_overflow").width();if(lastScrollLeft!==scrollLeft){if(scrollLeft===0){$(".sq_overflow_arrow_right").show();$(".sq_overflow_arrow_left").hide()}else if(scrollLeft>=maxScrollLeft-20){$(".sq_overflow_arrow_right").hide();$(".sq_overflow_arrow_left").show()}lastScrollLeft=scrollLeft}})};var sq_Assistant=$.fn.sq_Assistant;$.fn.sq_Assistant=function(options){var $this=this;var $modal=$("#sq_assistant_modal");var settings=$.extend({category:"metas"},options);if($(".sq_focuspages_content").find(".sq_assistant").length>0){$(".sq_focuspages_assistant").html($(".sq_focuspages_content").find(".sq_assistant"))}$this.listenTableBullets=function(){$this.find(".sq_show_assistant").off("click").on("click",function(){$this.find("div.sq_assistant").find("ul").hide();$this.find("ul#sq_assistant_tasks_"+$(this).data("category")+"_"+$(this).data("id")).show(0,function(){$(this).fadeTo(0,.1).fadeTo("fast",1)})});$this.find(".sq_show_assistant").tooltip({placement:"left",trigger:"hover",html:true});$this.find(".sq_show_tooltip").tooltip({placement:"left",trigger:"hover",html:true})};$this.listenTableBullets();$this.find(".sq_show_snippet").tooltip({placement:"left",trigger:"hover"});var args=Array.prototype.slice.call(arguments,0);return sq_Assistant.apply($this,args)};$(".sq_focuspages_refresh").on("click",function(){var $refresh=$(this);$refresh.addClass("fa-spin");$this.sq_getFocusPages();$this.on("sq_focuspages_loaded",function(){$this.listen();$refresh.removeClass("fa-spin")})});$this.listen=function(){$this.listenScrollbar();$("#sq_wrap").sq_Assistant();$(".sq_circle_label_input").on("change",function(){$this.sq_getFocusPages()});$(".sq_assistant_help ul").show()};$this.on("sq_focuspages_loaded",function(){$(".sq_save_ajax").find("input").on("change",function(){$(this).sq_ajaxCallListen()});$(".sq_save_ajax").find("button").on("click",function(){$(this).sq_ajaxCallListen()})});$this.listen()};$.fn.sq_getFocusPages=function(){var $this=this;var $sid=$.sq_getParam("sid");var $sq_slabels=[];$this.find(".sq_circle_label_input:checked").each(function(){$sq_slabels.push($(this).val())});$this.addClass("sq_minloading");return $.post(sqQuery.ajaxurl,{action:"sq_focuspages_getpage",sid:$sid?$sid:null,slabel:$sq_slabels,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"){$("div.tooltip").hide();$this.find(".sq_focuspages_content").html(response.html);$this.trigger("sq_focuspages_loaded");SQ_DEBUG&&console.log("sq_focuspages_loaded")}else{$("#sq_focuspages").trigger("error.refresh",response)}if(typeof response.error!=="undefined"){$.sq_showMessage(response.error,5e3).addClass("sq_error")}}else{$("#sq_focuspages").trigger("error.refresh",response);SQ_DEBUG&&console.log("no data received")}$this.removeClass("sq_minloading")}).fail(function(error){SQ_DEBUG&&console.log("no data received");$("#sq_focuspages").trigger("error.refresh",error);$this.removeClass("sq_minloading")},"json")};$.fn.sq_inspectURL=function(){var $this=this;$this.find(".modal-body").addClass("sq_loading");$this.find(".modal-body").html("");var post_id=$this.attr("data-post_id");$this.modal("show");$.post(sqQuery.ajaxurl,{action:"sq_focuspages_inspecturl",post_id:post_id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"&&response.html){$this.find(".modal-body").html(response.html)}else{$this.find(".modal-body").html("Page could not load")}if(typeof response.error!=="undefined"){$.sq_showMessage(response.error,5e3).addClass("sq_error")}}$this.find(".modal-body").removeClass("sq_loading")}).fail(function(error){$this.trigger("error.refresh",error);$this.find(".modal-body").removeClass("sq_loading")},"json")};$(document).ready(function(){$("#sq_focuspages").sq_focusPages();$("#sq_focuspages").on("error.refresh",function(){$.sq_showMessage("Couldn't load the data. <span class='sq_refresh' style='color:#f1d432; cursor:pointer;'>Please refresh</span>.",1e4).addClass("sq_error");$(".sq_refresh").on("click",function(){location.reload()})})})})(jQuery);
view/assets/js/research.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";var sqs_script="kr";$(document).keypress(function(event){var keycode=event.keyCode||event.which;if(keycode==13){$(".sqd-submit:visible").trigger("click")}});$.sq_steps=function(step){if(step===2&&$("input[name=sq_input_keyword]").val()===""){$.sq_showMessage("Add a keyword first",2e3);return}$(".sq_step").hide();$(".sq_step"+step).show()};$.fn.sq_getSuggested=function(){var $this=this;var $keywords=$("input[name=sq_input_keyword]").val();var $country=$("select[name=sq_select_country] option:selected").val();$.sq_setCookie("sq_country",$country);if($keywords!==""){$.sq_steps(3);$this.addClass("sq_loading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_others",keyword:$keywords,country:$country,lang:"en",sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_loading");var $count=0;if(typeof response.keywords!=="undefined"&&response.keywords!==null&&response.keywords.length>0){$this.find(".sq_suggested").each(function(){if(typeof response.keywords[$count]!=="undefined"){$(this).html('<input type="checkbox" id="sq_input_keywords'+$count+'" name="sq_input_keywords[]" class="sq_input_keywords custom-control-input" value="'+response.keywords[$count]+'"><label class="custom-control-label" for="sq_input_keywords'+$count+'">'+response.keywords[$count]+"</label>");$count++}else{$(this).hide()}})}else if(typeof response.error!=="undefined"&&response.error==="limit_exceeded"){$this.find(".sq_limit_exceeded").show()}else{$this.find(".sq_research_error").show()}}).fail(function(){$this.removeClass("sq_loading").show();$this.prepend('<div class="text-center text-warning">Squirrly Library loading error. Please contact us at support@squirrly.co</div>')})}else{$(".sq_step2").find(".sq_research_error").show()}};$.fn.sq_getResearch=function($count){var $this=this;$.sq_steps(4);$this.find(".btn").hide();var $loadingdiv=$("div.sq_step4").find(".sq_loading_steps");var $keywords=$("input[name=sq_input_keyword]").val();var $post_id=$("input[name=post_id]").val();var $process=0;var $table=$("div.sq_step4 table");var $country=$("select[name=sq_select_country] option:selected").val();$.sq_setCookie("sq_country",$country);if(typeof $count==="undefined"){$count=10}$("input.sq_input_keywords:checked").each(function(){$keywords+=","+$(this).val()});if($.fn.DataTable.isDataTable($table)){$table.DataTable().destroy();$table.find("tbody").html("");$table.hide();$this.off("sq_research_loaded");$(".sq_research_success").hide();$loadingdiv.hide()}$this.addClass("sq_loading");var $loadingstep=1;$loadingdiv.show();$loadingdiv.find(".sq_loading_step").hide();$loadingdiv.find(".sq_loading_step"+$loadingstep).show();$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_process",keywords:$keywords,country:$country,count:$count,lang:"en",sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){$this.removeClass("sq_loading");$loadingdiv.hide();$.sq_showMessage(response.error,1e4).addClass("sq_error")}else{if(typeof response.id!=="undefined"){$process=response.id}$this.trigger("sq_research_loaded")}},"json");$this.on("sq_research_loaded",function(){if($process){$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_process",id:$process,post_id:$post_id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage(response.error,1e4).addClass("sq_error")}if(typeof response.done!=="undefined"&&response.done&&typeof response.html!=="undefined"){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$table.find("tbody").html(response.html);$table.show();$(".sq_research_success").show();$table.find(".sq_trend:visible").each(function(){$.sq_loadChart($(this))});$table.find(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})});$.extend($.fn.dataTableExt.oSort,{"formatted-value-pre":function(a){return $("<div></div>").append(a).find("span").data("value")},"formatted-value-asc":function(a,b){return a-b},"formatted-value-desc":function(a,b){return b-a},"formatted-num-pre":function(a){return parseInt(a)>0?parseInt(a.replace(/[^\d\-\.]/g,"")):99},"formatted-num-asc":function(a,b){return a-b},"formatted-num-desc":function(a,b){return b-a}});$table.DataTable({columnDefs:[{targets:[5,6],sortable:false},{targets:[2,3],sortable:true,type:"formatted-value"},{targets:[4],sortable:true,type:"formatted-num"}],bPaginate:false,bLengthChange:false,bFilter:true,iDisplayLength:50,fixedColumns:true})}else{$loadingstep++;if($loadingstep<=9){$loadingdiv.find(".sq_loading_step").hide();$loadingdiv.find(".sq_loading_step"+$loadingstep).show()}if($loadingstep>50){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage("Lost connection with the server. Please make sure you whitelisted the IP from https://api.squirrly.co",1e4).addClass("sq_error")}setTimeout(function(){$this.trigger("sq_research_loaded")},5e3)}}).fail(function(){$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$(".sq_research_timeout_error").show()},"json")}else{$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage("Could not start the research on our server. Please check again in a minute.",1e4).addClass("sq_error")}});return $this};$.fn.sq_getHistory=function(){var $this=this;var $id=$this.data("id");var $destination=$($this.data("destination"));if(!$destination.length){if(!$("#history"+$id).length){$destination=$('<tr id="history'+$id+'"></tr>');$this.parents("tr:last").after($destination);$destination.show()}}else{$($destination).remove();return}if($($destination).is(":visible")){$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_history",id:$this.data("id"),sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_minloading");if(typeof response.html!=="undefined"){$destination.html(response.html);$destination.find(".sq_trend:visible").each(function(){$.sq_loadChart($(this))})}$destination.find(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})})}).fail(function(){$this.removeClass("sq_minloading");$destination.html('<td colspan="4" class="col-sm-12 text-center my-3 text-danger">Could not find the records</td>')},"json")}};$(document).ready(function(){$(".sq_history_details").on("click",function(){$(this).sq_getHistory()});$(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})});if($("#sq_briefcaselabels").length){$("#sq_briefcaselabels").find("table.table").DataTable({columnDefs:[{targets:[1],searchable:true,sortable:true},{targets:[0,2,3],sortable:false}],bPaginate:true,bLengthChange:false,bFilter:false,iDisplayLength:10,aaSorting:[1,"desc"],fixedColumns:true})}})})(jQuery);
1
+ if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";var sqs_script="kr";$(document).keypress(function(event){var keycode=event.keyCode||event.which;if(keycode==13){$(".sqd-submit:visible").trigger("click")}});$.sq_steps=function(step){if(step===2&&$("input[name=sq_input_keyword]").val()===""){$.sq_showMessage("Add a keyword first",2e3);return}$(".sq_step").hide();$(".sq_step"+step).show()};$.fn.sq_getSuggested=function(){var $this=this;var $keywords=$("input[name=sq_input_keyword]").val();var $country=$("select[name=sq_select_country] option:selected").val();$.sq_setCookie("sq_country",$country);if($keywords!==""){$.sq_steps(3);$this.addClass("sq_loading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_others",keyword:$keywords,country:$country,lang:"en",sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_loading");var $count=0;if(typeof response.keywords!=="undefined"&&response.keywords!==null&&response.keywords.length>0){$this.find(".sq_suggested").each(function(){if(typeof response.keywords[$count]!=="undefined"){$(this).html('<input type="checkbox" id="sq_input_keywords'+$count+'" name="sq_input_keywords[]" class="sq_input_keywords custom-control-input" value="'+response.keywords[$count]+'"><label class="custom-control-label" for="sq_input_keywords'+$count+'">'+response.keywords[$count]+"</label>");$count++}else{$(this).hide()}})}else if(typeof response.error!=="undefined"&&response.error==="limit_exceeded"){$this.find(".sq_limit_exceeded").show()}else{$this.find(".sq_research_error").show()}}).fail(function(){$this.removeClass("sq_loading").show();$this.prepend('<div class="text-center text-warning">Squirrly Library loading error. Please contact us at support@squirrly.co</div>')})}else{$(".sq_step2").find(".sq_research_error").show()}};$.fn.sq_getResearch=function($count){var $this=this;$.sq_steps(4);$this.find(".btn").hide();var $loadingdiv=$("div.sq_step4").find(".sq_loading_steps");var $keywords=$("input[name=sq_input_keyword]").val();var $post_id=$("input[name=post_id]").val();var $process=0;var $table=$("div.sq_step4 table");var $country=$("select[name=sq_select_country] option:selected").val();$.sq_setCookie("sq_country",$country);if(typeof $count==="undefined"){$count=10}$("input.sq_input_keywords:checked").each(function(){$keywords+=","+$(this).val()});if($.fn.DataTable.isDataTable($table)){$table.DataTable().destroy();$table.find("tbody").html("");$table.hide();$this.off("sq_research_loaded");$(".sq_research_success").hide();$loadingdiv.hide()}$this.addClass("sq_loading");var $loadingstep=1;$loadingdiv.show();$loadingdiv.find(".sq_loading_step").hide();$loadingdiv.find(".sq_loading_step"+$loadingstep).show();$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_process",keywords:$keywords,country:$country,count:$count,lang:"en",sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){$this.removeClass("sq_loading");$loadingdiv.hide();$.sq_showMessage(response.error,1e4).addClass("sq_error")}else{if(typeof response.id!=="undefined"){$process=response.id}$this.trigger("sq_research_loaded")}},"json");$this.on("sq_research_loaded",function(){if($process){$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_process",id:$process,post_id:$post_id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage(response.error,1e4).addClass("sq_error")}if(typeof response.done!=="undefined"&&response.done&&typeof response.html!=="undefined"){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$table.find("tbody").html(response.html);$table.show();$(".sq_research_success").show();$table.find(".sq_trend:visible").each(function(){$.sq_loadChart($(this))});$table.find(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})});$.extend($.fn.dataTableExt.oSort,{"formatted-value-pre":function(a){return $("<div></div>").append(a).find("span").data("value")},"formatted-value-asc":function(a,b){return a-b},"formatted-value-desc":function(a,b){return b-a},"formatted-num-pre":function(a){return parseInt(a)>0?parseInt(a.replace(/[^\d\-\.]/g,"")):99},"formatted-num-asc":function(a,b){return a-b},"formatted-num-desc":function(a,b){return b-a}});$table.DataTable({columnDefs:[{targets:[5,6],sortable:false},{targets:[2,3],sortable:true,type:"formatted-value"},{targets:[4],sortable:true,type:"formatted-num"}],bPaginate:false,bLengthChange:false,bFilter:true,iDisplayLength:50,fixedColumns:true})}else{$loadingstep++;if($loadingstep<=9){$loadingdiv.find(".sq_loading_step").hide();$loadingdiv.find(".sq_loading_step"+$loadingstep).show()}if($loadingstep>50){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage("Lost connection with the server. Please make sure you whitelisted the IP from https://api.squirrly.co",1e4).addClass("sq_error")}setTimeout(function(){$this.trigger("sq_research_loaded")},5e3)}}).fail(function(){$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$(".sq_research_timeout_error").show()},"json")}else{$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage("Could not start the research on our server. Please check again in a minute.",1e4).addClass("sq_error")}});return $this};$.fn.sq_getHistory=function(){var $this=this;var $id=$this.data("id");var $destination=$($this.data("destination"));if(!$destination.length){if(!$("#history"+$id).length){$destination=$('<tr id="history'+$id+'"></tr>');$this.parents("tr:last").after($destination);$destination.show()}}else{$($destination).remove();return}if($($destination).is(":visible")){$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_history",id:$this.data("id"),sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_minloading");if(typeof response.html!=="undefined"){$destination.html(response.html);$destination.find(".sq_trend:visible").each(function(){$.sq_loadChart($(this))})}$destination.find(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})})}).fail(function(){$this.removeClass("sq_minloading");$destination.html('<td colspan="4" class="col-sm-12 text-center my-3 text-danger">Could not find the records</td>')},"json")}};$(document).ready(function(){$(".sq_history_details").on("click",function(){$(this).sq_getHistory()});$(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})})})})(jQuery);