SEO SQUIRRLY™ - Version 11.1.02

Version Description

Download this release

Release Info

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

Code changes from version 11.1.01 to 11.1.02

classes/HookController.php CHANGED
@@ -17,6 +17,7 @@ class SQ_Classes_HookController {
17
  'head' => 'admin_head',
18
  'footer' => 'admin_footer',
19
  'menu' => 'admin_menu',
 
20
  'notices' => 'admin_notices',
21
  );
22
 
17
  'head' => 'admin_head',
18
  'footer' => 'admin_footer',
19
  'menu' => 'admin_menu',
20
+ 'networkMenu' => 'network_admin_menu',
21
  'notices' => 'admin_notices',
22
  );
23
 
classes/helpers/DevKit.php CHANGED
@@ -4,10 +4,12 @@ defined('ABSPATH') || die('Cheatin\' uh?');
4
  class SQ_Classes_Helpers_DevKit {
5
 
6
  public static $plugin;
 
7
  public static $package;
8
 
9
  public function __construct() {
10
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_name') <> '') {
 
11
  if (isset($_SERVER['REQUEST_URI']) && function_exists('get_plugin_data')) {
12
  if (strpos($_SERVER['REQUEST_URI'], '/plugins.php') !== false) {
13
  $data = get_plugin_data(_SQ_ROOT_DIR_ . 'squirrly.php');
@@ -20,7 +22,7 @@ class SQ_Classes_Helpers_DevKit {
20
  }
21
 
22
  //Hook DevKit options
23
- if (SQ_Classes_Helpers_Tools::getOption('sq_api')) {
24
  add_filter('admin_head', array($this, 'hookHead'));
25
  add_filter('sq_menu', array($this, 'manageMenu'));
26
  add_filter('sq_features', array($this, 'manageFeatures'));
@@ -32,6 +34,33 @@ class SQ_Classes_Helpers_DevKit {
32
  }
33
 
34
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  /**
37
  * Customize the Audit task
@@ -40,8 +69,8 @@ class SQ_Classes_Helpers_DevKit {
40
  */
41
  public function getCustomAuditSuccessTask($task) {
42
 
43
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_audit_success')) {
44
- if ($customTask = SQ_Classes_Helpers_Tools::getOption('sq_devkit_audit_success')) {
45
  foreach ($customTask as $key => $value) {
46
  if ($value <> '' || $value === false) {
47
  $task->$key = stripslashes($value);
@@ -60,8 +89,8 @@ class SQ_Classes_Helpers_DevKit {
60
  */
61
  public function getCustomAuditFailTask($task) {
62
 
63
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_audit_fail')) {
64
- if ($customTask = SQ_Classes_Helpers_Tools::getOption('sq_devkit_audit_fail')) {
65
  foreach ($customTask as $key => $value) {
66
  if ($value <> '' || $value === false) {
67
  $task->$key = stripslashes($value);
@@ -83,8 +112,8 @@ class SQ_Classes_Helpers_DevKit {
83
  }
84
 
85
  //Dev Kit images
86
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_logo')) {
87
- echo '<style>.sq_logo{background-image:url("' . SQ_Classes_Helpers_Tools::getOption('sq_devkit_logo') . '") !important;}#sq_blocksnippet .postbox-header h2:before,.toplevel_page_sq_dashboard .wp-menu-image:before{background-image:url("' . SQ_Classes_Helpers_Tools::getOption('sq_devkit_logo') . '") !important;}.components-squirrly-icon img{content:url("' . SQ_Classes_Helpers_Tools::getOption('sq_devkit_logo') . '") !important;}.menu-top.toplevel_page_sq_dashboard .wp-menu-image:before {content: " ";width: 24px !important;height: 24px !important;display: inline-block;vertical-align: middle !important;line-height: inherit;background-repeat: no-repeat;background-position: center;background-size: 100%;}.toplevel_page_sq_dashboard .wp-menu-image img{display: none !important;}</style>';
88
  }
89
  }
90
 
@@ -95,8 +124,8 @@ class SQ_Classes_Helpers_DevKit {
95
  */
96
  public function getCustomLogo($logo) {
97
 
98
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_logo')) {
99
- $logo = SQ_Classes_Helpers_Tools::getOption('sq_devkit_logo');
100
  }
101
 
102
  return $logo;
@@ -109,8 +138,8 @@ class SQ_Classes_Helpers_DevKit {
109
  */
110
  public function getCustomName($name) {
111
 
112
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_name')) {
113
- $name = SQ_Classes_Helpers_Tools::getOption('sq_devkit_name');
114
  }
115
 
116
  return $name;
@@ -123,8 +152,8 @@ class SQ_Classes_Helpers_DevKit {
123
  */
124
  public function getCustomMenuName($name) {
125
 
126
- if (SQ_Classes_Helpers_Tools::getOption('sq_devkit_menu_name')) {
127
- $name = SQ_Classes_Helpers_Tools::getOption('sq_devkit_menu_name');
128
  }
129
 
130
  return $name;
@@ -159,6 +188,18 @@ class SQ_Classes_Helpers_DevKit {
159
  $menu['sq_focuspages']['leftmenu'] = false;
160
  $menu['sq_focuspages']['topmenu'] = false;
161
  }
 
 
 
 
 
 
 
 
 
 
 
 
162
  if (!SQ_Classes_Helpers_Tools::getMenuVisible('show_account_info')) {
163
  $menu['sq_account']['leftmenu'] = false;
164
  $menu['sq_account']['topmenu'] = false;
4
  class SQ_Classes_Helpers_DevKit {
5
 
6
  public static $plugin;
7
+ public static $options;
8
  public static $package;
9
 
10
  public function __construct() {
11
+
12
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_name') <> '') {
13
  if (isset($_SERVER['REQUEST_URI']) && function_exists('get_plugin_data')) {
14
  if (strpos($_SERVER['REQUEST_URI'], '/plugins.php') !== false) {
15
  $data = get_plugin_data(_SQ_ROOT_DIR_ . 'squirrly.php');
22
  }
23
 
24
  //Hook DevKit options
25
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_api')) {
26
  add_filter('admin_head', array($this, 'hookHead'));
27
  add_filter('sq_menu', array($this, 'manageMenu'));
28
  add_filter('sq_features', array($this, 'manageFeatures'));
34
  }
35
 
36
  }
37
+ public static function getOptions() {
38
+ if(is_multisite()) {
39
+ self::$options = json_decode(get_blog_option(get_main_site_id(), SQ_OPTION), true);
40
+ }else{
41
+ self::$options = json_decode(get_option(SQ_OPTION), true);
42
+ }
43
+
44
+ return self::$options;
45
+ }
46
+
47
+
48
+ /**
49
+ * Get the option from database
50
+ * @param $key
51
+ * @return mixed
52
+ */
53
+ public static function getOption($key) {
54
+ if (!isset(self::$options[$key])) {
55
+ self::$options = self::getOptions();
56
+
57
+ if (!isset(self::$options[$key])) {
58
+ self::$options[$key] = false;
59
+ }
60
+ }
61
+
62
+ return self::$options[$key];
63
+ }
64
 
65
  /**
66
  * Customize the Audit task
69
  */
70
  public function getCustomAuditSuccessTask($task) {
71
 
72
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_audit_success')) {
73
+ if ($customTask = SQ_Classes_Helpers_DevKit::getOption('sq_devkit_audit_success')) {
74
  foreach ($customTask as $key => $value) {
75
  if ($value <> '' || $value === false) {
76
  $task->$key = stripslashes($value);
89
  */
90
  public function getCustomAuditFailTask($task) {
91
 
92
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_audit_fail')) {
93
+ if ($customTask = SQ_Classes_Helpers_DevKit::getOption('sq_devkit_audit_fail')) {
94
  foreach ($customTask as $key => $value) {
95
  if ($value <> '' || $value === false) {
96
  $task->$key = stripslashes($value);
112
  }
113
 
114
  //Dev Kit images
115
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_logo')) {
116
+ echo '<style>.sq_logo{background-image:url("' . SQ_Classes_Helpers_DevKit::getOption('sq_devkit_logo') . '") !important;}#sq_blocksnippet .postbox-header h2:before,li.toplevel_page_sq_dashboard .wp-menu-image:before{background-image:url("' . SQ_Classes_Helpers_DevKit::getOption('sq_devkit_logo') . '") !important;}.components-squirrly-icon img{content:url("' . SQ_Classes_Helpers_DevKit::getOption('sq_devkit_logo') . '") !important;}.menu-top.toplevel_page_sq_dashboard .wp-menu-image:before {content: " ";width: 24px !important;height: 24px !important;display: inline-block;vertical-align: middle !important;line-height: inherit;background-repeat: no-repeat;background-position: center;background-size: 100%;}li.toplevel_page_sq_dashboard .wp-menu-image img{display: none !important;}</style>';
117
  }
118
  }
119
 
124
  */
125
  public function getCustomLogo($logo) {
126
 
127
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_logo')) {
128
+ $logo = SQ_Classes_Helpers_DevKit::getOption('sq_devkit_logo');
129
  }
130
 
131
  return $logo;
138
  */
139
  public function getCustomName($name) {
140
 
141
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_name')) {
142
+ $name = SQ_Classes_Helpers_DevKit::getOption('sq_devkit_name');
143
  }
144
 
145
  return $name;
152
  */
153
  public function getCustomMenuName($name) {
154
 
155
+ if (SQ_Classes_Helpers_DevKit::getOption('sq_devkit_menu_name')) {
156
+ $name = SQ_Classes_Helpers_DevKit::getOption('sq_devkit_menu_name');
157
  }
158
 
159
  return $name;
188
  $menu['sq_focuspages']['leftmenu'] = false;
189
  $menu['sq_focuspages']['topmenu'] = false;
190
  }
191
+ if (!SQ_Classes_Helpers_Tools::getMenuVisible('show_bulkseo')) {
192
+ $menu['sq_bulkseo']['leftmenu'] = false;
193
+ $menu['sq_bulkseo']['topmenu'] = false;
194
+ }
195
+ if (!SQ_Classes_Helpers_Tools::getMenuVisible('show_assistant')) {
196
+ $menu['sq_assistant']['leftmenu'] = false;
197
+ $menu['sq_assistant']['topmenu'] = false;
198
+ }
199
+ if (!SQ_Classes_Helpers_Tools::getMenuVisible('show_research')) {
200
+ $menu['sq_research']['leftmenu'] = false;
201
+ $menu['sq_research']['topmenu'] = false;
202
+ }
203
  if (!SQ_Classes_Helpers_Tools::getMenuVisible('show_account_info')) {
204
  $menu['sq_account']['leftmenu'] = false;
205
  $menu['sq_account']['topmenu'] = false;
classes/helpers/Tools.php CHANGED
@@ -356,6 +356,9 @@ class SQ_Classes_Helpers_Tools {
356
  'show_panel' => 1,
357
  'show_tutorial' => 1,
358
  'show_audit' => 1,
 
 
 
359
  'show_rankings' => 1,
360
  'show_focuspages' => 1,
361
  'show_seogoals' => 1,
356
  'show_panel' => 1,
357
  'show_tutorial' => 1,
358
  'show_audit' => 1,
359
+ 'show_assistant' => 1,
360
+ 'show_bulkseo' => 1,
361
+ 'show_research' => 1,
362
  'show_rankings' => 1,
363
  'show_focuspages' => 1,
364
  'show_seogoals' => 1,
controllers/Menu.php CHANGED
@@ -256,6 +256,11 @@ class SQ_Controllers_Menu extends SQ_Classes_FrontController {
256
  $wp_meta_boxes['dashboard']['normal']['core'] = array_merge($ours, $dashboard);
257
  }
258
 
 
 
 
 
 
259
  /**
260
  * Creates the Setting menu in Wordpress
261
  */
256
  $wp_meta_boxes['dashboard']['normal']['core'] = array_merge($ours, $dashboard);
257
  }
258
 
259
+ public function hookNetworkMenu(){
260
+ //Check the Dev Kit settings
261
+ SQ_Classes_ObjController::getClass('SQ_Classes_Helpers_DevKit');
262
+ }
263
+
264
  /**
265
  * Creates the Setting menu in Wordpress
266
  */
controllers/Post.php CHANGED
@@ -50,7 +50,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
50
  SQ_Classes_ObjController::getClass('SQ_Models_Compatibility')->checkWooCommerce();
51
  }
52
 
53
-
54
  //add compatibility for backend
55
  SQ_Classes_ObjController::getClass('SQ_Models_Compatibility')->hookPostEditorBackend();
56
 
50
  SQ_Classes_ObjController::getClass('SQ_Models_Compatibility')->checkWooCommerce();
51
  }
52
 
 
53
  //add compatibility for backend
54
  SQ_Classes_ObjController::getClass('SQ_Models_Compatibility')->hookPostEditorBackend();
55
 
controllers/Research.php CHANGED
@@ -410,17 +410,18 @@ class SQ_Controllers_Research extends SQ_Classes_FrontController {
410
  $args['limit'] = -1;
411
  $briefcase = SQ_Classes_RemoteController::getBriefcase($args);
412
 
413
- $fp = fopen(_SQ_CACHE_DIR_ . 'file.csv', 'w');
414
  foreach ($briefcase->keywords as $row) {
415
- fputcsv($fp, array($row->keyword), ',', '"');
416
  }
417
  fclose($fp);
418
 
419
- header('Content-type: text/csv');
420
- header("Content-Disposition: attachment; filename=squirrly-briefcase-" . gmdate('Y-m-d') . ".csv");
 
421
  header("Pragma: no-cache");
422
  header("Expires: 0");
423
- readfile(_SQ_CACHE_DIR_ . 'file.csv');
424
 
425
  exit();
426
  case 'sq_briefcase_restore':
410
  $args['limit'] = -1;
411
  $briefcase = SQ_Classes_RemoteController::getBriefcase($args);
412
 
413
+ $fp = fopen(_SQ_CACHE_DIR_ . 'file.txt', 'w');
414
  foreach ($briefcase->keywords as $row) {
415
+ fwrite($fp, $row->keyword . PHP_EOL);
416
  }
417
  fclose($fp);
418
 
419
+ header("Content-type: text;");
420
+ header("Content-Encoding: UTF-8");
421
+ header("Content-Disposition: attachment; filename=squirrly-briefcase-" . gmdate('Y-m-d') . ".txt");
422
  header("Pragma: no-cache");
423
  header("Expires: 0");
424
+ readfile(_SQ_CACHE_DIR_ . 'file.txt');
425
 
426
  exit();
427
  case 'sq_briefcase_restore':
models/Compatibility.php CHANGED
@@ -61,29 +61,16 @@ class SQ_Models_Compatibility {
61
  public function isBuilderEditor() {
62
 
63
  if (function_exists('is_user_logged_in') && is_user_logged_in()) {
64
-
65
- //Check the compatibility with builders
66
- //Don't load when on builder editor
67
- //Compatibility with Oxygen Plugin, Elementor, Thrive and more
68
- if ( function_exists( 'is_user_logged_in' ) && is_user_logged_in() ) {
69
- $builder_paramas = array(
70
- 'fl_builder',
71
- 'vcv-action',
72
- 'et_fb',
73
- 'ct_builder',
74
- 'tve',
75
- 'preview',
76
- 'elementor-preview',
77
- 'uxb_iframe',
78
- );
79
-
80
- foreach ( $builder_paramas as $param ) {
81
- if ( SQ_Classes_Helpers_Tools::getValue( $param, false ) ) {
82
- return true;
83
- }
84
  }
85
  }
86
-
87
  }
88
 
89
  return false;
@@ -100,27 +87,35 @@ class SQ_Models_Compatibility {
100
  * Check the compatibility with Oxygen Buider
101
  */
102
  public function checkOxygenBuilder() {
103
- global $post;
104
-
105
 
106
  // if Oxygen is not active, abort.
107
- if (function_exists('oxygen_vsb_current_user_can_access')) {
 
 
 
 
 
108
 
109
- // save global $post to restore later.
110
- $saved_post = $post;
 
111
 
112
- if (!is_null($post)) {
113
- if ($content = get_post_meta($post->ID, 'ct_builder_shortcodes', true)) {
114
- wp_enqueue_script('sq-oxygen-integration', _SQ_ASSETS_URL_ . 'js/oxygen' . (SQ_DEBUG ? '' : '.min') . '.js');
 
 
 
 
 
 
 
 
 
 
115
 
116
- wp_localize_script('sq-oxygen-integration', 'sq_oxygen', array(
117
- 'content' => do_shortcode($content)
118
- ));
119
  }
120
  }
121
-
122
- // restore original global post
123
- $post = $saved_post;
124
  }
125
  }
126
 
@@ -279,7 +274,7 @@ class SQ_Models_Compatibility {
279
  if ($sq_fullscreen) {
280
  if (isset($wp_styles->queue) && !empty($wp_styles->queue)) {
281
  foreach ($wp_styles->queue as $name => $style) {
282
- if(isset($style->src)) {
283
  if ($this->isPluginThemeGlobalStyle($style->src)) {
284
  wp_dequeue_style($name);
285
  }
@@ -289,7 +284,7 @@ class SQ_Models_Compatibility {
289
 
290
  if (isset($wp_styles->registered) && !empty($wp_styles->registered)) {
291
  foreach ($wp_styles->registered as $name => $style) {
292
- if(isset($style->src)) {
293
  if ($this->isPluginThemeGlobalStyle($style->src)) {
294
  wp_deregister_style($name);
295
  }
@@ -299,14 +294,14 @@ class SQ_Models_Compatibility {
299
 
300
  if (isset($wp_scripts->registered) && !empty($wp_scripts->registered)) {
301
  foreach ($wp_scripts->registered as $name => $script) {
302
- if(isset($script->src)) {
303
  if ($this->isPluginThemeGlobalStyle($script->src)) {
304
  wp_deregister_script($name);
305
  }
306
  }
307
  }
308
  }
309
- }else{
310
 
311
  //exclude known plugins that affect the layout in Squirrly SEO
312
  $exclude = array('boostrap',
61
  public function isBuilderEditor() {
62
 
63
  if (function_exists('is_user_logged_in') && is_user_logged_in()) {
64
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('oxygen/functions.php')) {
65
+ if (SQ_Classes_Helpers_Tools::getValue('ct_builder', false) || SQ_Classes_Helpers_Tools::getValue('ct_template', false)) {
66
+ return true;
67
+ }
68
+ }
69
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('elementor/elementor.php')) {
70
+ if (SQ_Classes_Helpers_Tools::getValue('elementor-preview', false)) {
71
+ return true;
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
  }
 
74
  }
75
 
76
  return false;
87
  * Check the compatibility with Oxygen Buider
88
  */
89
  public function checkOxygenBuilder() {
 
 
90
 
91
  // if Oxygen is not active, abort.
92
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('oxygen/functions.php') && function_exists('get_current_screen')) {
93
+ //Only if in Post Editor
94
+ if (get_current_screen()->post_type) {
95
+
96
+ //check the current post type
97
+ $post_type = get_current_screen()->post_type;
98
 
99
+ //Excluded types for SLA and do not load for the Oxygen templates
100
+ $excludes = SQ_Classes_Helpers_Tools::getOption('sq_sla_exclude_post_types');
101
+ if (!in_array($post_type, $excludes) && $post_type <> 'ct_template') {
102
 
103
+ global $post;
104
+
105
+ if (isset($post->ID) && (int)$post->ID > 0) {
106
+
107
+ if ($content = get_post_meta($post->ID, 'ct_builder_shortcodes', true)) {
108
+ wp_enqueue_script('sq-oxygen-integration', _SQ_ASSETS_URL_ . 'js/oxygen' . (SQ_DEBUG ? '' : '.min') . '.js');
109
+
110
+ wp_localize_script('sq-oxygen-integration', 'sq_oxygen', array(
111
+ 'content' => do_shortcode($content)
112
+ ));
113
+ }
114
+
115
+ }
116
 
 
 
 
117
  }
118
  }
 
 
 
119
  }
120
  }
121
 
274
  if ($sq_fullscreen) {
275
  if (isset($wp_styles->queue) && !empty($wp_styles->queue)) {
276
  foreach ($wp_styles->queue as $name => $style) {
277
+ if (isset($style->src)) {
278
  if ($this->isPluginThemeGlobalStyle($style->src)) {
279
  wp_dequeue_style($name);
280
  }
284
 
285
  if (isset($wp_styles->registered) && !empty($wp_styles->registered)) {
286
  foreach ($wp_styles->registered as $name => $style) {
287
+ if (isset($style->src)) {
288
  if ($this->isPluginThemeGlobalStyle($style->src)) {
289
  wp_deregister_style($name);
290
  }
294
 
295
  if (isset($wp_scripts->registered) && !empty($wp_scripts->registered)) {
296
  foreach ($wp_scripts->registered as $name => $script) {
297
+ if (isset($script->src)) {
298
  if ($this->isPluginThemeGlobalStyle($script->src)) {
299
  wp_deregister_script($name);
300
  }
301
  }
302
  }
303
  }
304
+ } else {
305
 
306
  //exclude known plugins that affect the layout in Squirrly SEO
307
  $exclude = array('boostrap',
models/Frontend.php CHANGED
@@ -128,8 +128,10 @@ class SQ_Models_Frontend {
128
 
129
  $buffer = preg_replace('/(<head(\s[^>]*|)>)/si', sprintf("$1\n%s", $header_str) . "\n", $buffer, 1);
130
 
131
- if (SQ_Classes_Helpers_Tools::getOption('sq_external_nofollow') || SQ_Classes_Helpers_Tools::getOption('sq_external_blank')) {
132
- $buffer = $this->fixSEOLinks($buffer);
 
 
133
  }
134
 
135
  unset($header);
@@ -899,7 +901,7 @@ class SQ_Models_Frontend {
899
  $exceptions = SQ_Classes_Helpers_Tools::getOption('sq_external_exception');
900
  if (!empty($exceptions)) {
901
  foreach ($exceptions as $exception) {
902
- if (strpos($exception, $linkdomain) !== false) {
903
  continue 2;
904
  }
905
  }
128
 
129
  $buffer = preg_replace('/(<head(\s[^>]*|)>)/si', sprintf("$1\n%s", $header_str) . "\n", $buffer, 1);
130
 
131
+ if (SQ_Classes_Helpers_Tools::getOption('sq_auto_links')) {
132
+ if (SQ_Classes_Helpers_Tools::getOption('sq_external_nofollow') || SQ_Classes_Helpers_Tools::getOption('sq_external_blank')) {
133
+ $buffer = $this->fixSEOLinks($buffer);
134
+ }
135
  }
136
 
137
  unset($header);
901
  $exceptions = SQ_Classes_Helpers_Tools::getOption('sq_external_exception');
902
  if (!empty($exceptions)) {
903
  foreach ($exceptions as $exception) {
904
+ if (strpos($exception, $linkdomain) !== false || strpos($linkdomain, $exception) !== false) {
905
  continue 2;
906
  }
907
  }
models/focuspages/Nofollow.php CHANGED
@@ -31,6 +31,16 @@ class SQ_Models_Focuspages_Nofollow extends SQ_Models_Abstract_Assistant {
31
  $hlink = str_replace('www.', '', parse_url(home_url(), PHP_URL_HOST));
32
  $slink = str_replace('www.', '', parse_url(site_url(), PHP_URL_HOST));
33
 
 
 
 
 
 
 
 
 
 
 
34
  if ($link <> $hlink && $link <> $slink && strpos($link, '.') !== false) {
35
  $this->_dofollow_links[] = $link;
36
  }
31
  $hlink = str_replace('www.', '', parse_url(home_url(), PHP_URL_HOST));
32
  $slink = str_replace('www.', '', parse_url(site_url(), PHP_URL_HOST));
33
 
34
+ //If it's not an exception link
35
+ $exceptions = SQ_Classes_Helpers_Tools::getOption('sq_external_exception');
36
+ if (!empty($exceptions)) {
37
+ foreach ($exceptions as $exception) {
38
+ if (strpos($exception, $link) !== false) {
39
+ continue 2;
40
+ }
41
+ }
42
+ }
43
+
44
  if ($link <> $hlink && $link <> $slink && strpos($link, '.') !== false) {
45
  $this->_dofollow_links[] = $link;
46
  }
models/services/Analytics.php CHANGED
@@ -14,14 +14,20 @@ class SQ_Models_Services_Analytics extends SQ_Models_Abstract_Seo {
14
  return;
15
  }
16
 
 
17
  if (function_exists('is_user_logged_in') && is_user_logged_in() && !SQ_Classes_Helpers_Tools::getOption('sq_tracking_logged_users')) {
18
  return;
19
  }
20
 
 
 
 
 
 
21
  if (SQ_Classes_Helpers_Tools::getOption('sq_auto_amp') && SQ_Classes_Helpers_Tools::isAMPEndpoint()) {
22
  add_filter('sq_google_analytics', array($this, 'generateGoogleAnalyticsAMP'));
23
  add_filter('sq_google_analytics_amp', array($this, 'packGoogleAnalyticsAMP'));
24
- }else{
25
  add_filter('sq_google_analytics', array($this, 'generateGoogleAnalytics'));
26
  add_filter('sq_google_analytics', array($this, 'packGoogleAnalytics'), 99);
27
  }
14
  return;
15
  }
16
 
17
+ //Do not track the logged users
18
  if (function_exists('is_user_logged_in') && is_user_logged_in() && !SQ_Classes_Helpers_Tools::getOption('sq_tracking_logged_users')) {
19
  return;
20
  }
21
 
22
+ //Do not track Squirrly Crawler
23
+ if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == 'https://www.squirrly.co') {
24
+ return;
25
+ }
26
+
27
  if (SQ_Classes_Helpers_Tools::getOption('sq_auto_amp') && SQ_Classes_Helpers_Tools::isAMPEndpoint()) {
28
  add_filter('sq_google_analytics', array($this, 'generateGoogleAnalyticsAMP'));
29
  add_filter('sq_google_analytics_amp', array($this, 'packGoogleAnalyticsAMP'));
30
+ } else {
31
  add_filter('sq_google_analytics', array($this, 'generateGoogleAnalytics'));
32
  add_filter('sq_google_analytics', array($this, 'packGoogleAnalytics'), 99);
33
  }
models/services/JsonLD.php CHANGED
@@ -367,7 +367,7 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo {
367
  "@type" => "ImageObject",
368
  "url" => $this->_post->sq->og_media,
369
  "height" => 500,
370
- "width" => 700,
371
  );
372
  } else {
373
  $this->_setMedia($markup);
@@ -474,7 +474,7 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo {
474
  }
475
 
476
  if ($videos = $this->getPostVideos()) {
477
- foreach ($videos as $index => $video) {
478
  if ($video['src'] <> '') {
479
  $markup['thumbnailUrl'] = array(
480
  $video['thumbnail']
@@ -520,7 +520,7 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo {
520
  "@type" => "ImageObject",
521
  "url" => $this->_post->sq->og_media,
522
  "height" => 500,
523
- "width" => 700,
524
  );
525
  } else {
526
  $this->_setMedia($markup);
@@ -546,6 +546,8 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo {
546
 
547
  if (isset($this->_post->sq->title)) {
548
  $markup['name'] = $this->cleanText($this->truncate($this->_post->sq->title, 0, $this->_post->sq->jsonld_title_maxlength));
 
 
549
  }
550
 
551
  if (isset($this->_post->sq->description)) {
@@ -561,12 +563,48 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo {
561
  "@type" => "ImageObject",
562
  "url" => $this->_post->sq->og_media,
563
  "height" => 500,
564
- "width" => 700,
565
  );
566
  } else {
567
  $this->_setMedia($markup);
568
  }
569
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
  $markup['author'] = $this->getAuthorMarkup();
571
  $markup['publisher'] = $this->getPublisherMarkup('Organization');
572
 
@@ -1089,7 +1127,7 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo {
1089
  "@type" => "ImageObject",
1090
  "url" => $image['src'],
1091
  "height" => 500,
1092
- "width" => 700,
1093
  );
1094
  if (isset($image['width'])) {
1095
  $markup['image']["width"] = $image['width'];
367
  "@type" => "ImageObject",
368
  "url" => $this->_post->sq->og_media,
369
  "height" => 500,
370
+ "width" => 500,
371
  );
372
  } else {
373
  $this->_setMedia($markup);
474
  }
475
 
476
  if ($videos = $this->getPostVideos()) {
477
+ foreach ($videos as $index => $video) {
478
  if ($video['src'] <> '') {
479
  $markup['thumbnailUrl'] = array(
480
  $video['thumbnail']
520
  "@type" => "ImageObject",
521
  "url" => $this->_post->sq->og_media,
522
  "height" => 500,
523
+ "width" => 500,
524
  );
525
  } else {
526
  $this->_setMedia($markup);
546
 
547
  if (isset($this->_post->sq->title)) {
548
  $markup['name'] = $this->cleanText($this->truncate($this->_post->sq->title, 0, $this->_post->sq->jsonld_title_maxlength));
549
+ $markup['headline'] = $this->cleanText($this->truncate($this->_post->sq->title, 0, $this->_post->sq->jsonld_title_maxlength));
550
+ $markup['keywords'] = $this->cleanText($this->truncate($this->_post->sq->title, 0, $this->_post->sq->jsonld_title_maxlength));
551
  }
552
 
553
  if (isset($this->_post->sq->description)) {
563
  "@type" => "ImageObject",
564
  "url" => $this->_post->sq->og_media,
565
  "height" => 500,
566
+ "width" => 500,
567
  );
568
  } else {
569
  $this->_setMedia($markup);
570
  }
571
 
572
+ $markup['mainEntityOfPage'] = array(
573
+ '@type' => 'WebPage',
574
+ 'url' => $this->_post->url
575
+ );
576
+
577
+ $markup['prepTime'] = 'PT10M';
578
+ $markup['cookTime'] = 'PT20M';
579
+ $markup['totalTime'] = 'PT30M';
580
+ $markup['nutrition'] = array(
581
+ '@type' => 'NutritionInformation',
582
+ 'calories' => '0 calories'
583
+ );
584
+
585
+ if ($this->_post->sq->keywords <> '') {
586
+ $markup['keywords'] = $this->_post->sq->keywords;
587
+ }
588
+
589
+ if ($videos = $this->getPostVideos()) {
590
+ foreach ($videos as $index => $video) {
591
+ if ($video['src'] <> '') {
592
+ $markup['video'] = array(
593
+ "@type" => "VideoObject",
594
+ "embedUrl" => $videos['src'],
595
+ "name" => (isset($markup['name']) ? $markup['name'] : ''),
596
+ "description" => (isset($markup['description']) ? $markup['description'] : ''),
597
+ "thumbnailUrl" => array(
598
+ $video['thumbnail']
599
+ ),
600
+ "height" => 500,
601
+ "width" => 500,
602
+ );
603
+ break;
604
+ }
605
+ }
606
+ }
607
+
608
  $markup['author'] = $this->getAuthorMarkup();
609
  $markup['publisher'] = $this->getPublisherMarkup('Organization');
610
 
1127
  "@type" => "ImageObject",
1128
  "url" => $image['src'],
1129
  "height" => 500,
1130
+ "width" => 500,
1131
  );
1132
  if (isset($image['width'])) {
1133
  $markup['image']["width"] = $image['width'];
models/services/Pixel.php CHANGED
@@ -210,7 +210,7 @@ class SQ_Models_Services_Pixel extends SQ_Models_Abstract_Seo {
210
  $track .= "fbq('" . $event['type'] . "', '" . $event['name'] . "', '" . wp_json_encode($event['params']) . "');";
211
  }
212
 
213
- return sprintf("<script>!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '%s');%s</script><noscript><img height='1' width='1' style='display:none'src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'/></noscript>" . "\n", $codes->facebook_pixel, $track, $codes->facebook_pixel);
214
  }
215
  }
216
 
210
  $track .= "fbq('" . $event['type'] . "', '" . $event['name'] . "', '" . wp_json_encode($event['params']) . "');";
211
  }
212
 
213
+ return sprintf("<script>!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '%s');%s</script><noscript><img height='1' width='1' style='display:none' src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'/></noscript>" . "\n", $codes->facebook_pixel, $track, $codes->facebook_pixel);
214
  }
215
  }
216
 
readme.txt CHANGED
@@ -400,6 +400,56 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
400
  9. Squirrly SEO - Progress & Achievements
401
 
402
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  = 11.1.01 - 04/04/2021 =
404
  Update - Added the option to reactivate the ignored success messages
405
  Update - Make the Local SEO feature more visible while active
400
  9. Squirrly SEO - Progress & Achievements
401
 
402
  == Changelog ==
403
+ = 11.1.02- 04/30/2021 =
404
+ Update - Add the option to import the SEO Snippets from SEO Press (Patterns, SEO METAs, Open Graph, Twitter Card, 301 Redirects, Noindex)
405
+ Update - Add the option to import the Settings from SEO Press (Social Media, JSON-LD, Webmasters)
406
+ Update - Add the option to import the SEO Snippets from Rank Math (Patterns, SEO METAs, Open Graph, Twitter Card, Noindex)
407
+ Update - Add the option to import the Settings from Rank Math (Social Media, JSON-LD, Webmasters)
408
+ Update - Add the option to import the SEO Snippets from SEO FrameWork (SEO METAs, Open Graph, Twitter Card, 301 Redirects, Noindex)
409
+ Update - Add the option to import the SEO Snippets from All In One SEO (Patterns, SEO METAs, Open Graph, Twitter Card, Noindex, Nofollow)
410
+ Update - Add the option to import the Settings from All In One SEO (Social Media, JSON-LD, Webmasters)
411
+ Update - Added import for Profiles & Archives from Yoast SEO plugin
412
+ Update - Added the option to import the WooCommerce SEO from Yoast SEO
413
+ Update - Added the option to import the JSON-LD from Yoast SEO
414
+ Update - Added default Open Graph Image for URLs without Feature Image
415
+ Update - Added default Twitter Card Image for URLs without Twitter Card Image
416
+ Update - Show Primary Category option in JSON-LD only when there are multiple categories selected for a Post/Page
417
+ Update - Breadcrumbs for WooCommerce Post, Products & Custom Posts to get the primary chosen category
418
+ Update - Added MPN, ISBN, EAN (GTIN-13), UPC (GTIN-12), GTIN option for WooCommerce Products
419
+ Update - Load the JSON-LD for each WooCommerce product custom field
420
+ Update - Added Brands select for WooCommerce Products
421
+ Update - Added the Slovenia country in Google Rankings > Settings
422
+ Update - Compatibility with BuddyPress plugin for User Activity page
423
+ Update - Added the 301 Redirect option in SEO Snippet
424
+ Update - Added Patterns support for double and single delimiter like %%title%% and %title% if importing from other SEO Plugins
425
+ Update - Added 2 new patterns for the Products: {{product_price_with_tax}} {{product_brand}}
426
+ Update - Added the patterns {{plural}} and {{single}} for the Custom post Type label
427
+ Updated - Open Graph Support for the WooCommerce products
428
+ Update - Compatibility with ACF plugin to add a custom video URL in sitemap by using the field _sq_video
429
+ Update - Video Schema in JSON-LD to work with embed video or the ACF _sq_video field
430
+ Update - Added archive for custom post type in SEO Automation
431
+ Update - Add compatibility with Oxygen plugin to check the content optimization in backend
432
+ Update - Add URL identification for German language e.g. für => fuer
433
+ Update - Added the default redirect URL in SEO Automation > 404 to redirect the broken URLs when no valid permalink is found
434
+ Update - Make Squirrly highlight the text in WP Bakery, Elementor, Block Editor when using Live Assistant
435
+ Fixed - Add the product sitemap in robots.txt when Ecommerce is detected
436
+ Fixed - Layouts in Squirrly SEO Settings for tiny windows
437
+ Fixed - SLA to remany minimized when no keyword is entered yet
438
+ Fixed - Show Custom Company logo and name for Web Dev Kit in Menu and Admin Toolbar
439
+ Fixed - Show Custom Company logo for the Live Assistant and SEO Snippet
440
+ Fixed - Download remote images multiple times into Media File from Squirrly Bloggin Assistant
441
+ Fixed - Show correct value format in Rankings for Share Counts
442
+ Fixed - Sitemap pagination limit for custom post type to show all the posts and not only a part of them
443
+ Fixed - Load $wp_filesystem through WordPress function
444
+ Fixed - Don't call the post save hook if the Live Assistant is not loading for that Post Type
445
+ Fixed - Corrected the JsonLD priceValidUntil markup to reflect the offer price
446
+ Fixed - Keywords backup limit from Briefcase to backup all the Briefcase keywords
447
+ Fixed - current_user_can when an user has multiple roles with different capabilities and limits
448
+ Fixed - Compatibility with Oxygen Builder to not load Squirrly METAs while editing with Oxygen Bulder
449
+ Fixed - JSON places markup to not show for the Organization
450
+ Fixed - Markup servesCuisine to include multiple cuisine types when separated with comma in JSON-LD Local SEO
451
+ Fixed - "Warning: Constants may only evaluate to scalar values in SQ_ACTIONS"
452
+
453
  = 11.1.01 - 04/04/2021 =
454
  Update - Added the option to reactivate the ignored success messages
455
  Update - Make the Local SEO feature more visible while active
squirrly.php CHANGED
@@ -8,7 +8,7 @@
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.
9
  * Author: Squirrly SEO
10
  * Author URI: https://plugin.squirrly.co
11
- * Version: 11.1.01
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,7 +17,7 @@
17
 
18
  if (!defined('SQ_VERSION')) {
19
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
20
- define('SQ_VERSION', '11.1.01');
21
  //The last stable version
22
  define('SQ_STABLE_VERSION', '11.1.00');
23
  // Call config files
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.
9
  * Author: Squirrly SEO
10
  * Author URI: https://plugin.squirrly.co
11
+ * Version: 11.1.02
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', '11.1.02');
21
  //The last stable version
22
  define('SQ_STABLE_VERSION', '11.1.00');
23
  // Call config files