SEO SQUIRRLY™ - Version 10.1.03

Version Description

  • 07/28/2020 =
  • Update - Added import from SEO Framework in Squirrly SEO
  • Update - Compatibility with SEO Framework
  • Update - Compatibility with Woocommerce plugin (last version)
  • Fix - Small CSS bugs
Download this release

Release Info

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

Code changes from version 10.0.11 to 10.1.03

classes/helpers/Tools.php CHANGED
@@ -124,6 +124,7 @@ class SQ_Classes_Helpers_Tools {
124
  'sq_cloud_connect' => 0,
125
  'sq_cloud_token' => false,
126
  'sq_offer' => false,
 
127
  // dev kit
128
  'sq_devkit_logo' => false,
129
  'sq_devkit_name' => false,
124
  'sq_cloud_connect' => 0,
125
  'sq_cloud_token' => false,
126
  'sq_offer' => false,
127
+ 'sq_alert_overview' => true,
128
  // dev kit
129
  'sq_devkit_logo' => false,
130
  'sq_devkit_name' => false,
config.json CHANGED
@@ -137,6 +137,7 @@
137
  "sq_seosettings_ga_revoke",
138
  "sq_seosettings_gsc_revoke",
139
  "sq_rollback",
 
140
  "sq_ajax_seosettings_save",
141
  "sq_ajax_automation_addpostype",
142
  "sq_ajax_automation_deletepostype",
137
  "sq_seosettings_ga_revoke",
138
  "sq_seosettings_gsc_revoke",
139
  "sq_rollback",
140
+ "sq_alerts_close",
141
  "sq_ajax_seosettings_save",
142
  "sq_ajax_automation_addpostype",
143
  "sq_ajax_automation_deletepostype",
controllers/Frontend.php CHANGED
@@ -30,11 +30,7 @@ class SQ_Controllers_Frontend extends SQ_Classes_FrontController {
30
  add_action('template_redirect', array($this, 'hookBuffer'), 1);
31
 
32
  //Set the post so that Squirrly will know which one to process
33
- if (defined('BP_REQUIRED_PHP_VERSION')) {
34
- add_action('template_redirect', array($this->model, 'setPost'), 10);
35
- } else {
36
- add_action('template_redirect', array($this->model, 'setPost'), 9);
37
- }
38
 
39
  //Check if attachment to image redirect is needed
40
  if (SQ_Classes_Helpers_Tools::getOption('sq_attachment_redirect')) {
30
  add_action('template_redirect', array($this, 'hookBuffer'), 1);
31
 
32
  //Set the post so that Squirrly will know which one to process
33
+ add_action('template_redirect', array($this->model, 'setPost'), 9);
 
 
 
 
34
 
35
  //Check if attachment to image redirect is needed
36
  if (SQ_Classes_Helpers_Tools::getOption('sq_attachment_redirect')) {
controllers/Overview.php CHANGED
@@ -13,11 +13,11 @@ class SQ_Controllers_Overview extends SQ_Classes_FrontController {
13
  $this->checkin = SQ_Classes_RemoteController::checkin();
14
 
15
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('bootstrap-reboot');
16
- if(is_rtl()){
17
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('popper');
18
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('bootstrap.rtl');
19
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl');
20
- }else{
21
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('bootstrap');
22
  }
23
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('fontawesome');
@@ -30,12 +30,36 @@ class SQ_Controllers_Overview extends SQ_Classes_FrontController {
30
 
31
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('assistant');
32
 
33
- add_action('sq_form_notices', array($this,'getNotificationBar'));
 
34
 
35
  //@ob_flush();
36
  parent::init();
37
 
38
  }
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  }
13
  $this->checkin = SQ_Classes_RemoteController::checkin();
14
 
15
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('bootstrap-reboot');
16
+ if (is_rtl()) {
17
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('popper');
18
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('bootstrap.rtl');
19
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl');
20
+ } else {
21
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('bootstrap');
22
  }
23
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('fontawesome');
30
 
31
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('assistant');
32
 
33
+ add_action('sq_form_notices', array($this, 'getNotificationBar'));
34
+ add_action('sq_form_notices', array($this, 'getNotificationCompatibility'));
35
 
36
  //@ob_flush();
37
  parent::init();
38
 
39
  }
40
 
41
+ public function getNotificationCompatibility() {
42
+ if (SQ_Classes_Helpers_Tools::getOption('sq_alert_overview')) {
43
+ add_filter('sq_plugins', array(SQ_Classes_ObjController::getClass('SQ_Models_ImportExport'), 'getActivePlugins'));
44
+ $platforms = apply_filters('sq_importList', false);
45
+ if ($platforms && count((array)$platforms) > 0) {
46
+ foreach ($platforms as $platform => $data) {
47
+ $plugin = SQ_Classes_ObjController::getClass('SQ_Models_ImportExport')->getName($platform);
48
+ ?>
49
+ <div class="sq_offer alert alert-warning text-center m-0 mt-2 p-2">
50
+ <form method="post" class="p-0 m-0">
51
+ <?php SQ_Classes_Helpers_Tools::setNonce('sq_alerts_close', 'sq_nonce'); ?>
52
+ <input type="hidden" name="action" value="sq_alerts_close"/>
53
+ <input type="hidden" name="alert" value="sq_alert_overview"/>
54
+ <button type="submit" class="btn float-right bg-transparent p-0 m-0">x</button>
55
+ </form>
56
+ <?php echo sprintf(__("Detected %s: We encourage you to %sImport the Settings and SEO%s from %s and deactivate %s to increase the page loading speed for better Google ranking.", _SQ_PLUGIN_NAME_), '<strong>' . $plugin . '</strong>', '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'backup') . '" style="font-weight: bold;" >', '</a>', $plugin, $plugin); ?>
57
+ </div>
58
+ <?php
59
+ break;
60
+ }
61
+ }
62
+ }
63
+ }
64
 
65
  }
controllers/SeoSettings.php CHANGED
@@ -33,6 +33,7 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
33
 
34
  if (function_exists('wp_enqueue_media')) {
35
  wp_enqueue_media();
 
36
  }
37
 
38
  //@ob_flush();
@@ -331,7 +332,7 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
331
 
332
 
333
  break;
334
- case "sq_seosettings_ga_revoke":
335
  if (!current_user_can('sq_manage_settings')) {
336
  return;
337
  }
@@ -344,7 +345,7 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
344
  SQ_Classes_Error::setError(__('Error! Could not disconnect the account.', _SQ_PLUGIN_NAME_) . " <br /> ");
345
  }
346
  break;
347
- case "sq_seosettings_gsc_revoke":
348
  if (!current_user_can('sq_manage_settings')) {
349
  return;
350
  }
@@ -515,21 +516,25 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
515
  }
516
 
517
  $platform = SQ_Classes_Helpers_Tools::getValue('sq_import_platform', '');
 
518
  if ($platform <> '') {
519
  $seo = SQ_Classes_ObjController::getClass('SQ_Models_ImportExport')->importDBSeo($platform);
520
  if (!empty($seo)) {
521
  foreach ($seo as $sq_hash => $metas) {
522
- SQ_Classes_ObjController::getClass('SQ_Models_Qss')->saveSqSEO(
523
- (isset($metas['url']) ? $metas['url'] : ''),
524
- $sq_hash,
525
- maybe_serialize(array(
526
- 'ID' => (isset($metas['post_id']) ? (int)$metas['post_id'] : 0),
527
- 'post_type' => (isset($metas['post_type']) ? $metas['post_type'] : ''),
528
- 'term_id' => (isset($metas['term_id']) ? (int)$metas['term_id'] : 0),
529
- 'taxonomy' => (isset($metas['taxonomy']) ? $metas['taxonomy'] : ''),
530
- )),
531
- maybe_serialize($metas),
532
- gmdate('Y-m-d H:i:s'));
 
 
 
533
  }
534
  }
535
 
@@ -558,9 +563,16 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
558
  ]
559
  );
560
  exit();
561
-
 
 
 
 
 
 
 
562
  /**************************** Ajax *******************************************************/
563
- case "sq_ajax_seosettings_save":
564
  SQ_Classes_Helpers_Tools::setHeader('json');
565
  $response = array();
566
  if (!current_user_can('sq_manage_settings')) {
@@ -583,6 +595,75 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
583
 
584
  echo json_encode($response);
585
  exit();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
 
587
  /************************ Automation ********************************************************/
588
  case 'sq_ajax_automation_addpostype':
@@ -621,7 +702,6 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
621
  $response['data'] = SQ_Classes_Error::showNotices(__('Could not add the post type', _SQ_PLUGIN_NAME_), 'sq_error');
622
  echo json_encode($response);
623
  exit();
624
-
625
  case 'sq_ajax_automation_deletepostype':
626
  SQ_Classes_Helpers_Tools::setHeader('json');
627
  $response = array();
@@ -658,78 +738,6 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
658
  echo json_encode($response);
659
  exit();
660
 
661
- case 'sq_ajax_sla_sticky':
662
- SQ_Classes_Helpers_Tools::setHeader('json');
663
-
664
- $response = array();
665
- if (!current_user_can('sq_manage_snippet')) {
666
- $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
667
- echo json_encode($response);
668
- exit();
669
- }
670
-
671
- SQ_Classes_Helpers_Tools::saveUserMeta('sq_auto_sticky', (int)SQ_Classes_Helpers_Tools::getValue('sq_auto_sticky'));
672
- echo json_encode(array());
673
- exit();
674
-
675
- case 'sq_ajax_gsc_code':
676
- SQ_Classes_Helpers_Tools::setHeader('json');
677
-
678
- $response = array();
679
- if (!current_user_can('sq_manage_snippet')) {
680
- $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
681
- echo json_encode($response);
682
- exit();
683
- }
684
-
685
- //remove connection with Google Analytics
686
- $code = SQ_Classes_RemoteController::getGSCToken();
687
-
688
- if (!is_wp_error($code) && $code) {
689
- $response['code'] = SQ_Classes_Helpers_Sanitize::checkGoogleWTCode($code);
690
- } else {
691
- $response['error'] = SQ_Classes_Error::showNotices(__('Error! Could not get the code. Connect to Google Search Console and validate the connection.', _SQ_PLUGIN_NAME_), 'sq_error');
692
- }
693
-
694
- echo json_encode($response);
695
- exit();
696
-
697
- case 'sq_ajax_ga_code':
698
- SQ_Classes_Helpers_Tools::setHeader('json');
699
-
700
- $response = array();
701
- if (!current_user_can('sq_manage_snippet')) {
702
- $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
703
- echo json_encode($response);
704
- exit();
705
- }
706
-
707
- //remove connection with Google Analytics
708
- $code = SQ_Classes_RemoteController::getGAToken();
709
- if (!is_wp_error($code) && $code) {
710
- $response['code'] = $code;
711
- } else {
712
- $response['error'] = SQ_Classes_Error::showNotices(__('Error! Could not get the tracking code. Connect to Google Analytics and get the website tracking code from Admin area.', _SQ_PLUGIN_NAME_), 'sq_error');
713
- }
714
-
715
- echo json_encode($response);
716
- exit();
717
-
718
- case 'sq_ajax_connection_check':
719
- SQ_Classes_Helpers_Tools::setHeader('json');
720
-
721
- $response = array();
722
- if (!current_user_can('sq_manage_snippet')) {
723
- $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
724
- echo json_encode($response);
725
- exit();
726
- }
727
-
728
- //remove connection with Google Analytics
729
- SQ_Classes_RemoteController::checkin();
730
-
731
- echo json_encode(array());
732
- exit();
733
  }
734
 
735
  }
33
 
34
  if (function_exists('wp_enqueue_media')) {
35
  wp_enqueue_media();
36
+ wp_enqueue_style('media-views');
37
  }
38
 
39
  //@ob_flush();
332
 
333
 
334
  break;
335
+ case 'sq_seosettings_ga_revoke':
336
  if (!current_user_can('sq_manage_settings')) {
337
  return;
338
  }
345
  SQ_Classes_Error::setError(__('Error! Could not disconnect the account.', _SQ_PLUGIN_NAME_) . " <br /> ");
346
  }
347
  break;
348
+ case 'sq_seosettings_gsc_revoke':
349
  if (!current_user_can('sq_manage_settings')) {
350
  return;
351
  }
516
  }
517
 
518
  $platform = SQ_Classes_Helpers_Tools::getValue('sq_import_platform', '');
519
+ $overwrite = SQ_Classes_Helpers_Tools::getValue('sq_import_overwrite', false);
520
  if ($platform <> '') {
521
  $seo = SQ_Classes_ObjController::getClass('SQ_Models_ImportExport')->importDBSeo($platform);
522
  if (!empty($seo)) {
523
  foreach ($seo as $sq_hash => $metas) {
524
+ $sq = SQ_Classes_ObjController::getClass('SQ_Models_Qss')->getSqSeo($sq_hash);
525
+ if ($overwrite || !($sq->title && $sq->description)) {
526
+ SQ_Classes_ObjController::getClass('SQ_Models_Qss')->saveSqSEO(
527
+ (isset($metas['url']) ? $metas['url'] : ''),
528
+ $sq_hash,
529
+ maybe_serialize(array(
530
+ 'ID' => (isset($metas['post_id']) ? (int)$metas['post_id'] : 0),
531
+ 'post_type' => (isset($metas['post_type']) ? $metas['post_type'] : ''),
532
+ 'term_id' => (isset($metas['term_id']) ? (int)$metas['term_id'] : 0),
533
+ 'taxonomy' => (isset($metas['taxonomy']) ? $metas['taxonomy'] : ''),
534
+ )),
535
+ maybe_serialize($metas),
536
+ gmdate('Y-m-d H:i:s'));
537
+ }
538
  }
539
  }
540
 
563
  ]
564
  );
565
  exit();
566
+ case 'sq_alerts_close':
567
+ //remove the specified alert from showing again
568
+ if ($alert = SQ_Classes_Helpers_Tools::getValue('alert', false)) {
569
+ if (in_array($alert, array('sq_alert_overview'))) {
570
+ SQ_Classes_Helpers_Tools::saveOptions($alert, false);
571
+ }
572
+ }
573
+ break;
574
  /**************************** Ajax *******************************************************/
575
+ case 'sq_ajax_seosettings_save':
576
  SQ_Classes_Helpers_Tools::setHeader('json');
577
  $response = array();
578
  if (!current_user_can('sq_manage_settings')) {
595
 
596
  echo json_encode($response);
597
  exit();
598
+ case 'sq_ajax_sla_sticky':
599
+ SQ_Classes_Helpers_Tools::setHeader('json');
600
+
601
+ $response = array();
602
+ if (!current_user_can('sq_manage_snippet')) {
603
+ $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
604
+ echo json_encode($response);
605
+ exit();
606
+ }
607
+
608
+ SQ_Classes_Helpers_Tools::saveUserMeta('sq_auto_sticky', (int)SQ_Classes_Helpers_Tools::getValue('sq_auto_sticky'));
609
+ echo json_encode(array());
610
+ exit();
611
+ case 'sq_ajax_gsc_code':
612
+ SQ_Classes_Helpers_Tools::setHeader('json');
613
+
614
+ $response = array();
615
+ if (!current_user_can('sq_manage_snippet')) {
616
+ $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
617
+ echo json_encode($response);
618
+ exit();
619
+ }
620
+
621
+ //remove connection with Google Analytics
622
+ $code = SQ_Classes_RemoteController::getGSCToken();
623
+
624
+ if (!is_wp_error($code) && $code) {
625
+ $response['code'] = SQ_Classes_Helpers_Sanitize::checkGoogleWTCode($code);
626
+ } else {
627
+ $response['error'] = SQ_Classes_Error::showNotices(__('Error! Could not get the code. Connect to Google Search Console and validate the connection.', _SQ_PLUGIN_NAME_), 'sq_error');
628
+ }
629
+
630
+ echo json_encode($response);
631
+ exit();
632
+ case 'sq_ajax_ga_code':
633
+ SQ_Classes_Helpers_Tools::setHeader('json');
634
+
635
+ $response = array();
636
+ if (!current_user_can('sq_manage_snippet')) {
637
+ $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
638
+ echo json_encode($response);
639
+ exit();
640
+ }
641
+
642
+ //remove connection with Google Analytics
643
+ $code = SQ_Classes_RemoteController::getGAToken();
644
+ if (!is_wp_error($code) && $code) {
645
+ $response['code'] = $code;
646
+ } else {
647
+ $response['error'] = SQ_Classes_Error::showNotices(__('Error! Could not get the tracking code. Connect to Google Analytics and get the website tracking code from Admin area.', _SQ_PLUGIN_NAME_), 'sq_error');
648
+ }
649
+
650
+ echo json_encode($response);
651
+ exit();
652
+ case 'sq_ajax_connection_check':
653
+ SQ_Classes_Helpers_Tools::setHeader('json');
654
+
655
+ $response = array();
656
+ if (!current_user_can('sq_manage_snippet')) {
657
+ $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
658
+ echo json_encode($response);
659
+ exit();
660
+ }
661
+
662
+ //remove connection with Google Analytics
663
+ SQ_Classes_RemoteController::checkin();
664
+
665
+ echo json_encode(array());
666
+ exit();
667
 
668
  /************************ Automation ********************************************************/
669
  case 'sq_ajax_automation_addpostype':
702
  $response['data'] = SQ_Classes_Error::showNotices(__('Could not add the post type', _SQ_PLUGIN_NAME_), 'sq_error');
703
  echo json_encode($response);
704
  exit();
 
705
  case 'sq_ajax_automation_deletepostype':
706
  SQ_Classes_Helpers_Tools::setHeader('json');
707
  $response = array();
738
  echo json_encode($response);
739
  exit();
740
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
741
  }
742
 
743
  }
controllers/Snippet.php CHANGED
@@ -28,10 +28,10 @@ class SQ_Controllers_Snippet extends SQ_Classes_FrontController {
28
  * @return mixed
29
  */
30
  public function init() {
31
- if(is_rtl()){
32
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap.rtl', array('trigger' => true, 'media' => 'all'));
33
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl', array('trigger' => true, 'media' => 'all'));
34
- }else{
35
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap', array('trigger' => true, 'media' => 'all'));
36
  }
37
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('fontawesome', array('trigger' => true, 'media' => 'all'));
@@ -186,7 +186,8 @@ class SQ_Controllers_Snippet extends SQ_Classes_FrontController {
186
  if ($this->model->saveSEO($post_id, $term_id, $taxonomy, $post_type)) {
187
  $json['saved'] = $sq_hash;
188
  } else {
189
- $json['error'] = __('Could not save the data', _SQ_PLUGIN_NAME_);
 
190
  }
191
 
192
  if ($this->post = $this->model->getCurrentSnippet($post_id, $term_id, $taxonomy, $post_type)) {
@@ -195,12 +196,7 @@ class SQ_Controllers_Snippet extends SQ_Classes_FrontController {
195
  if (SQ_Classes_Helpers_Tools::isAjax()) {
196
  SQ_Classes_Helpers_Tools::setHeader('json');
197
 
198
- if (SQ_Classes_Helpers_Tools::getValue('sq_debug') !== 'on') {
199
- echo json_encode($json);
200
- } else {
201
- SQ_Debug::dump($json);
202
- }
203
-
204
  exit();
205
  }
206
  break;
28
  * @return mixed
29
  */
30
  public function init() {
31
+ if (is_rtl()) {
32
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap.rtl', array('trigger' => true, 'media' => 'all'));
33
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl', array('trigger' => true, 'media' => 'all'));
34
+ } else {
35
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap', array('trigger' => true, 'media' => 'all'));
36
  }
37
  SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('fontawesome', array('trigger' => true, 'media' => 'all'));
186
  if ($this->model->saveSEO($post_id, $term_id, $taxonomy, $post_type)) {
187
  $json['saved'] = $sq_hash;
188
  } else {
189
+ global $wpdb;
190
+ $json['error'] = sprintf(__('Could not save the snippet. Please check the database table %s integrity.', _SQ_PLUGIN_NAME_), '<strong>' . $wpdb->prefix . _SQ_DB_ . '</strong>');
191
  }
192
 
193
  if ($this->post = $this->model->getCurrentSnippet($post_id, $term_id, $taxonomy, $post_type)) {
196
  if (SQ_Classes_Helpers_Tools::isAjax()) {
197
  SQ_Classes_Helpers_Tools::setHeader('json');
198
 
199
+ echo json_encode($json);
 
 
 
 
 
200
  exit();
201
  }
202
  break;
models/Compatibility.php CHANGED
@@ -6,22 +6,37 @@ class SQ_Models_Compatibility {
6
  * Check compatibility for late loading buffer
7
  */
8
  public function checkCompatibility() {
9
- if (defined('CE_FILE')) { //compatible with other cache plugins
 
10
  add_filter('sq_lateloading', '__return_true');
11
  }
12
 
13
- if (SQ_Classes_Helpers_Tools::isPluginInstalled('hummingbird-performance/wp-hummingbird.php')) { //compatible with hummingbird
 
14
  add_filter('sq_lateloading', '__return_true');
15
  }
16
 
17
- if (SQ_Classes_Helpers_Tools::isPluginInstalled('cachify/cachify.php')) { //compatible with cachify
 
18
  add_filter('sq_lateloading', '__return_true');
19
  }
20
 
 
21
  global $wp_super_cache_late_init;
22
  if (isset($wp_super_cache_late_init) && $wp_super_cache_late_init == 1 && !did_action('init')) {
23
  add_filter('sq_lateloading', '__return_true');
24
  }
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  /**
@@ -35,7 +50,9 @@ class SQ_Models_Compatibility {
35
  'wordfence-global-style', 'ip2location_country_blocker_admin_menu_styles', 'wf-adminbar', 'autoptimize-toolbar',
36
  'yoast-seo-adminbar', 'bbp-admin-css', 'bp-admin-common-css', 'bp-admin-bar', 'elementor-common', 'ithemes-icon-font',
37
  'wordfence-ls-admin-global', 'woocommerce_admin_menu_styles', 'besclwp_cpt_admin_style', 'uabb-notice-settings',
38
- 'besclwp_cpt_admin_script', 'itsec-core-admin-notices', 'sandbox-website', 'flatsome-panel-css'
 
 
39
  );
40
 
41
  foreach ($wp_styles->queue as $key => $queue) {
6
  * Check compatibility for late loading buffer
7
  */
8
  public function checkCompatibility() {
9
+ //compatible with other cache plugins
10
+ if (defined('CE_FILE')) {
11
  add_filter('sq_lateloading', '__return_true');
12
  }
13
 
14
+ //Compatibility with Hummingbird Plugin
15
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('hummingbird-performance/wp-hummingbird.php')) {
16
  add_filter('sq_lateloading', '__return_true');
17
  }
18
 
19
+ //Compatibility with Cachify plugin
20
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('cachify/cachify.php')) {
21
  add_filter('sq_lateloading', '__return_true');
22
  }
23
 
24
+ //Compatibility with WP Super Cache plugin
25
  global $wp_super_cache_late_init;
26
  if (isset($wp_super_cache_late_init) && $wp_super_cache_late_init == 1 && !did_action('init')) {
27
  add_filter('sq_lateloading', '__return_true');
28
  }
29
+
30
+ //Compatibility with Ezoic
31
+ if (SQ_Classes_Helpers_Tools::isPluginInstalled('ezoic-integration/ezoic-integration.php')) {
32
+ remove_all_actions('shutdown');
33
+ }
34
+
35
+ //Compatibility with BuddyPress plugin
36
+ if (defined('BP_REQUIRED_PHP_VERSION')) {
37
+ add_action('template_redirect', array(SQ_Classes_ObjController::getClass('SQ_Models_Frontend'), 'setPost'), 10);
38
+ }
39
+
40
  }
41
 
42
  /**
50
  'wordfence-global-style', 'ip2location_country_blocker_admin_menu_styles', 'wf-adminbar', 'autoptimize-toolbar',
51
  'yoast-seo-adminbar', 'bbp-admin-css', 'bp-admin-common-css', 'bp-admin-bar', 'elementor-common', 'ithemes-icon-font',
52
  'wordfence-ls-admin-global', 'woocommerce_admin_menu_styles', 'besclwp_cpt_admin_style', 'uabb-notice-settings',
53
+ 'besclwp_cpt_admin_script', 'itsec-core-admin-notices', 'sandbox-website', 'flatsome-panel-css','wordfence-global-style','ame-custom-menu-colors',
54
+ 'wordfence-ls-admin-global', 'wordfenceAJAXcss', 'wpf_admin_style', 'wf-adminbar', 'wpf-graphics-admin-style', 'wpr-admin-common',
55
+ 'qubely-bundle','qubely-options'
56
  );
57
 
58
  foreach ($wp_styles->queue as $key => $queue) {
models/ImportExport.php CHANGED
@@ -152,14 +152,19 @@ class SQ_Models_ImportExport {
152
  'nofollow' => '_aioseop_nofollow',
153
  'canonical' => '_aioseop_custom_link',
154
  ),
155
- // 'squirrly-seo' => array(
156
- // 'title' => '_sq_fp_title',
157
- // 'description' => '_sq_fp_description',
158
- // 'keywords' => '_sq_fp_keywords',
159
- // 'canonical' => '_sq_canonical',
160
- // ),
161
- 'quickseo-by-squirrly' => array(),
162
- 'premium-seo-pack' => array(),
 
 
 
 
 
163
  );
164
  $themes = apply_filters('sq_themes', $themes);
165
  $plugins = apply_filters('sq_plugins', $plugins);
@@ -208,6 +213,22 @@ class SQ_Models_ImportExport {
208
  return $found;
209
  }
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  /**
212
  * Rename all the themes name with a hash
213
  */
@@ -310,6 +331,35 @@ class SQ_Models_ImportExport {
310
  }
311
  }
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  if ($platform == 'squirrly-seo') {
314
  if ($options = json_decode(get_option('sq_options'), true)) {
315
  $socials = SQ_Classes_Helpers_Tools::getOption('socials');
@@ -620,6 +670,38 @@ class SQ_Models_ImportExport {
620
  }
621
  return $metas;
622
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
  }
624
 
625
  return $metas;
152
  'nofollow' => '_aioseop_nofollow',
153
  'canonical' => '_aioseop_custom_link',
154
  ),
155
+ 'seo-framework' => array(
156
+ 'title' => '_genesis_title',
157
+ 'description' => '_genesis_description',
158
+ 'noindex' => '_genesis_noindex',
159
+ 'nofollow' => '_genesis_nofollow',
160
+ 'canonical' => '_genesis_canonical_uri',
161
+ 'og_title' => '_open_graph_title',
162
+ 'og_description' => '_open_graph_description',
163
+ 'og_media' => '_social_image_url',
164
+ 'tw_title' => '_twitter_title',
165
+ 'tw_description' => '_twitter_description',
166
+ 'tw_media' => '_social_image_url',
167
+ ),
168
  );
169
  $themes = apply_filters('sq_themes', $themes);
170
  $plugins = apply_filters('sq_plugins', $plugins);
213
  return $found;
214
  }
215
 
216
+ public function getActivePlugins($plugins) {
217
+ $found = array();
218
+
219
+ $all_plugins = get_option('active_plugins');
220
+
221
+ foreach ($all_plugins as $plugin) {
222
+ if (strpos($plugin, '/') !== false) {
223
+ $plugin = substr($plugin, 0, strpos($plugin, '/'));
224
+ }
225
+ if (isset($plugins[$plugin])) {
226
+ $found[$plugin] = $plugins[$plugin];
227
+ }
228
+ }
229
+ return $found;
230
+ }
231
+
232
  /**
233
  * Rename all the themes name with a hash
234
  */
331
  }
332
  }
333
 
334
+ if ($platform == 'seo-framework') {
335
+ if ($options = get_option('autodescription-site-settings')) {
336
+ $jsonld = SQ_Classes_Helpers_Tools::getOption('sq_jsonld');
337
+ $socials = SQ_Classes_Helpers_Tools::getOption('socials');
338
+ $codes = SQ_Classes_Helpers_Tools::getOption('codes');
339
+
340
+ if (isset($options['attachment_redirect_urls'])) {
341
+ SQ_Classes_Helpers_Tools::saveOptions('sq_attachment_redirect', ($options['attachment_redirect_urls'] == 'on'));
342
+ }
343
+
344
+ if (isset($options['facebook_appid']) && $options['facebook_appid'] <> '') $socials['fbadminapp'] = $options['facebook_appid'];
345
+ if (isset($options['facebook_publisher']) && $options['facebook_publisher'] <> '') $socials['facebook_site'] = $options['facebook_publisher'];
346
+ if (isset($options['twitter_site']) && $options['twitter_site'] <> '') $socials['twitter_site'] = $options['twitter_site'];
347
+
348
+ if (isset($options['knowledge_name']) && $options['knowledge_name'] <> '') $jsonld['Organization']['name'] = $options['knowledge_name'];
349
+ if (isset($options['knowledge_logo_url']) && $options['knowledge_logo_url'] <> '') $jsonld['Organization']['logo'] = $options['knowledge_logo_url'];
350
+
351
+ if (isset($options['google_verification']) && $options['google_verification'] <> '') $codes['google_wt'] = $options['google_verification'];
352
+ if (isset($options['bing_verification']) && $options['bing_verification'] <> '') $codes['bing_wt'] = $options['bing_verification'];
353
+ if (isset($options['pint_verification']) && $options['pint_verification'] <> '') $codes['pinterest_verify'] = $options['pint_verification'];
354
+
355
+ SQ_Classes_Helpers_Tools::saveOptions('codes', $codes);
356
+ SQ_Classes_Helpers_Tools::saveOptions('socials', $socials);
357
+ SQ_Classes_Helpers_Tools::saveOptions('sq_jsonld', $jsonld);
358
+
359
+ $imported = true;
360
+ }
361
+ }
362
+
363
  if ($platform == 'squirrly-seo') {
364
  if ($options = json_decode(get_option('sq_options'), true)) {
365
  $socials = SQ_Classes_Helpers_Tools::getOption('socials');
670
  }
671
  return $metas;
672
  }
673
+
674
+ if ($platform == 'seo-framework') {
675
+ if ($options = get_option('autodescription-site-settings')) {
676
+ ///////////////////////////////////////////
677
+ /////////////////////////////FIRST PAGE OPTIMIZATION
678
+ if ((isset($options['homepage_title']) && $options['homepage_title'] <> '') || isset($options['homepage_description']) && $options['homepage_description'] <> '') {
679
+ $url = home_url();
680
+ $post = SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->setHomePage();
681
+
682
+ $post->sq->doseo = 1;
683
+ $post->sq->title = $options['homepage_title'];
684
+ $post->sq->description = $options['homepage_description'];
685
+
686
+ if (isset($options['homepage_social_image_url']) && $options['homepage_social_image_url'] <> '') {
687
+ $post->sq->og_media = $options['homepage_social_image_url'];
688
+ }
689
+
690
+ SQ_Classes_ObjController::getClass('SQ_Models_Qss')->saveSqSEO(
691
+ $url,
692
+ $post->hash,
693
+ maybe_serialize(array(
694
+ 'ID' => 0,
695
+ 'post_type' => 'home',
696
+ 'term_id' => 0,
697
+ 'taxonomy' => '',
698
+ )),
699
+ maybe_serialize($post->sq->toArray()),
700
+ gmdate('Y-m-d H:i:s')
701
+ );
702
+ }
703
+ }
704
+ }
705
  }
706
 
707
  return $metas;
readme.txt CHANGED
@@ -8,14 +8,28 @@ Requires PHP: 5.3
8
  License: GPLv2 or later
9
  Donate link: https://plugin.squirrly.co/wordpress/seo
10
 
11
- Squirrly 2020 is the First-Ever Non-Human SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services.
12
 
13
  == Description ==
14
 
 
 
 
 
15
  A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services.
16
 
 
 
 
 
 
 
17
  Offers the same level of advice as a Human consultant would, yet with greater precision and customization.
18
 
 
 
 
 
19
  Over 300 functionalities for SEO now available when you need them. (if you're using the Non-SEO expert mode: then our A.I. will tell you when you need to use each of them and in which order; so it's not important for you to learn everything if you don't want to).
20
 
21
  I've been interviewed by Startup Valley and <a title="Squirrly Business Products and Digital Assistants" href="https://www.startupvalley.news/uk/squirrly/">talked at length about how we built this A.I. consultant</a> on top of Squirrly's existing SEO features (the likes of which you can only get from SEMrush, Moz, Ahrefs)
@@ -406,7 +420,27 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
406
  Squirrly SEO 10.0.0 it's a big update. We've re-designed the UX and added many new features. If you don't want to change the current experience you have with Squirrly you can remain on the current stable version of Squirrly SEO.
407
 
408
  == Changelog ==
409
- = 10.0.11 - 06/25/2020 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  * Update - Focus Page Words Length check based on Readability algorithm
411
  * Update - Request a new SEO Check on settings changed to make sure the goals are updated every time
412
  * Fixed - Small SEO Check warnings when the communication with Squirrlu Cloud is not working
@@ -692,7 +726,7 @@ Squirrly SEO 10.0.0 it's a big update. We've re-designed the UX and added many n
692
  * Update - Platform SEO task description
693
  * Update - Import Keywords from CSV
694
  * Update - Add the option in SEO Settings > Tracking to load the tracking codes only for visitors
695
- * Fix - Parse error: syntax error, unexpected Sitemaps.php on line 476
696
  * Fix - Responsive assistant view for pads and tiny desktops
697
  * Fix - Keyword in Bulk SEO
698
  * Fix - Don't inport the Journey Date
8
  License: GPLv2 or later
9
  Donate link: https://plugin.squirrly.co/wordpress/seo
10
 
11
+ Upgrade your WordPress with Excellent SEO. Guided by the A.I.-based Private SEO Consultant. All SEO Tools Included for Free.
12
 
13
  == Description ==
14
 
15
+ Upgrade your WordPress with Excellent SEO. Guided by the A.I.-based Private SEO Consultant. All SEO Tools Included for Free.
16
+
17
+ Your search traffic can finally increase and you now have the means to make your Internet Marketing Dreams come true!
18
+
19
  A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services.
20
 
21
+ Squirrly SEO 2020 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
+
25
+ https://www.youtube.com/watch?v=nMCAbRinnMs
26
+
27
  Offers the same level of advice as a Human consultant would, yet with greater precision and customization.
28
 
29
+ https://www.youtube.com/watch?v=m2R2d2Q4Sfk
30
+
31
+ Many success stories appear every single day since we released this: <a title="Squirrly SEO Success for WordPress Users" href="https://www.squirrly.co/successful/">Success Stories from WordPress Users Who Followed Squirrly's Advice.</a>
32
+
33
  Over 300 functionalities for SEO now available when you need them. (if you're using the Non-SEO expert mode: then our A.I. will tell you when you need to use each of them and in which order; so it's not important for you to learn everything if you don't want to).
34
 
35
  I've been interviewed by Startup Valley and <a title="Squirrly Business Products and Digital Assistants" href="https://www.startupvalley.news/uk/squirrly/">talked at length about how we built this A.I. consultant</a> on top of Squirrly's existing SEO features (the likes of which you can only get from SEMrush, Moz, Ahrefs)
420
  Squirrly SEO 10.0.0 it's a big update. We've re-designed the UX and added many new features. If you don't want to change the current experience you have with Squirrly you can remain on the current stable version of Squirrly SEO.
421
 
422
  == Changelog ==
423
+ = 10.1.03 - 07/28/2020 =
424
+ * Update - Added import from SEO Framework in Squirrly SEO
425
+ * Update - Compatibility with SEO Framework
426
+ * Update - Compatibility with Woocommerce plugin (last version)
427
+ * Fix - Small CSS bugs
428
+
429
+ = 10.1.02 - 07/14/2020 =
430
+ * Update - Update Focus Pages Robots report
431
+ * Update - Force SEO Check after the Settings are saved
432
+ * Update - Compatibility with Absolutely Glamorous Custom Admin
433
+ * Update - Compatibility with Admin Menu Editor
434
+ * Update - Compatibility with Flink App Builder
435
+ * Fix - Fix Focus Pages for SEO Image when it contains special chars
436
+ * Fix - Bulk SEO METAs when keywords contain special chars
437
+ * Fix - Show the correct number or words in Focus Pages
438
+ * Fix - Force to load the Media View in Squirrly SEO Settings
439
+
440
+ = 10.0.11 - 06/30/2020 =
441
+ * Update - Official Release of Squirrly SEO Plugin
442
+ * Update - Added Google Egypt in Squirrly > Rankings
443
+ * Update - Squirrly Briefcase Keywords sort
444
  * Update - Focus Page Words Length check based on Readability algorithm
445
  * Update - Request a new SEO Check on settings changed to make sure the goals are updated every time
446
  * Fixed - Small SEO Check warnings when the communication with Squirrlu Cloud is not working
726
  * Update - Platform SEO task description
727
  * Update - Import Keywords from CSV
728
  * Update - Add the option in SEO Settings > Tracking to load the tracking codes only for visitors
729
+ * Fix - Parse error: syntax error, unexpected '::' Sitemaps.php on line 476
730
  * Fix - Responsive assistant view for pads and tiny desktops
731
  * Fix - Keyword in Bulk SEO
732
  * Fix - Don't inport the Journey Date
squirrly.php CHANGED
@@ -3,22 +3,22 @@
3
  * Copyright (c) 2012-2020, 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) - BETA
7
  * Plugin URI: https://wordpress.org/plugins/squirrly-seo/
8
- * Description: SEO By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://cloud.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
9
  * Author: Squirrly SEO
10
  * Author URI: https://plugin.squirrly.co
11
- * Version: 10.0.11
12
- * License: GPLv2 or later
13
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14
  * Text Domain: squirrly-seo
15
  * Domain Path: /languages
16
  */
17
  if (!defined('SQ_VERSION')) {
18
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
19
- define('SQ_VERSION', '10.0.11');
20
  //The last stable version
21
- define('SQ_STABLE_VERSION', '10.0.10');
22
  // Call config files
23
  try {
24
  require_once(dirname(__FILE__) . '/config/config.php');
3
  * Copyright (c) 2012-2020, 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.1.03
12
+ * License: GPLv2 or later
13
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14
  * Text Domain: squirrly-seo
15
  * Domain Path: /languages
16
  */
17
  if (!defined('SQ_VERSION')) {
18
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
19
+ define('SQ_VERSION', '10.1.03');
20
  //The last stable version
21
+ define('SQ_STABLE_VERSION', '10.0.11');
22
  // Call config files
23
  try {
24
  require_once(dirname(__FILE__) . '/config/config.php');
view/Audits/Audits.php CHANGED
@@ -87,7 +87,7 @@
87
  </div>
88
  </div>
89
  </div>
90
- <div id="sq_previewurl_modal" tabindex="-1" class="modal fade" role="dialog">
91
  <div class="modal-dialog modal-lg" style="max-width: 100% !important;">
92
  <div class="modal-content bg-light">
93
  <div class="modal-header">
87
  </div>
88
  </div>
89
  </div>
90
+ <div id="sq_previewurl_modal" tabindex="-1" class="modal" role="dialog">
91
  <div class="modal-dialog modal-lg" style="max-width: 100% !important;">
92
  <div class="modal-content bg-light">
93
  <div class="modal-header">
view/Blocks/SEOIssues.php CHANGED
@@ -35,7 +35,7 @@
35
  <i class="fa fa-times mx-2"></i><?php echo(isset($row['warning']) ? $row['warning'] : '') ?>
36
  </td>
37
  <td style="width: 100px; padding-right: 0!important;">
38
- <div class="modal fade" id="sq_reportdetail<?php echo $index ?>" tabindex="-1" role="dialog" aria-hidden="true">
39
  <div class="modal-dialog modal-lg" role="document">
40
  <div class="modal-content">
41
  <div class="modal-header">
35
  <i class="fa fa-times mx-2"></i><?php echo(isset($row['warning']) ? $row['warning'] : '') ?>
36
  </td>
37
  <td style="width: 100px; padding-right: 0!important;">
38
+ <div class="modal" id="sq_reportdetail<?php echo $index ?>" tabindex="-1" role="dialog" aria-hidden="true">
39
  <div class="modal-dialog modal-lg" role="document">
40
  <div class="modal-content">
41
  <div class="modal-header">
view/Blocks/Snippet.php CHANGED
@@ -1138,5 +1138,8 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
1138
  </div>
1139
 
1140
  <?php
1141
- }
1142
-
 
 
 
1138
  </div>
1139
 
1140
  <?php
1141
+ } ?>
1142
+ <script>
1143
+ var __sq_save_message = "<?php echo __('Saved!', _SQ_PLUGIN_NAME_) ?>";
1144
+ var __sq_error_message = "<?php echo __("Couldn't save your changes. Immunify360 or some other service on your web hosting account interferes with your WordPress. Please contact the hosting provider`s support team", _SQ_PLUGIN_NAME_) ?>";
1145
+ </script>
view/FocusPages/Pagelist.php CHANGED
@@ -84,7 +84,7 @@
84
  </div>
85
  </div>
86
  </div>
87
- <div id="sq_previewurl_modal" tabindex="-1" class="modal fade" role="dialog">
88
  <div class="modal-dialog modal-lg" style="max-width: 100% !important;">
89
  <div class="modal-content bg-light">
90
  <div class="modal-header">
84
  </div>
85
  </div>
86
  </div>
87
+ <div id="sq_previewurl_modal" tabindex="-1" class="modal" role="dialog">
88
  <div class="modal-dialog modal-lg" style="max-width: 100% !important;">
89
  <div class="modal-content bg-light">
90
  <div class="modal-header">
view/Goals/CheckSeo.php CHANGED
@@ -92,7 +92,7 @@ $category_name = apply_filters('sq_page', SQ_Classes_Helpers_Tools::getValue('pa
92
  </div>
93
 
94
  </div>
95
- <div id="sq_loading_modal" tabindex="-1" class="sq_loading_modal modal fade" role="dialog">
96
  <div class="modal-dialog">
97
  <div class="modal-content bg-light">
98
  <div class="modal-header">
@@ -133,7 +133,7 @@ $category_name = apply_filters('sq_page', SQ_Classes_Helpers_Tools::getValue('pa
133
  break;
134
  }
135
  if ($row['completed']) { ?>
136
- <div id="sq_success_modal" tabindex="-1" class="sq_success_modal modal fade" role="dialog">
137
  <div class="modal-dialog">
138
  <div class="modal-content bg-light">
139
  <div class="modal-header">
92
  </div>
93
 
94
  </div>
95
+ <div id="sq_loading_modal" tabindex="-1" class="sq_loading_modal modal" role="dialog">
96
  <div class="modal-dialog">
97
  <div class="modal-content bg-light">
98
  <div class="modal-header">
133
  break;
134
  }
135
  if ($row['completed']) { ?>
136
+ <div id="sq_success_modal" tabindex="-1" class="sq_success_modal modal" role="dialog">
137
  <div class="modal-dialog">
138
  <div class="modal-content bg-light">
139
  <div class="modal-header">
view/Ranking/Rankings.php CHANGED
@@ -347,7 +347,7 @@ echo $view->getScripts();
347
  continue;
348
  }
349
  ?>
350
- <div id="sq_ranking_modal<?php echo $key; ?>" tabindex="-1" class="sq_ranking_modal modal fade" role="dialog">
351
  <div class="modal-dialog">
352
  <div class="modal-content bg-light">
353
  <div class="modal-header">
347
  continue;
348
  }
349
  ?>
350
+ <div id="sq_ranking_modal<?php echo $key; ?>" tabindex="-1" class="sq_ranking_modal modal" role="dialog">
351
  <div class="modal-dialog">
352
  <div class="modal-content bg-light">
353
  <div class="modal-header">
view/Ranking/Settings.php CHANGED
@@ -71,6 +71,7 @@
71
  <option value="dj"><?php _e('Djibouti', _SQ_PLUGIN_NAME_); ?> (http://www.google.dj/)</option>
72
  <option value="com.do"><?php _e('Dominican Republic', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.do/)</option>
73
  <option value="com.ec"><?php _e('Ecuador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ec/)</option>
 
74
  <option value="com.sv"><?php _e('El Salvador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.sv/)</option>
75
  <option value="ee"><?php _e('Estonia', _SQ_PLUGIN_NAME_); ?> (http://www.google.ee/)</option>
76
  <option value="fm"><?php _e('Federated States of Micronesia', _SQ_PLUGIN_NAME_); ?> (http://www.google.fm/)</option>
71
  <option value="dj"><?php _e('Djibouti', _SQ_PLUGIN_NAME_); ?> (http://www.google.dj/)</option>
72
  <option value="com.do"><?php _e('Dominican Republic', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.do/)</option>
73
  <option value="com.ec"><?php _e('Ecuador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ec/)</option>
74
+ <option value="com.eg"><?php _e('Egypt', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.eg/)</option>
75
  <option value="com.sv"><?php _e('El Salvador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.sv/)</option>
76
  <option value="ee"><?php _e('Estonia', _SQ_PLUGIN_NAME_); ?> (http://www.google.ee/)</option>
77
  <option value="fm"><?php _e('Federated States of Micronesia', _SQ_PLUGIN_NAME_); ?> (http://www.google.fm/)</option>
view/Research/Briefcase.php CHANGED
@@ -68,7 +68,7 @@
68
  </select>
69
  <button class="sq_bulk_submit btn btn-sm btn-success"><?php _e('Apply'); ?></button>
70
 
71
- <div id="sq_label_manage_popup_bulk" tabindex="-1" class="sq_label_manage_popup modal fade" role="dialog">
72
  <div class="modal-dialog" style="width: 600px;">
73
  <div class="modal-content bg-light">
74
  <div class="modal-header">
@@ -240,7 +240,7 @@
240
  </table>
241
 
242
  <?php foreach ($view->keywords as $key => $row) { ?>
243
- <div id="sq_kr_research<?php echo $key; ?>" tabindex="-1" class="sq_kr_research modal fade" role="dialog">
244
  <div class="modal-dialog">
245
  <div class="modal-content bg-light">
246
  <div class="modal-header">
@@ -312,7 +312,7 @@
312
  </div>
313
  </div>
314
  </div>
315
- <div id="sq_label_manage_popup<?php echo $key ?>" tabindex="-1" class="sq_label_manage_popup modal fade" role="dialog">
316
  <div class="modal-dialog" style="width: 600px;">
317
  <div class="modal-content bg-light">
318
  <div class="modal-header">
@@ -394,7 +394,7 @@
394
  <div>
395
  <button type="button" class="btn rounded-0 btn-success my-1 px-2 mx-2" style="min-width: 175px" onclick="jQuery('.sq_briefcase_restore_dialog').modal('show')" data-dismiss="modal"><?php _e('Import Keywords', _SQ_PLUGIN_NAME_); ?></button>
396
  </div>
397
- <div class="sq_briefcase_restore_dialog modal fade" tabindex="-1" role="dialog">
398
  <div class="modal-dialog modal-lg">
399
  <div class="modal-content bg-light">
400
  <div class="modal-header">
68
  </select>
69
  <button class="sq_bulk_submit btn btn-sm btn-success"><?php _e('Apply'); ?></button>
70
 
71
+ <div id="sq_label_manage_popup_bulk" tabindex="-1" class="sq_label_manage_popup modal" role="dialog">
72
  <div class="modal-dialog" style="width: 600px;">
73
  <div class="modal-content bg-light">
74
  <div class="modal-header">
240
  </table>
241
 
242
  <?php foreach ($view->keywords as $key => $row) { ?>
243
+ <div id="sq_kr_research<?php echo $key; ?>" tabindex="-1" class="sq_kr_research modal" role="dialog">
244
  <div class="modal-dialog">
245
  <div class="modal-content bg-light">
246
  <div class="modal-header">
312
  </div>
313
  </div>
314
  </div>
315
+ <div id="sq_label_manage_popup<?php echo $key ?>" tabindex="-1" class="sq_label_manage_popup modal" role="dialog">
316
  <div class="modal-dialog" style="width: 600px;">
317
  <div class="modal-content bg-light">
318
  <div class="modal-header">
394
  <div>
395
  <button type="button" class="btn rounded-0 btn-success my-1 px-2 mx-2" style="min-width: 175px" onclick="jQuery('.sq_briefcase_restore_dialog').modal('show')" data-dismiss="modal"><?php _e('Import Keywords', _SQ_PLUGIN_NAME_); ?></button>
396
  </div>
397
+ <div class="sq_briefcase_restore_dialog modal" tabindex="-1" role="dialog">
398
  <div class="modal-dialog modal-lg">
399
  <div class="modal-content bg-light">
400
  <div class="modal-header">
view/Research/Labels.php CHANGED
@@ -20,7 +20,7 @@
20
  <?php do_action('sq_subscription_notices'); ?>
21
 
22
  <button class="btn btn-lg btn-warning text-white col-sm-3 ml-3" onclick="jQuery('.sq_add_labels_dialog').modal('show')" data-dismiss="modal"><i class="fa fa-plus-square-o"></i> <?php _e('Add new Label', _SQ_PLUGIN_NAME_); ?></button>
23
- <div class="sq_add_labels_dialog modal fade" tabindex="-1" role="dialog">
24
  <div class="modal-dialog">
25
  <div class="modal-content bg-light">
26
  <div class="modal-header">
@@ -46,7 +46,7 @@
46
  </div>
47
  </div>
48
  </div>
49
- <div class="sq_edit_label_dialog modal fade" tabindex="-1" role="dialog">
50
  <div class="modal-dialog">
51
  <div class="modal-content bg-light">
52
  <div class="modal-header">
20
  <?php do_action('sq_subscription_notices'); ?>
21
 
22
  <button class="btn btn-lg btn-warning text-white col-sm-3 ml-3" onclick="jQuery('.sq_add_labels_dialog').modal('show')" data-dismiss="modal"><i class="fa fa-plus-square-o"></i> <?php _e('Add new Label', _SQ_PLUGIN_NAME_); ?></button>
23
+ <div class="sq_add_labels_dialog modal" tabindex="-1" role="dialog">
24
  <div class="modal-dialog">
25
  <div class="modal-content bg-light">
26
  <div class="modal-header">
46
  </div>
47
  </div>
48
  </div>
49
+ <div class="sq_edit_label_dialog modal" tabindex="-1" role="dialog">
50
  <div class="modal-dialog">
51
  <div class="modal-content bg-light">
52
  <div class="modal-header">
view/SeoSettings/Backup.php CHANGED
@@ -42,6 +42,7 @@
42
  <div class="col-sm-4 p-0 pr-3">
43
  <div class="font-weight-bold"><?php _e('Import Settings From', _SQ_PLUGIN_NAME_); ?>:</div>
44
  <div class="small text-black-50"><?php echo __('Select the plugin or theme you want to import the Settings from.', _SQ_PLUGIN_NAME_); ?></div>
 
45
  </div>
46
  <div class="col-sm-8 p-0 input-group">
47
  <?php
@@ -70,6 +71,7 @@
70
  <div class="col-sm-4 p-0 pr-3">
71
  <div class="font-weight-bold"><?php _e('Import SEO From', _SQ_PLUGIN_NAME_); ?>:</div>
72
  <div class="small text-black-50"><?php echo __('Select the plugin or theme you want to import the SEO settings from.', _SQ_PLUGIN_NAME_); ?></div>
 
73
  </div>
74
  <div class="col-sm-8 p-0 input-group">
75
  <?php
42
  <div class="col-sm-4 p-0 pr-3">
43
  <div class="font-weight-bold"><?php _e('Import Settings From', _SQ_PLUGIN_NAME_); ?>:</div>
44
  <div class="small text-black-50"><?php echo __('Select the plugin or theme you want to import the Settings from.', _SQ_PLUGIN_NAME_); ?></div>
45
+ <div class="small text-danger"><?php _e("Note! It will overwrite the settings you set in Squirrly SEO.", _SQ_PLUGIN_NAME_); ?></div>
46
  </div>
47
  <div class="col-sm-8 p-0 input-group">
48
  <?php
71
  <div class="col-sm-4 p-0 pr-3">
72
  <div class="font-weight-bold"><?php _e('Import SEO From', _SQ_PLUGIN_NAME_); ?>:</div>
73
  <div class="small text-black-50"><?php echo __('Select the plugin or theme you want to import the SEO settings from.', _SQ_PLUGIN_NAME_); ?></div>
74
+ <div class="small text-danger"><?php _e("Note! It will import only the SEO for the pages that were not yet optimized with Squirrly SEO.", _SQ_PLUGIN_NAME_); ?></div>
75
  </div>
76
  <div class="col-sm-8 p-0 input-group">
77
  <?php
view/SeoSettings/Social.php CHANGED
@@ -51,7 +51,7 @@
51
  </div>
52
  </div>
53
  </div>
54
- <div class="col-sm-12 py-4 border-bottom tab-panel sq_advanced">
55
 
56
  <div class="col-sm-12 row py-2 mx-0 my-3 ">
57
  <div class="col-sm-4 p-1 pr-3">
@@ -203,7 +203,7 @@
203
  </div>
204
  </div>
205
 
206
- <div class="col-sm-12 row py-2 mx-0 my-3 sq_advanced">
207
  <div class="col-sm-4 p-0 pr-3 font-weight-bold">
208
  <?php _e('Facebook App ID', _SQ_PLUGIN_NAME_); ?>:
209
  <div class="small text-black-50 my-1"><?php echo sprintf(__('Add the %sFacebook App ID%s to create a connection between your Facebook Page and your Website.', _SQ_PLUGIN_NAME_), '<a href="https://developers.facebook.com/apps/" target="_blank"><strong>', '</strong></a>'); ?></div>
51
  </div>
52
  </div>
53
  </div>
54
+ <div class="col-sm-12 py-4 border-bottom tab-panel">
55
 
56
  <div class="col-sm-12 row py-2 mx-0 my-3 ">
57
  <div class="col-sm-4 p-1 pr-3">
203
  </div>
204
  </div>
205
 
206
+ <div class="col-sm-12 row py-2 mx-0 my-3 ">
207
  <div class="col-sm-4 p-0 pr-3 font-weight-bold">
208
  <?php _e('Facebook App ID', _SQ_PLUGIN_NAME_); ?>:
209
  <div class="small text-black-50 my-1"><?php echo sprintf(__('Add the %sFacebook App ID%s to create a connection between your Facebook Page and your Website.', _SQ_PLUGIN_NAME_), '<a href="https://developers.facebook.com/apps/" target="_blank"><strong>', '</strong></a>'); ?></div>
view/assets/css/global.min.css CHANGED
@@ -1 +1 @@
1
- @import 'logo.min.css';@-webkit-keyframes play{0%{background-position:0}to{background-position:-400px}}@-moz-keyframes play{0%{background-position:0}to{background-position:-400px}}@-ms-keyframes play{0%{background-position:0}to{background-position:-400px}}@-o-keyframes play{0%{background-position:0}to{background-position:-400px}}@keyframes play{0%{background-position:0}to{background-position:-400px}}@font-face{font-family:'FontAwesome';src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.3.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.3.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.3.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}svg>g>g:last-child{pointer-events:none}#update-nag,.et-core-modal,.notice-error,.notice-warning,.notice:not(.sq_notice),.poopy_affiliates,.screen-meta-toggle,.show-settings,.toolbar-header,.update-nag,.updated,div.error,div.fs-notice.promotion,div.fs-notice.success,div.fs-notice.updated{display:none!important}#wpbody-content{float:none!important}#wpfooter{display:none}#wpwrap{background:#fff!important}#sq_wrap.sq_overview .sq_offer{width:auto;margin:15px 20px!important}body{font-family:'Open Sans',Arial,Helvetica,sans-serif;font-size:14px;background-color:#fff}.sq_separator{display:block;clear:both;border-bottom:1px dashed #ddd!important;width:90%;height:3px;margin:2px auto}#wpcontent{padding:0}#wpcontent .bg-light{background-color:#fdfdfd!important}#wpcontent .bg-briefcase{background-color:#e1f5e3!important}#wpcontent .content{min-width:600px;max-width:1020px;margin:auto}#wpcontent h3{font-weight:400;line-height:50px}#wpcontent .card .card-title{margin:0;color:#4f1440;font-weight:400}#wpcontent .sq_deactivated{position:relative}#wpcontent .sq_deactivated:before{content:" ";position:absolute;height:calc(100% + 20px);width:100%;background:#f1f1f1;opacity:.7;top:-10px;z-index:1000;cursor:pointer;border-radius:6px}#wpcontent .sq_deactivated_label{position:absolute!important;z-index:1001;right:0}.sq_fixed{position:fixed;z-index:100;top:32px;left:0;margin:0;border-top:2px solid #fff;border-bottom:2px solid #fff}.sq_alert{top:32px;font-size:16px;z-index:999999}.sq_notice{top:28px;text-align:center;width:100%}.sq_notice.sq_notice>div{display:block;margin:0!important;width:100%!important;line-height:40px;background-color:#fafad2}.sq_notice.sq_notice>div.sq_success{background-color:#20bc49}.sq_notices{font-size:13px;color:#555}.sq_error,.sq_success{text-align:center;font-weight:700}.sq_error{background-color:#bf4733!important;color:#fff!important;font-size:15px}.sq_success{background-color:#20bc49!important;line-height:30px;font-size:16px;color:#fff}.sq_success a{color:#4f47be;text-decoration:none}.sq_deactivated{opacity:.3}button.hide_advanced,button.show_advanced{color:#2183d6!important}#wpcontent .sq_flex{min-width:740px}#sq_wrap .small{font-size:12px;line-height:20px}#sq_wrap .sq_nav{flex:0 0 225px}#sq_wrap .row>div.input-group{display:flex!important}#sq_wrap .row{float:none!important;width:auto!important}#sq_wrap .btn-primary{background-color:#2680b4!important;border-color:transparent}#sq_wrap .btn-primary:hover,#sq_wrap .btn-social{background-color:#2674a7!important;border-color:transparent}#sq_wrap .btn-social{background-color:#e4eef3!important}#sq_wrap .btn{border-radius:0}#sq_wrap .input-group>button.btn,#sq_wrap .input-group>input{max-height:47px}#sq_wrap .bg-title{margin:2px;background-color:#f8f9fa!important;color:#505663!important}#sq_wrap .bg-light{background-color:#fdfdfd!important}#sq_wrap .bg-google{background-color:#e37400!important;color:#fff!important}#sq_wrap .bg-googlesc{background-color:#455a64!important;color:#fff!important}#sq_wrap .bg-primary{background-color:#2680b4!important;color:#fff!important}#sq_wrap .bg-warning{background-color:#f7681a!important;color:#fff!important}#sq_wrap .sq_imageselect{font-size:14px}a.btn-green,button.btn-green{color:#fff;background-color:#28a745!important;border-color:#28a745!important}a.btn-green:hover,button.btn-green:hover{color:#fff;background-color:#259343!important;border-color:#259343!important}a.btn-success,button.btn-success{color:#fff;background-color:#589ee4!important;border-color:transparent}a.btn-success:hover,button.btn-success:hover{color:#fff;background-color:#598dd3!important;border-color:transparent}a.btn-success:active,button.btn-success:active{color:#fff;background-color:#5a80c7!important;border-color:transparent}#sq_wrap table.dataTable{border-collapse:collapse!important}#sq_wrap .table thead th{white-space:nowrap!important}#sq_wrap .table thead{background-color:#e5edf3!important;text-shadow:1px 1px #fbfbfb}#sq_wrap .table-hover tbody tr:hover{background-color:#f1f1f1!important}#sq_wrap .table thead tr:hover{background-color:transparent!important}#sq_wrap .table-striped tbody tr:nth-of-type(odd){background-color:rgba(151,147,147,.05)}#sq_wrap .table-striped tbody tr.even{background-color:#fff}#sq_wrap .text-link{color:#2680b4!important}#sq_wrap .sq_row{position:relative;flex:1 1 auto}#sq_wrap .sq_col_side{flex:0 0 300px}#sq_wrap button.btn-success{color:#fff;background-color:#589ee4;border-color:transparent}#sq_wrap button.btn-success:hover{background-color:#4c81bd}#sq_wrap .btn-primary:not(:disabled):not(.disabled).active,#sq_wrap .btn-primary:not(:disabled):not(.disabled):active,#sq_wrap .show>.btn-primary.dropdown-toggle{background-color:#2777aa!important}#sq_wrap .btn-warning{background-color:#f2ca4c!important;border-color:transparent}#sq_wrap .btn-warning:hover{background-color:#e6be4b!important;border-color:transparent}#sq_wrap .bg-cta{background-color:#694861!important}#sq_wrap a:not(.btn):not(.sq-btn):not(.sq-nav-link){color:#f16112;text-decoration:none}#sq_wrap a:not(.btn):not(.sq-btn):not(.sq-nav-link):hover{color:#f14644}#sq_wrap h4 .fa:before{margin-right:3px}.wp-admin #sq_wrap select{padding:.375em .75em;line-height:1.5;height:calc(2.25em + 2px);vertical-align:middle;background-color:#e5f5dd;max-width:100%;max-height:100%;min-width:120px}.wp-admin #sq_seosettings_bulkseo select{height:calc(2.55em + 2px)}.wp-admin #sq_wrap select.bg-input{height:calc(2.875em + 2px);padding:.5em 1em;font-size:1.25em;line-height:1.5;border-radius:.3em;background-color:#e5f5dd}.wp-admin #sq_wrap input[type=text]:not(.wp-color-picker),.wp-admin #sq_wrap textarea{background-color:#e5f5dd;padding:.88em .75em}.sq_icons_content{float:left;background-color:#fffcfc;background-image:linear-gradient(90deg,#e6ecf1,#f8f9fa);margin:-7px;height:100%;min-height:121px;min-width:100px}.sq_icons{float:left;width:40px;height:40px}.sq_icons_small{display:block;float:left;margin:0 10px 0 0;height:30px;width:30px}.sq_kr_icon{background:url(../img/logos/kr_92.png) no-repeat;background-size:100%}.sq_krfound_icon{background:url(../img/logos/briefcase_92.png) no-repeat;background-size:100%}.sq_audits_icon{background:url(../img/logos/audit_92.png) no-repeat;background-size:100%}.sq_automation_icon{background:url(../img/logos/automation_92.png) no-repeat;background-size:100%}.sq_briefcase_icon{background:url(../img/logos/briefcase_92.png) no-repeat;background-size:100%}.sq_labels_icon{background:url(../img/logos/labels_92.png) no-repeat;background-size:100%}.sq_suggested_icon{background:url(../img/logos/suggested_92.png) no-repeat;background-size:100%}.sq_history_icon{background:url(../img/logos/history_92.png) no-repeat;background-size:100%}.sq_audit_icon{background:url(../img/logos/audit_92.png) no-repeat;background-size:100%}.sq_rankings_icon,.sq_ranks_icon{background:url(../img/logos/ranking_92.png) no-repeat;background-size:100%}.sq_sla_icon{background:url(../img/logos/sla_92.png) no-repeat;background-size:100%}.sq_focuspages_icon{background:url(../img/logos/focuspages_92.png) no-repeat;background-size:100%}.sq_bulkseo_icon{background:url(../img/logos/bulkseo_92.png) no-repeat;background-size:100%}.sq_boostpages_icon{background:url(../img/logos/boostpages_92.png) no-repeat;background-size:100%}.sq_addpage_icon{background:url(../img/logos/addpage_92.png) no-repeat;background-size:100%}.sq_settings_icon{background:url(../img/logos/settings_92.png) no-repeat;background-size:100%}.sq_squirrly_icon{background:url(../img/logos/squirrly.png) no-repeat;background-size:100%;height:48px;filter:none;-webkit-filter:none}.sq_book_icon{background:url(../img/logos/book_92.png) no-repeat;background-size:100%}.sq_stats_icon{background:url(../img/logos/stats_92.png) no-repeat;background-size:100%}.sq_favicon_icon{background:url(../img/logos/favicon_92.png) no-repeat;background-size:100%}.sq_jsonld_icon{background:url(../img/logos/jsonld_92.png) no-repeat;background-size:100%}.sq_metas_icon{background:url(../img/logos/metas_92.png) no-repeat;background-size:100%}.sq_robots_icon{background:url(../img/logos/robots_92.png) no-repeat;background-size:100%}.sq_social_icon{background:url(../img/logos/social_92.png) no-repeat;background-size:100%}.sq_sitemap_icon{background:url(../img/logos/sitemap_92.png) no-repeat;background-size:100%}.sq_traffic_icon{background:url(../img/logos/traffic_92.png) no-repeat;background-size:100%}.sq_websites_icon{background:url(../img/logos/websites_92.png) no-repeat;background-size:100%}#sq_wrap .page-item.active .page-link{background-color:#bde2f1;border-color:transparent}#sq_preloader{position:absolute;height:100%;width:100%;z-index:1000;background-color:#fff!important;opacity:.5}.sq_loading{height:60px;background:url(../img/loading.gif) no-repeat center!important}.sq_minloading{position:relative;opacity:.5}.sq_minloading:after{position:absolute!important;right:calc(50% - 10px)!important;top:calc(50% - 8px)!important;display:block!important;float:right!important;line-height:30px!important;content:""!important;padding:0!important;margin:0 0 0 5px!important;height:16px!important;width:20px!important;background:url(../img/minloading.png) no-repeat!important;-webkit-animation:play 1s steps(10) infinite;-moz-animation:play 1s steps(10) infinite;-o-animation:play 1s steps(10) infinite;animation:play 1s steps(10) infinite}#sq_wrap .sq_sm_menu{width:24px;position:relative}#sq_wrap .sq_sm_menu .fa-ellipsis-v{font-size:18px!important;color:#2680b4}#sq_wrap .sq_sm_menu .sm_icon_button{display:inline-block;position:relative;width:24px;height:24px;box-sizing:border-box;font-size:18px;color:#545454;text-align:center;cursor:pointer}#sq_wrap table tr div.sq_sm_menu:hover .sq_sm_dropdown,#sq_wrap table tr:hover .sq_sm_menu{display:block}#sq_wrap .sq_sm_menu .sq_sm_dropdown{display:none;background:#fff;position:absolute;right:20px;top:0;z-index:100;min-width:200px;box-shadow:0 0 10px 1px #999}#sq_wrap .sq_sm_menu .sq_icons_small{display:inline-block;margin:0 5px;height:17px;width:17px;vertical-align:middle;float:none}#sq_wrap .sq_sm_menu .sq_sm_dropdown li,#sq_wrap .sq_sm_menu .sq_sm_dropdown li a,#sq_wrap .sq_sm_menu .sq_sm_dropdown li button{font-size:13px;cursor:pointer}#sq_wrap .sq_help_toolbar{position:absolute;right:15px}#sq_wrap .sq_help_toolbar>i{font-size:27px!important;color:#f3dc68;cursor:pointer}#sq_wrap .sq_help_question i{font-size:24px!important;margin:10px}.fa-book-open:before{content:"\f518"}.flexcroll{scrollbar-face-color:#367cd2;scrollbar-shadow-color:#fff;scrollbar-highlight-color:#fff;scrollbar-3dlight-color:#fff;scrollbar-darkshadow-color:#fff;scrollbar-track-color:#fff;scrollbar-arrow-color:#fff}.flexcroll::-webkit-scrollbar{width:12px}.flexcroll::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px}.flexcroll::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgba(171,171,171,.8)}.form-group input.form-control,.form-group select.form-control,.form-group textarea.form-control{width:100%}.tooltip .arrow{left:auto!important;margin-left:inherit!important;bottom:inherit!important;z-index:inherit!important}.tooltip .arrow:after{content:""}.fade.in{opacity:1}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-backdrop .fade .in,.modal-backdrop.fade{opacity:.5!important}@media only screen and (max-width:960px){#sq_wrap{margin:0 0 0 35px}}
1
+ @import 'logo.min.css';@-webkit-keyframes play{0%{background-position:0}to{background-position:-400px}}@-moz-keyframes play{0%{background-position:0}to{background-position:-400px}}@-ms-keyframes play{0%{background-position:0}to{background-position:-400px}}@-o-keyframes play{0%{background-position:0}to{background-position:-400px}}@keyframes play{0%{background-position:0}to{background-position:-400px}}@font-face{font-family:'FontAwesome';src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.3.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.3.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.3.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}@media (prefers-reduced-motion:reduce){.fade{transition:none}}svg>g>g:last-child{pointer-events:none}#update-nag,.et-core-modal,.notice-error,.notice-warning,.notice:not(.sq_notice),.poopy_affiliates,.screen-meta-toggle,.show-settings,.toolbar-header,.update-nag,.updated,div.error,div.fs-notice.promotion,div.fs-notice.success,div.fs-notice.updated{display:none!important}#wpbody-content{float:none!important}#wpfooter{display:none}#wpwrap{background:#fff!important}#sq_wrap.sq_overview .sq_offer{width:auto;margin:15px 20px!important}body{font-family:'Open Sans',Arial,Helvetica,sans-serif;font-size:14px;background-color:#fff}.sq_separator{display:block;clear:both;border-bottom:1px dashed #ddd!important;width:90%;height:3px;margin:2px auto}#wpcontent{padding:0}#wpcontent .bg-light{background-color:#fdfdfd!important}#wpcontent .bg-briefcase{background-color:#e1f5e3!important}#wpcontent .content{min-width:600px;max-width:1020px;margin:auto}#wpcontent h3{font-weight:400;line-height:50px}#wpcontent .card .card-title{margin:0;color:#4f1440;font-weight:400}#wpcontent .sq_deactivated{position:relative}#wpcontent .sq_deactivated:before{content:" ";position:absolute;height:calc(100% + 20px);width:100%;background:#f1f1f1;opacity:.7;top:-10px;z-index:1000;cursor:pointer;border-radius:6px}#wpcontent .sq_deactivated_label{position:absolute!important;z-index:1001;right:0}.sq_fixed{position:fixed;z-index:100;top:32px;left:0;margin:0;border-top:2px solid #fff;border-bottom:2px solid #fff}.sq_alert{top:32px;font-size:16px;z-index:999999}.sq_notice{top:28px;text-align:center;width:100%}.sq_notice.sq_notice>div{display:block;margin:0!important;width:100%!important;line-height:40px;background-color:#fafad2}.sq_notice.sq_notice>div.sq_success{background-color:#20bc49}.sq_notices{font-size:13px;color:#555}.sq_error,.sq_success{text-align:center;font-weight:700}.sq_error{background-color:#bf4733!important;color:#fff!important;font-size:15px}.sq_success{background-color:#20bc49!important;line-height:30px;font-size:16px;color:#fff}.sq_success a{color:#4f47be;text-decoration:none}.sq_deactivated{opacity:.3}button.hide_advanced,button.show_advanced{color:#2183d6!important}#wpcontent .sq_flex{min-width:740px}#sq_wrap .small{font-size:12px;line-height:20px}#sq_wrap .sq_nav{flex:0 0 225px}#sq_wrap .row>div.input-group{display:flex!important}#sq_wrap .row{float:none!important;width:auto!important}#sq_wrap .btn-primary{background-color:#2680b4!important;border-color:transparent}#sq_wrap .btn-primary:hover,#sq_wrap .btn-social{background-color:#2674a7!important;border-color:transparent}#sq_wrap .btn-social{background-color:#e4eef3!important}#sq_wrap .btn{border-radius:0}#sq_wrap .input-group>button.btn,#sq_wrap .input-group>input{max-height:47px}#sq_wrap .bg-title{margin:2px;background-color:#f8f9fa!important;color:#505663!important}#sq_wrap .bg-light{background-color:#fdfdfd!important}#sq_wrap .bg-google{background-color:#e37400!important;color:#fff!important}#sq_wrap .bg-googlesc{background-color:#455a64!important;color:#fff!important}#sq_wrap .bg-primary{background-color:#2680b4!important;color:#fff!important}#sq_wrap .bg-warning{background-color:#f7681a!important;color:#fff!important}#sq_wrap .sq_imageselect{font-size:14px}a.btn-green,button.btn-green{color:#fff;background-color:#28a745!important;border-color:#28a745!important}a.btn-green:hover,button.btn-green:hover{color:#fff;background-color:#259343!important;border-color:#259343!important}a.btn-success,button.btn-success{color:#fff;background-color:#589ee4!important;border-color:transparent}a.btn-success:hover,button.btn-success:hover{color:#fff;background-color:#598dd3!important;border-color:transparent}a.btn-success:active,button.btn-success:active{color:#fff;background-color:#5a80c7!important;border-color:transparent}#sq_wrap table.dataTable{border-collapse:collapse!important}#sq_wrap .table thead th{white-space:nowrap!important}#sq_wrap .table thead{background-color:#e5edf3!important;text-shadow:1px 1px #fbfbfb}#sq_wrap .table-hover tbody tr:hover{background-color:#f1f1f1!important}#sq_wrap .table thead tr:hover{background-color:transparent!important}#sq_wrap .table-striped tbody tr:nth-of-type(odd){background-color:rgba(151,147,147,.05)}#sq_wrap .table-striped tbody tr.even{background-color:#fff}#sq_wrap .text-link{color:#2680b4!important}#sq_wrap .sq_row{position:relative;flex:1 1 auto}#sq_wrap .sq_col_side{flex:0 0 300px}#sq_wrap button.btn-success{color:#fff;background-color:#589ee4;border-color:transparent}#sq_wrap button.btn-success:hover{background-color:#4c81bd}#sq_wrap .btn-primary:not(:disabled):not(.disabled).active,#sq_wrap .btn-primary:not(:disabled):not(.disabled):active,#sq_wrap .show>.btn-primary.dropdown-toggle{background-color:#2777aa!important}#sq_wrap .btn-warning{background-color:#f2ca4c!important;border-color:transparent}#sq_wrap .btn-warning:hover{background-color:#e6be4b!important;border-color:transparent}#sq_wrap .bg-cta{background-color:#694861!important}#sq_wrap a:not(.btn):not(.sq-btn):not(.sq-nav-link){color:#f16112;text-decoration:none}#sq_wrap a:not(.btn):not(.sq-btn):not(.sq-nav-link):hover{color:#f14644}#sq_wrap h4 .fa:before{margin-right:3px}.wp-admin #sq_wrap select{padding:.375em .75em;line-height:1.5;height:calc(2.25em + 2px);vertical-align:middle;background-color:#e5f5dd;max-width:100%;max-height:100%;min-width:120px}.wp-admin #sq_seosettings_bulkseo select{height:calc(2.55em + 2px)}.wp-admin #sq_wrap select.bg-input{height:calc(2.875em + 2px);padding:.5em 1em;font-size:1.25em;line-height:1.5;border-radius:.3em;background-color:#e5f5dd}.wp-admin #sq_wrap input[type=text]:not(.wp-color-picker),.wp-admin #sq_wrap textarea{background-color:#e5f5dd;padding:.88em .75em}.sq_icons_content{float:left;background-color:#fffcfc;background-image:linear-gradient(90deg,#e6ecf1,#f8f9fa);margin:-7px;height:100%;min-height:121px;min-width:100px}.sq_icons{float:left;width:40px;height:40px}.sq_icons_small{display:block;float:left;margin:0 10px 0 0;height:30px;width:30px}.sq_kr_icon{background:url(../img/logos/kr_92.png) no-repeat;background-size:100%}.sq_krfound_icon{background:url(../img/logos/briefcase_92.png) no-repeat;background-size:100%}.sq_audits_icon{background:url(../img/logos/audit_92.png) no-repeat;background-size:100%}.sq_automation_icon{background:url(../img/logos/automation_92.png) no-repeat;background-size:100%}.sq_briefcase_icon{background:url(../img/logos/briefcase_92.png) no-repeat;background-size:100%}.sq_labels_icon{background:url(../img/logos/labels_92.png) no-repeat;background-size:100%}.sq_suggested_icon{background:url(../img/logos/suggested_92.png) no-repeat;background-size:100%}.sq_history_icon{background:url(../img/logos/history_92.png) no-repeat;background-size:100%}.sq_audit_icon{background:url(../img/logos/audit_92.png) no-repeat;background-size:100%}.sq_rankings_icon,.sq_ranks_icon{background:url(../img/logos/ranking_92.png) no-repeat;background-size:100%}.sq_sla_icon{background:url(../img/logos/sla_92.png) no-repeat;background-size:100%}.sq_focuspages_icon{background:url(../img/logos/focuspages_92.png) no-repeat;background-size:100%}.sq_bulkseo_icon{background:url(../img/logos/bulkseo_92.png) no-repeat;background-size:100%}.sq_boostpages_icon{background:url(../img/logos/boostpages_92.png) no-repeat;background-size:100%}.sq_addpage_icon{background:url(../img/logos/addpage_92.png) no-repeat;background-size:100%}.sq_settings_icon{background:url(../img/logos/settings_92.png) no-repeat;background-size:100%}.sq_squirrly_icon{background:url(../img/logos/squirrly.png) no-repeat;background-size:100%;height:48px;filter:none;-webkit-filter:none}.sq_book_icon{background:url(../img/logos/book_92.png) no-repeat;background-size:100%}.sq_stats_icon{background:url(../img/logos/stats_92.png) no-repeat;background-size:100%}.sq_favicon_icon{background:url(../img/logos/favicon_92.png) no-repeat;background-size:100%}.sq_jsonld_icon{background:url(../img/logos/jsonld_92.png) no-repeat;background-size:100%}.sq_metas_icon{background:url(../img/logos/metas_92.png) no-repeat;background-size:100%}.sq_robots_icon{background:url(../img/logos/robots_92.png) no-repeat;background-size:100%}.sq_social_icon{background:url(../img/logos/social_92.png) no-repeat;background-size:100%}.sq_sitemap_icon{background:url(../img/logos/sitemap_92.png) no-repeat;background-size:100%}.sq_traffic_icon{background:url(../img/logos/traffic_92.png) no-repeat;background-size:100%}.sq_websites_icon{background:url(../img/logos/websites_92.png) no-repeat;background-size:100%}#sq_wrap .page-item.active .page-link{background-color:#bde2f1;border-color:transparent}#sq_preloader{position:absolute;height:100%;width:100%;z-index:1000;background-color:#fff!important;opacity:.5}.sq_loading{height:60px;background:url(../img/loading.gif) no-repeat center!important}.sq_minloading{position:relative;opacity:.5}.sq_minloading:after{position:absolute!important;right:calc(50% - 10px)!important;top:calc(50% - 8px)!important;display:block!important;float:right!important;line-height:30px!important;content:""!important;padding:0!important;margin:0 0 0 5px!important;height:16px!important;width:20px!important;background:url(../img/minloading.png) no-repeat!important;-webkit-animation:play 1s steps(10) infinite;-moz-animation:play 1s steps(10) infinite;-o-animation:play 1s steps(10) infinite;animation:play 1s steps(10) infinite}#sq_wrap .sq_sm_menu{width:24px;position:relative}#sq_wrap .sq_sm_menu .fa-ellipsis-v{font-size:18px!important;color:#2680b4}#sq_wrap .sq_sm_menu .sm_icon_button{display:inline-block;position:relative;width:24px;height:24px;box-sizing:border-box;font-size:18px;color:#545454;text-align:center;cursor:pointer}#sq_wrap table tr div.sq_sm_menu:hover .sq_sm_dropdown,#sq_wrap table tr:hover .sq_sm_menu{display:block}#sq_wrap .sq_sm_menu .sq_sm_dropdown{display:none;background:#fff;position:absolute;right:20px;top:0;z-index:100;min-width:200px;box-shadow:0 0 10px 1px #999}#sq_wrap .sq_sm_menu .sq_icons_small{display:inline-block;margin:0 5px;height:17px;width:17px;vertical-align:middle;float:none}#sq_wrap .sq_sm_menu .sq_sm_dropdown li,#sq_wrap .sq_sm_menu .sq_sm_dropdown li a,#sq_wrap .sq_sm_menu .sq_sm_dropdown li button{font-size:13px;cursor:pointer}#sq_wrap .sq_help_toolbar{position:absolute;right:15px}#sq_wrap .sq_help_toolbar>i{font-size:27px!important;color:#f3dc68;cursor:pointer}#sq_wrap .sq_help_question i{font-size:24px!important;margin:10px}.fa-book-open:before{content:"\f518"}.flexcroll{scrollbar-face-color:#367cd2;scrollbar-shadow-color:#fff;scrollbar-highlight-color:#fff;scrollbar-3dlight-color:#fff;scrollbar-darkshadow-color:#fff;scrollbar-track-color:#fff;scrollbar-arrow-color:#fff}.flexcroll::-webkit-scrollbar{width:12px}.flexcroll::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px}.flexcroll::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgba(171,171,171,.8)}.form-group input.form-control,.form-group select.form-control,.form-group textarea.form-control{width:100%}.tooltip .arrow{left:auto!important;margin-left:inherit!important;bottom:inherit!important;z-index:inherit!important}.tooltip .arrow:after{content:""}.fade.in{opacity:1}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-backdrop .fade .in,.modal-backdrop.fade{opacity:.5!important}@media only screen and (max-width:960px){#sq_wrap{margin:0 0 0 35px}}
view/assets/js/snippet.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){$.sq_showSaved=function(message,time){if(!$(".sq_blocksnippet").find(".sq_tabcontent").length){$(".sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>')}$(".sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-success sq-alert-absolute" >'+message+"</div>");if(typeof time!=="undefined"&&time>0){setTimeout(function(){jQuery(".sq-alert").hide()},time)}};$.sq_showError=function(message,time){if(!$(".sq_blocksnippet").find(".sq_tabcontent").length){$(".sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>')}$(".sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-danger sq-alert-absolute" >'+message+"</div>");if(typeof time!=="undefined"&&time>0){setTimeout(function(){jQuery(".sq-alert").hide()},time)}};$.fn.sq_loadSnippet=function(){var $this=this;if(!$("input[name=sq_post_id]").length){if($("input[name=post_ID]").length>0){$this.prepend('<input type="hidden" name="sq_post_id" value="'+$("input[name=post_ID]").val()+'">')}if($("input[name=post_type]").length>0){$this.prepend('<input type="hidden" name="sq_post_type" value="'+$("input[name=post_type]").val()+'">')}if($("input[name=tag_ID]").length>0){$this.prepend('<input type="hidden" name="sq_term_id" value="'+$("input[name=tag_ID]").val()+'">')}if($("input[name=taxonomy]").length>0){$this.prepend('<input type="hidden" name="sq_taxonomy" value="'+$("input[name=taxonomy]").val()+'">')}}$this.each(function(){$(this).sq_getSnippet($(this).find("input[name=sq_post_id]").val(),$(this).find("input[name=sq_term_id]").val(),$(this).find("input[name=sq_taxonomy]").val(),$(this).find("input[name=sq_post_type]").val())})};$.fn.sq_editSnippet=function(options){var $this=this;var settings=$.extend({called:"normal",sq_snippet_wrap:$this.find(".sq_snippet_wrap"),editButton:$this.find(".sq_snippet_btn_edit"),saveButton:$this.find(".sq_snippet_btn_save"),cancelButton:$this.find(".sq_snippet_btn_cancel"),refreshButton:$this.find(".sq_snippet_btn_refresh"),last_tab:null,closeButton:$this.find(".sq-close"),sq_url:$this.find("input[name=sq_url]"),sq_doseo:$this.find("input[name=sq_doseo].sq-switch"),sq_toggle:$this.find(".sq-toggle"),sq_title:$this.find("textarea[name=sq_title]"),sq_description:$this.find("textarea[name=sq_description]"),sq_keywords:$this.find("input[name=sq_keywords]"),sq_noindex:$this.find("input[name=sq_noindex]"),sq_nofollow:$this.find("input[name=sq_nofollow]"),sq_nositemap:$this.find("input[name=sq_nositemap]"),sq_canonical:$this.find("input[name=sq_canonical]"),sq_og_media:$this.find("input[name=sq_og_media]"),sq_og_media_preview:$this.find("img.sq_og_media_preview"),og_image_close:$this.find(".sq_og_image_close"),sq_og_title:$this.find("textarea[name=sq_og_title]"),sq_og_description:$this.find("textarea[name=sq_og_description]"),sq_og_author:$this.find("input[name=sq_og_author]"),sq_og_type:$this.find("select[name=sq_og_type]"),sq_og_pixel:$this.find("#sq_og_pixel_id"),sq_tw_media:$this.find("input[name=sq_tw_media]"),sq_tw_media_preview:$this.find("img.sq_tw_media_preview"),tw_image_close:$this.find(".sq_tw_image_close"),sq_tw_title:$this.find("textarea[name=sq_tw_title]"),sq_tw_description:$this.find("textarea[name=sq_tw_description]"),sq_tw_type:$this.find("select[name=sq_tw_type]"),sq_jsonld:$this.find("textarea[name=sq_jsonld]"),sq_jsonld_code_type:$this.find("select.sq_jsonld_code_type"),sq_jsonld_custom_code:$this.find("div.sq_jsonld_custom_code"),sq_fpixel:$this.find("textarea[name=sq_fpixel]"),sq_fpixel_code_type:$this.find("select.sq_fpixel_code_type"),sq_fpixel_custom_code:$this.find("div.sq_fpixel_custom_code"),sq_post_id:$this.find("input[name=sq_post_id]").length>0?$this.find("input[name=sq_post_id]").val():0,sq_term_id:$this.find("input[name=sq_term_id]").length>0?$this.find("input[name=sq_term_id]").val():0,sq_taxonomy:$this.find("input[name=sq_taxonomy]").length>0?$this.find("input[name=sq_taxonomy]").val():"",sq_post_type:$this.find("input[name=sq_post_type]").length>0?$this.find("input[name=sq_post_type]").val():"",previewTab:$this.find(".sq_tab_preview"),editTab:$this.find(".sq_tab_edit"),validKeyword:false,__sq_save_message:typeof __sq_save_message!=="undefined"?__sq_save_message:"Saved!",__sq_error_message:typeof __sq_error_message!=="undefined"?__sq_error_message:"ERROR! Could not save the data. Please try again.",__sq_save_message_preview:typeof __sq_save_message_preview!=="undefined"?__sq_save_message_preview:"Saved! Reload to see the changes."},options);$this.initNav=function(){var $topmenu=$this.parents(".menupop:last");if($topmenu.length>0&&$this.data("snippet")==="topmenu"){$topmenu.off("hover");$topmenu.find(".ab-item").on("click",function(){$topmenu.addClass("open")});settings.closeButton.on("click",function(){$topmenu.removeClass("open");$topmenu.removeClass("hover")});$topmenu.find(".sq_snippet_wrap").show()}else{$this.off("hover");settings.closeButton.on("click",function(){$this.hide()})}};$this.listenDoSeo=function(){settings.sq_doseo.on("change",function(){$this.saveSEO()});if(!settings.sq_doseo.prop("checked")){settings.previewTab.hide();settings.editTab.hide();settings.cancelButton.hide()}else{settings.previewTab.show();settings.editTab.hide()}};$this.tabsListen=function(){$this.find("#sq_tabs").find("li").on("click",function(event){event.preventDefault();$li=$(this);$this.find("#sq_tabs").find("li").each(function(){$(this).removeClass("active")});$this.find(".sq_tabcontent").each(function(){$(this).hide()});$this.find("#sq_tab_"+$li.find("a").text().toString().toLowerCase()).show();$li.addClass("active")})};$this.saveSEO=function(){$this.preventLeave(false);$this.addClass("sq_minloading");var $sq_hash=$this.find("#sq_hash");if($sq_hash.val()!==""){if(settings.sq_title.find(".emoji").length>0){settings.sq_title.find(".emoji").after(settings.sq_title.find(".emoji").attr("alt")).remove()}if(settings.sq_description.find(".emoji").length>0){settings.sq_description.find(".emoji").after(settings.sq_description.find(".emoji").attr("alt")).remove()}if(settings.sq_tw_title.find(".emoji").length>0){settings.sq_tw_title.find(".emoji").after(settings.sq_tw_title.find(".emoji").attr("alt")).remove()}if(settings.sq_tw_description.find(".emoji").length>0){settings.sq_tw_description.find(".emoji").after(settings.sq_tw_description.find(".emoji").attr("alt")).remove()}if(settings.sq_og_title.find(".emoji").length>0){settings.sq_og_title.find(".emoji").after(settings.sq_og_title.find(".emoji").attr("alt")).remove()}if(settings.sq_og_description.find(".emoji").length>0){settings.sq_og_description.find(".emoji").after(settings.sq_og_description.find(".emoji").attr("alt")).remove()}$.post(sqQuery.ajaxurl,{action:"sq_saveseo",sq_title:settings.sq_title.length>0?$this.escapeHtml(settings.sq_title.val()):"",sq_description:settings.sq_description.length>0?$this.escapeHtml(settings.sq_description.val()):"",sq_keywords:settings.sq_keywords.length>0?$this.escapeHtml(settings.sq_keywords.val()):"",sq_canonical:settings.sq_canonical.length>0?$this.escapeHtml(settings.sq_canonical.val()):"",sq_noindex:$this.find("input[name=sq_noindex]:checked").length>0?parseInt($this.find("input[name=sq_noindex]:checked").val()):1,sq_nofollow:$this.find("input[name=sq_nofollow]:checked").length>0?parseInt($this.find("input[name=sq_nofollow]:checked").val()):1,sq_nositemap:$this.find("input[name=sq_nositemap]:checked").length>0?parseInt($this.find("input[name=sq_nositemap]:checked").val()):1,sq_tw_title:settings.sq_tw_title.length>0?$this.escapeHtml(settings.sq_tw_title.val()):"",sq_tw_description:settings.sq_tw_description.length>0?$this.escapeHtml(settings.sq_tw_description.val()):"",sq_tw_media:settings.sq_tw_media.length>0?settings.sq_tw_media.val():"",sq_tw_type:settings.sq_tw_type.length>0?settings.sq_tw_type.find("option:selected").val():"",sq_og_title:settings.sq_og_title.length>0?$this.escapeHtml(settings.sq_og_title.val()):"",sq_og_description:settings.sq_og_description.length>0?$this.escapeHtml(settings.sq_og_description.val()):"",sq_og_type:settings.sq_og_type.length>0?settings.sq_og_type.find("option:selected").val():"",sq_og_author:settings.sq_og_author.length>0?$this.escapeHtml(settings.sq_og_author.val()):"",sq_og_media:settings.sq_og_media.length>0?settings.sq_og_media.val():"",sq_jsonld_code_type:settings.sq_jsonld_code_type.length>0?settings.sq_jsonld_code_type.find("option:selected").val():"auto",sq_jsonld:settings.sq_jsonld.length>0&&settings.sq_jsonld_code_type.find("option:selected").val()==="custom"?settings.sq_jsonld.val():"",sq_fpixel_code_type:settings.sq_fpixel_code_type.length>0?settings.sq_fpixel_code_type.find("option:selected").val():"auto",sq_fpixel:settings.sq_fpixel.length>0&&settings.sq_fpixel_code_type.find("option:selected").val()==="custom"?settings.sq_fpixel.val():"",sq_url:settings.sq_url.length>0?$this.escapeHtml(settings.sq_url.val()):"",sq_hash:$sq_hash.val(),post_id:settings.sq_post_id,term_id:settings.sq_term_id,taxonomy:settings.sq_taxonomy,post_type:settings.sq_post_type,sq_doseo:$this.find("input[name=sq_doseo]:checked").length>0?parseInt($this.find("input[name=sq_doseo]:checked").val()):0,sq_nonce:sqQuery.nonce},function(){}).done(function(response){$this.removeClass("sq_minloading");if(typeof response.saved!=="undefined"){if(typeof response.html!=="undefined"){var $ctab=$this.find(".sq-nav-item.active");$this.html(response.html);$this.sq_editSnippet({called:"ajax"});$this.find($ctab).trigger("click");$this.trigger("sq_snippet_loaded");$this.trigger("sq_snippet_saved");SQ_DEBUG&&console.log("sq_snippet_loaded");SQ_DEBUG&&console.log("sq_snippet_saved")}else{$.sq_showError("Couldn't load the page. Please refresh.",0)}if(typeof response.error!=="undefined"){$.sq_showError(response.error,2e3)}else{$.sq_showSaved(settings.__sq_save_message,2e3)}}else{$.sq_showError(settings.__sq_error_message,2e3)}}).fail(function(){$this.removeClass("sq_minloading");$.sq_showError(settings.__sq_error_message,2e3)})}};$this.populateInputs=function(){var $title=$(document).find("head title").text();if(!$title)$title="";var $description=$this.find('meta[name="description"]').attr("content");if(!$description)$description="";if($this.find(".sq_title").length>0){$this.find(".sq_title").each(function(){$(this).sq_checkMax()})}if($this.find(".sq_description").length>0){$this.find(".sq_description").each(function(){$(this).sq_checkMax()})}if($this.find(".sq_tab_facebook").find(".sq_deactivated").length>0){$this.find(".sq_tab_facebook").find(".sq_snippet_title").text($this.find(".sq_tab_meta").find(".sq_snippet_title").text());$this.find(".sq_tab_facebook").find(".sq_snippet_description").text($this.find(".sq_tab_meta").find(".sq_snippet_description").text())}if($this.find(".sq_tab_twitter").find(".sq_deactivated").length>0){$this.find(".sq_tab_twitter").find(".sq_snippet_title").text($this.find(".sq_tab_meta").find(".sq_snippet_title").text());$this.find(".sq_tab_twitter").find(".sq_snippet_description").text($this.find(".sq_tab_meta").find(".sq_snippet_description").text())}if(settings.sq_og_media_preview&&settings.sq_og_media.val()!==""){settings.sq_og_media_preview.attr("src",settings.sq_og_media.val());settings.og_image_close.show()}settings.og_image_close.on("click",function(){settings.sq_og_media_preview.attr("src","");settings.sq_og_media.val("");$(this).hide()});if(settings.sq_tw_media_preview&&settings.sq_tw_media.val()!==""){settings.sq_tw_media_preview.attr("src",settings.sq_tw_media.val());settings.tw_image_close.show()}settings.tw_image_close.on("click",function(){settings.sq_tw_media_preview.attr("src","");settings.sq_tw_media.val("");$(this).hide()});settings.refreshButton.on("click",function(){$this.sq_loadSnippet()});$this.keywordsListen();settings.editButton.on("click",function(){settings.previewTab.hide();settings.editTab.show();settings.cancelButton.on("click",function(){settings.previewTab.show();settings.editTab.hide()});if($.isFunction($.fn.sq_patterns)){$this.find(".sq_pattern_field").each(function(){$(this).sq_patterns().init()})}})};$this.mediaListen=function(){$this.find(".sq_get_og_media, .sq_get_tw_media").click(function(e){e.preventDefault();var og_media=$(this).parents(".sq-row:last").find(".sq_og_media_preview");var og_media_close=$(this).parents(".sq-row:last").find(".sq_og_image_close");var tw_media=$(this).parents(".sq-row:last").find(".sq_tw_media_preview");var tw_media_close=$(this).parents(".sq-row:last").find(".sq_tw_image_close");var image_frame;if(image_frame){image_frame.open()}image_frame=wp.media({title:"Select Media",multiple:false,library:{type:"image"}});image_frame.on("close",function(){var selection=image_frame.state().get("selection");var gallery_ids=null;var my_index=0;selection.each(function(attachment){gallery_ids=attachment["attributes"]["url"];my_index++});if(og_media.length>0&&gallery_ids!==null){settings.sq_og_media.val(gallery_ids);og_media.attr("src",gallery_ids);og_media_close.show()}if(tw_media.length>0&&gallery_ids!==null){settings.sq_tw_media.val(gallery_ids);tw_media.attr("src",gallery_ids);tw_media_close.show()}});image_frame.on("open",function(){var selection=image_frame.state().get("selection")});image_frame.open()})};$this.dropDownListen=function(){var actionDivSelected,actionDiv,dropdown,input,next;settings.sq_toggle.on("click",function(){input=$(this);input.css("height","auto");dropdown=input.parents(".sq-input-group:last").find(".sq-actions");if(dropdown.data("position")=="small"){dropdown.css("top","35px");dropdown.css("height","36px")}else{var dropdown_top=input.height()+20;dropdown.css("top",dropdown_top+"px")}actionDiv=dropdown.find(".sq-action");dropdown.show();actionDiv.on("click",function(){if(typeof actionDivSelected!=="undefined"){var actionValue=actionDivSelected.find(".sq-value")}else{var actionValue=$(this).find(".sq-value")}if(typeof actionValue!=="undefined"&&actionValue!==""){input.val(actionValue.data("value"));input.trigger("change");input.sq_checkMax()}});input.on("keyup",function(){$(this).parents(".sq-input-group:last").find(".sq-actions").hide()});input.sq_bodyClick("click",function(){$(this).parents(".sq-input-group:last").find(".sq-actions").hide()})});settings.sq_jsonld_code_type.on("change",function(){if(settings.sq_jsonld_code_type.find("option:selected").val()==="custom"){settings.sq_jsonld_custom_code.show()}else{settings.sq_jsonld_custom_code.hide()}});settings.sq_fpixel_code_type.on("change",function(){if(settings.sq_fpixel_code_type.find("option:selected").val()==="custom"){settings.sq_fpixel_custom_code.show()}else{settings.sq_fpixel_custom_code.hide()}})};$this.keywordsListen=function(){settings.sq_keywords.sqtagsinput("items")};$this.escapeHtml=function(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.toString().replace(/[&<>"']/g,function(m){return map[m]})};$this.preventLeave=function(on){if($("form#post").length==0){if(on){$(window).on("beforeunload",function(){return confirm("You have unsave changes in Squirrly Snippet. Are you sure you want to proceed?")})}else{$(window).off("beforeunload")}}};$this.initNav();$this.listenDoSeo();$this.mediaListen();$this.tabsListen();$this.populateInputs();$this.dropDownListen();$this.find('input[type="text"], textarea').on("keyup paste",function(){$this.preventLeave(true);$(this).sq_checkMax()});settings.saveButton.on("click",function(event){event.preventDefault();SQ_DEBUG&&console.log("save");$this.preventLeave(false);$this.saveSEO()});if(typeof $.sq_blockseo!=="undefined"){$.sq_blockseo.on("sq_seo_refresh",function(){settings.refreshButton.trigger("click")})}$(document).on("after-autosave.update-post-slug",function(e,data){$this.preventLeave(false)});if($this.find(".sq_save_ajax").length>0){$this.find(".sq_save_ajax").find("input").on("change",function(){$(this).sq_ajaxSnippetListen()});$this.find(".sq_save_ajax").find("button").on("click",function(){$(this).sq_ajaxSnippetListen()})}return $this};$.fn.sq_checkMax=function(){var $element=$(this);var $divwrap=$element.parents(".sq-input-group:last");var length=0,patternslength=0,elementwords=0,words=0,maxvalue=300;var finalvalue="";if(!$element.length>0)return;if($element.is("input, textarea")){elementwords=finalvalue=$element.val()}else{elementwords=finalvalue=$element.html()}length=elementwords.length;if($divwrap.find(".sq_length").length){maxvalue=parseInt($divwrap.find(".sq_length").data("maxlength"))}if($divwrap.hasClass("sq_pattern_field")){var $patterns=$divwrap.find(".sq_pattern_list");words=elementwords.split(" ");if(words.length>0){for(var i=0;i<words.length;i++){if($patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').length){elementwords=elementwords.replace(words[i],"");elementwords=elementwords.replace(" "," ");elementwords=elementwords.trim();if($patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').data("value")){patternslength+=$patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').data("value").length}finalvalue=finalvalue.replace(new RegExp(words[i],"g"),$patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').data("value"))}}length=elementwords.length+patternslength}}$element.attr("title",finalvalue);$divwrap.find(".sq_length").text(length+"/"+maxvalue);if(length===0||length>maxvalue){$element.attr("style","border: solid 1px red !important")}else{$element.attr("style","border: none !important")}};$.fn.sq_bodyClick=function(ename,cb){return this.each(function(){var $this=$(this),self=this;$(document).on(ename,function sqtempo(e){if(e.target!==self&&!$.contains(self,e.target)){cb.apply(self,[e]);$(document).off(ename,sqtempo)}});$this.on("keydown blur",function sqtabpress(e){if(e.which===9){cb.apply(self,[e]);$this.off("keydown",sqtabpress)}})})};$.fn.toggleSwitch=function(checked){var element=$(this);if(element.prop("checked")&&checked==false||!element.prop("checked")&&checked==true){element.trigger("click")}};$.fn.sq_getSnippet=function(post_id,term_id,taxonomy,post_type){var $this=this;$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_getsnippet",post_id:post_id,term_id:term_id,taxonomy:taxonomy,post_type:post_type,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"){$("div.tooltip").hide();$this.html(response.html);$this.sq_editSnippet();$this.trigger("sq_snippet_loaded");SQ_DEBUG&&console.log("sq_snippet_loaded")}else{$("#sq_blocksnippet").trigger("error.refresh")}if(typeof response.error!=="undefined"){$.sq_showError(response.error,1e4)}}else{$("#sq_blocksnippet").trigger("error.refresh");SQ_DEBUG&&console.log("no data received")}$this.removeClass("sq_minloading")}).fail(function(){SQ_DEBUG&&console.log("no data received");$("#sq_blocksnippet").trigger("error.refresh");$this.removeClass("sq_minloading")},"json")};$.fn.sq_previewSnippet=function(url,show_url){var $this=this;if(typeof url==="undefined"){url=""}if(typeof show_url==="undefined"){show_url=""}$this.find(".sq_snippet_ul").addClass("sq_minloading");$this.find(".sq_snippet_title").html("");$this.find(".sq_snippet_url").html("");$this.find(".sq_snippet_description").html("");$this.find(".sq_snippet_keywords").hide();$this.find(".sq_snippet").show();$this.find(".sq_snippet_update").hide();$this.find(".sq_snippet_customize").hide();$this.find(".ogimage_preview").hide();setTimeout(function(){$.post(sqQuery.ajaxurl,{action:"sq_previewsnippet",url:url,sq_nonce:sqQuery.nonce}).done(function(response){$this.find(".sq_snippet_ul").removeClass("sq_minloading");$this.find(".sq_snippet_update").show();$this.find(".sq_snippet_customize").show();$this.find(".sq_snippet_keywords").show();$this.find(".ogimage_preview").show();if(response){$this.find(".sq_snippet_title").html(response.title);if(show_url!=="")$this.find(".sq_snippet_url").html('<a href="'+url+'" target="_blank">'+show_url+"</a>");else $this.find(".sq_snippet_url").html(response.url);$this.find(".sq_snippet_description").html(response.description)}}).fail(function(){$this.find(".sq_snippet_ul").removeClass("sq_minloading");$this.find(".sq_snippet_update").show()},"json")},500)};$.fn.sq_ajaxSnippetListen=function(){var $this=this;var $input=$("#"+$this.data("input"));var $confirm=$this.data("confirm");var $action=$this.data("action");var $name=$this.data("name");var $value=0;if(!$input.length){$input=$this}if(typeof $confirm!=="undefined"){if(!confirm($confirm))return}if($input.is("checkbox")&&$input.is(":checked")){$value=$input.val()}else if($input.is("select")){$value=$input.find("option:selected").val()}else if($input.is("input")){$value=$input.val()}$this.addClass("sq_minloading");if($action!==""&&$value!==""){$.post(sqQuery.ajaxurl,{action:$action,input:$name,value:$value,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.data!=="undefined"){if(response.data===""){$("#wpbody-content").prepend("Saved")}else{$("#wpbody-content").prepend(response.data)}setTimeout(function(){$this.removeClass("sq_minloading");var $parent=$this.closest("div.sq_save_ajax").parent("div");if($parent.length>0){$parent.find(".sq_deactivated_label").remove();$parent.find(".sq_deactivated").removeClass("sq_deactivated")}else{location.reload()}},1e3)}else if(typeof response.error!=="undefined"){$("body").prepend(response.error);$this.removeClass("sq_minloading")}}).fail(function(){$this.removeClass("sq_minloading");location.reload()},"json")}};if(!$.sq_isGutenberg){$.sq_isGutenberg=function(inp){return typeof window.wp!=="undefined"&&typeof wp.data!=="undefined"&&typeof wp.data.select("core/editor")!=="undefined"&&$.isFunction(wp.data.select("core/editor").getEditedPostAttribute)}}$(document).ready(function(){var $adminbar=$("#wp-admin-bar-sq_bar_menu");var $blocksnippet=false;var sq_snippet_tab="metas";if($adminbar.length>0){if($adminbar.find('#sq_blocksnippet[data-snippet="topmenu"]').length){$blocksnippet=$adminbar.find("#sq_blocksnippet");$blocksnippet.sq_loadSnippet()}else{if($('#sq_blocksnippet[data-snippet!="topmenu"]').length){$blocksnippet=$("#sq_blocksnippet");$adminbar.find("#wp-admin-bar-sq_bar_submenu").remove();$adminbar.find(".ab-item").on("click",function(){if($(".edit-post-layout__content").length>0){$(".edit-post-layout__content").scrollTop($(".edit-post-layout__content").scrollTop()+$blocksnippet.offset().top-100)}else if($(".block-editor-editor-skeleton__content").length>0){$(".block-editor-editor-skeleton__content").scrollTop($(".block-editor-editor-skeleton__content").scrollTop()+$blocksnippet.offset().top-100)}else{$("html,body").scrollTop($blocksnippet.offset().top-50)}});$blocksnippet.addClass("sq_blocksnippet").addClass("sq-shadow-sm").addClass("sq-border-bottom");$blocksnippet.find(".inside").show().sq_loadSnippet()}}if($blocksnippet){$blocksnippet.on("sq_snippet_loaded",function(){$snippet=$(this);$snippet.find(".sq-nav-item.sq-nav-link").on("click",function(){sq_snippet_tab=$(this).data("category")});$snippet.find(".sq-nav-item").removeClass("active");$snippet.find(".sq-tab-pane").removeClass("active");var $tab=$snippet.find(".sq_snippet_menu").find("#sq-nav-item_"+sq_snippet_tab);$tab.addClass("active");$snippet.find($tab.attr("href")).addClass("active")});$blocksnippet.on("error.refresh",function(){$.sq_showError("Couldn't load the page. <span class='sq_snippet_refresh' style='color: #0F75BC; cursor:pointer;'>Please refresh</span>.",0);$(".sq_snippet_refresh").on("click",function(){$blocksnippet.sq_loadSnippet()})})}}})})(jQuery);
1
+ if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){$.sq_showSaved=function(message,time){if(!$(".sq_blocksnippet").find(".sq_tabcontent").length){$(".sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>')}$(".sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-success sq-alert-absolute" >'+message+"</div>");if(typeof time!=="undefined"&&time>0){setTimeout(function(){jQuery(".sq-alert").hide()},time)}};$.sq_showError=function(message,time){if(!$(".sq_blocksnippet").find(".sq_tabcontent").length){$(".sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>')}$(".sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-danger sq-alert-absolute" >'+message+"</div>");if(typeof time!=="undefined"&&time>0){setTimeout(function(){jQuery(".sq-alert").hide()},time)}};$.fn.sq_loadSnippet=function(){var $this=this;if(!$("input[name=sq_post_id]").length){if($("input[name=post_ID]").length>0){$this.prepend('<input type="hidden" name="sq_post_id" value="'+$("input[name=post_ID]").val()+'">')}if($("input[name=post_type]").length>0){$this.prepend('<input type="hidden" name="sq_post_type" value="'+$("input[name=post_type]").val()+'">')}if($("input[name=tag_ID]").length>0){$this.prepend('<input type="hidden" name="sq_term_id" value="'+$("input[name=tag_ID]").val()+'">')}if($("input[name=taxonomy]").length>0){$this.prepend('<input type="hidden" name="sq_taxonomy" value="'+$("input[name=taxonomy]").val()+'">')}}$this.each(function(){$(this).sq_getSnippet($(this).find("input[name=sq_post_id]").val(),$(this).find("input[name=sq_term_id]").val(),$(this).find("input[name=sq_taxonomy]").val(),$(this).find("input[name=sq_post_type]").val())})};$.fn.sq_editSnippet=function(options){var $this=this;var settings=$.extend({called:"normal",sq_snippet_wrap:$this.find(".sq_snippet_wrap"),editButton:$this.find(".sq_snippet_btn_edit"),saveButton:$this.find(".sq_snippet_btn_save"),cancelButton:$this.find(".sq_snippet_btn_cancel"),refreshButton:$this.find(".sq_snippet_btn_refresh"),last_tab:null,closeButton:$this.find(".sq-close"),sq_url:$this.find("input[name=sq_url]"),sq_doseo:$this.find("input[name=sq_doseo].sq-switch"),sq_toggle:$this.find(".sq-toggle"),sq_title:$this.find("textarea[name=sq_title]"),sq_description:$this.find("textarea[name=sq_description]"),sq_keywords:$this.find("input[name=sq_keywords]"),sq_noindex:$this.find("input[name=sq_noindex]"),sq_nofollow:$this.find("input[name=sq_nofollow]"),sq_nositemap:$this.find("input[name=sq_nositemap]"),sq_canonical:$this.find("input[name=sq_canonical]"),sq_og_media:$this.find("input[name=sq_og_media]"),sq_og_media_preview:$this.find("img.sq_og_media_preview"),og_image_close:$this.find(".sq_og_image_close"),sq_og_title:$this.find("textarea[name=sq_og_title]"),sq_og_description:$this.find("textarea[name=sq_og_description]"),sq_og_author:$this.find("input[name=sq_og_author]"),sq_og_type:$this.find("select[name=sq_og_type]"),sq_og_pixel:$this.find("#sq_og_pixel_id"),sq_tw_media:$this.find("input[name=sq_tw_media]"),sq_tw_media_preview:$this.find("img.sq_tw_media_preview"),tw_image_close:$this.find(".sq_tw_image_close"),sq_tw_title:$this.find("textarea[name=sq_tw_title]"),sq_tw_description:$this.find("textarea[name=sq_tw_description]"),sq_tw_type:$this.find("select[name=sq_tw_type]"),sq_jsonld:$this.find("textarea[name=sq_jsonld]"),sq_jsonld_code_type:$this.find("select.sq_jsonld_code_type"),sq_jsonld_custom_code:$this.find("div.sq_jsonld_custom_code"),sq_fpixel:$this.find("textarea[name=sq_fpixel]"),sq_fpixel_code_type:$this.find("select.sq_fpixel_code_type"),sq_fpixel_custom_code:$this.find("div.sq_fpixel_custom_code"),sq_post_id:$this.find("input[name=sq_post_id]").length>0?$this.find("input[name=sq_post_id]").val():0,sq_term_id:$this.find("input[name=sq_term_id]").length>0?$this.find("input[name=sq_term_id]").val():0,sq_taxonomy:$this.find("input[name=sq_taxonomy]").length>0?$this.find("input[name=sq_taxonomy]").val():"",sq_post_type:$this.find("input[name=sq_post_type]").length>0?$this.find("input[name=sq_post_type]").val():"",previewTab:$this.find(".sq_tab_preview"),editTab:$this.find(".sq_tab_edit"),validKeyword:false,__sq_save_message:typeof __sq_save_message!=="undefined"?__sq_save_message:"Saved!",__sq_error_message:typeof __sq_error_message!=="undefined"?__sq_error_message:"ERROR! Could not save the data. Please try again.",__sq_save_message_preview:typeof __sq_save_message_preview!=="undefined"?__sq_save_message_preview:"Saved! Reload to see the changes."},options);$this.initNav=function(){var $topmenu=$this.parents(".menupop:last");if($topmenu.length>0&&$this.data("snippet")==="topmenu"){$topmenu.off("hover");$topmenu.find(".ab-item").on("click",function(){$topmenu.addClass("open")});settings.closeButton.on("click",function(){$topmenu.removeClass("open");$topmenu.removeClass("hover")});$topmenu.find(".sq_snippet_wrap").show()}else{$this.off("hover");settings.closeButton.on("click",function(){$this.hide()})}};$this.listenDoSeo=function(){settings.sq_doseo.on("change",function(){$this.saveSEO()});if(!settings.sq_doseo.prop("checked")){settings.previewTab.hide();settings.editTab.hide();settings.cancelButton.hide()}else{settings.previewTab.show();settings.editTab.hide()}};$this.tabsListen=function(){$this.find("#sq_tabs").find("li").on("click",function(event){event.preventDefault();$li=$(this);$this.find("#sq_tabs").find("li").each(function(){$(this).removeClass("active")});$this.find(".sq_tabcontent").each(function(){$(this).hide()});$this.find("#sq_tab_"+$li.find("a").text().toString().toLowerCase()).show();$li.addClass("active")})};$this.saveSEO=function(){$this.preventLeave(false);$this.addClass("sq_minloading");var $sq_hash=$this.find("#sq_hash");if($sq_hash.val()!==""){if(settings.sq_title.find(".emoji").length>0){settings.sq_title.find(".emoji").after(settings.sq_title.find(".emoji").attr("alt")).remove()}if(settings.sq_description.find(".emoji").length>0){settings.sq_description.find(".emoji").after(settings.sq_description.find(".emoji").attr("alt")).remove()}if(settings.sq_tw_title.find(".emoji").length>0){settings.sq_tw_title.find(".emoji").after(settings.sq_tw_title.find(".emoji").attr("alt")).remove()}if(settings.sq_tw_description.find(".emoji").length>0){settings.sq_tw_description.find(".emoji").after(settings.sq_tw_description.find(".emoji").attr("alt")).remove()}if(settings.sq_og_title.find(".emoji").length>0){settings.sq_og_title.find(".emoji").after(settings.sq_og_title.find(".emoji").attr("alt")).remove()}if(settings.sq_og_description.find(".emoji").length>0){settings.sq_og_description.find(".emoji").after(settings.sq_og_description.find(".emoji").attr("alt")).remove()}$.post(sqQuery.ajaxurl,{action:"sq_saveseo",sq_title:settings.sq_title.length>0?$this.escapeHtml(settings.sq_title.val()):"",sq_description:settings.sq_description.length>0?$this.escapeHtml(settings.sq_description.val()):"",sq_keywords:settings.sq_keywords.length>0?$this.escapeHtml(settings.sq_keywords.val()):"",sq_canonical:settings.sq_canonical.length>0?$this.escapeHtml(settings.sq_canonical.val()):"",sq_noindex:$this.find("input[name=sq_noindex]:checked").length>0?parseInt($this.find("input[name=sq_noindex]:checked").val()):1,sq_nofollow:$this.find("input[name=sq_nofollow]:checked").length>0?parseInt($this.find("input[name=sq_nofollow]:checked").val()):1,sq_nositemap:$this.find("input[name=sq_nositemap]:checked").length>0?parseInt($this.find("input[name=sq_nositemap]:checked").val()):1,sq_tw_title:settings.sq_tw_title.length>0?$this.escapeHtml(settings.sq_tw_title.val()):"",sq_tw_description:settings.sq_tw_description.length>0?$this.escapeHtml(settings.sq_tw_description.val()):"",sq_tw_media:settings.sq_tw_media.length>0?settings.sq_tw_media.val():"",sq_tw_type:settings.sq_tw_type.length>0?settings.sq_tw_type.find("option:selected").val():"",sq_og_title:settings.sq_og_title.length>0?$this.escapeHtml(settings.sq_og_title.val()):"",sq_og_description:settings.sq_og_description.length>0?$this.escapeHtml(settings.sq_og_description.val()):"",sq_og_type:settings.sq_og_type.length>0?settings.sq_og_type.find("option:selected").val():"",sq_og_author:settings.sq_og_author.length>0?$this.escapeHtml(settings.sq_og_author.val()):"",sq_og_media:settings.sq_og_media.length>0?settings.sq_og_media.val():"",sq_jsonld_code_type:settings.sq_jsonld_code_type.length>0?settings.sq_jsonld_code_type.find("option:selected").val():"auto",sq_jsonld:settings.sq_jsonld.length>0&&settings.sq_jsonld_code_type.find("option:selected").val()==="custom"?settings.sq_jsonld.val():"",sq_fpixel_code_type:settings.sq_fpixel_code_type.length>0?settings.sq_fpixel_code_type.find("option:selected").val():"auto",sq_fpixel:settings.sq_fpixel.length>0&&settings.sq_fpixel_code_type.find("option:selected").val()==="custom"?settings.sq_fpixel.val():"",sq_url:settings.sq_url.length>0?$this.escapeHtml(settings.sq_url.val()):"",sq_hash:$sq_hash.val(),post_id:settings.sq_post_id,term_id:settings.sq_term_id,taxonomy:settings.sq_taxonomy,post_type:settings.sq_post_type,sq_doseo:$this.find("input[name=sq_doseo]:checked").length>0?parseInt($this.find("input[name=sq_doseo]:checked").val()):0,sq_nonce:sqQuery.nonce},function(){}).done(function(response){$this.removeClass("sq_minloading");if(response){if(typeof response.saved!=="undefined"){if(typeof response.html!=="undefined"){var $ctab=$this.find(".sq-nav-item.active");$this.html(response.html);$this.sq_editSnippet({called:"ajax"});$this.find($ctab).trigger("click");$this.trigger("sq_snippet_loaded");$this.trigger("sq_snippet_saved")}$.sq_showSaved(settings.__sq_save_message,2e3)}else if(typeof response.error!=="undefined"){$.sq_showError(response.error,5e3)}else{$.sq_showError(settings.__sq_error_message,7e3)}}else{$.sq_showError(settings.__sq_error_message,7e3)}}).fail(function(){$this.removeClass("sq_minloading");$.sq_showError(settings.__sq_error_message,7e3)})}};$this.populateInputs=function(){var $title=$(document).find("head title").text();if(!$title)$title="";var $description=$this.find('meta[name="description"]').attr("content");if(!$description)$description="";if($this.find(".sq_title").length>0){$this.find(".sq_title").each(function(){$(this).sq_checkMax()})}if($this.find(".sq_description").length>0){$this.find(".sq_description").each(function(){$(this).sq_checkMax()})}if($this.find(".sq_tab_facebook").find(".sq_deactivated").length>0){$this.find(".sq_tab_facebook").find(".sq_snippet_title").text($this.find(".sq_tab_meta").find(".sq_snippet_title").text());$this.find(".sq_tab_facebook").find(".sq_snippet_description").text($this.find(".sq_tab_meta").find(".sq_snippet_description").text())}if($this.find(".sq_tab_twitter").find(".sq_deactivated").length>0){$this.find(".sq_tab_twitter").find(".sq_snippet_title").text($this.find(".sq_tab_meta").find(".sq_snippet_title").text());$this.find(".sq_tab_twitter").find(".sq_snippet_description").text($this.find(".sq_tab_meta").find(".sq_snippet_description").text())}if(settings.sq_og_media_preview&&settings.sq_og_media.val()!==""){settings.sq_og_media_preview.attr("src",settings.sq_og_media.val());settings.og_image_close.show()}settings.og_image_close.on("click",function(){settings.sq_og_media_preview.attr("src","");settings.sq_og_media.val("");$(this).hide()});if(settings.sq_tw_media_preview&&settings.sq_tw_media.val()!==""){settings.sq_tw_media_preview.attr("src",settings.sq_tw_media.val());settings.tw_image_close.show()}settings.tw_image_close.on("click",function(){settings.sq_tw_media_preview.attr("src","");settings.sq_tw_media.val("");$(this).hide()});settings.refreshButton.on("click",function(){$this.sq_loadSnippet()});$this.keywordsListen();settings.editButton.on("click",function(){settings.previewTab.hide();settings.editTab.show();settings.cancelButton.on("click",function(){settings.previewTab.show();settings.editTab.hide()});if($.isFunction($.fn.sq_patterns)){$this.find(".sq_pattern_field").each(function(){$(this).sq_patterns().init()})}})};$this.mediaListen=function(){$this.find(".sq_get_og_media, .sq_get_tw_media").click(function(e){e.preventDefault();var og_media=$(this).parents(".sq-row:last").find(".sq_og_media_preview");var og_media_close=$(this).parents(".sq-row:last").find(".sq_og_image_close");var tw_media=$(this).parents(".sq-row:last").find(".sq_tw_media_preview");var tw_media_close=$(this).parents(".sq-row:last").find(".sq_tw_image_close");var image_frame;if(image_frame){image_frame.open()}image_frame=wp.media({title:"Select Media",multiple:false,library:{type:"image"}});image_frame.on("close",function(){var selection=image_frame.state().get("selection");var gallery_ids=null;var my_index=0;selection.each(function(attachment){gallery_ids=attachment["attributes"]["url"];my_index++});if(og_media.length>0&&gallery_ids!==null){settings.sq_og_media.val(gallery_ids);og_media.attr("src",gallery_ids);og_media_close.show()}if(tw_media.length>0&&gallery_ids!==null){settings.sq_tw_media.val(gallery_ids);tw_media.attr("src",gallery_ids);tw_media_close.show()}});image_frame.on("open",function(){var selection=image_frame.state().get("selection")});image_frame.open()})};$this.dropDownListen=function(){var actionDivSelected,actionDiv,dropdown,input,next;settings.sq_toggle.on("click",function(){input=$(this);input.css("height","auto");dropdown=input.parents(".sq-input-group:last").find(".sq-actions");if(dropdown.data("position")=="small"){dropdown.css("top","35px");dropdown.css("height","36px")}else{var dropdown_top=input.height()+20;dropdown.css("top",dropdown_top+"px")}actionDiv=dropdown.find(".sq-action");dropdown.show();actionDiv.on("click",function(){if(typeof actionDivSelected!=="undefined"){var actionValue=actionDivSelected.find(".sq-value")}else{var actionValue=$(this).find(".sq-value")}if(typeof actionValue!=="undefined"&&actionValue!==""){input.val(actionValue.data("value"));input.trigger("change");input.sq_checkMax()}});input.on("keyup",function(){$(this).parents(".sq-input-group:last").find(".sq-actions").hide()});input.sq_bodyClick("click",function(){$(this).parents(".sq-input-group:last").find(".sq-actions").hide()})});settings.sq_jsonld_code_type.on("change",function(){if(settings.sq_jsonld_code_type.find("option:selected").val()==="custom"){settings.sq_jsonld_custom_code.show()}else{settings.sq_jsonld_custom_code.hide()}});settings.sq_fpixel_code_type.on("change",function(){if(settings.sq_fpixel_code_type.find("option:selected").val()==="custom"){settings.sq_fpixel_custom_code.show()}else{settings.sq_fpixel_custom_code.hide()}})};$this.keywordsListen=function(){settings.sq_keywords.sqtagsinput("items")};$this.escapeHtml=function(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.toString().replace(/[&<>"']/g,function(m){return map[m]})};$this.preventLeave=function(on){if($("form#post").length==0){if(on){$(window).on("beforeunload",function(){return confirm("You have unsave changes in Squirrly Snippet. Are you sure you want to proceed?")})}else{$(window).off("beforeunload")}}};$this.initNav();$this.listenDoSeo();$this.mediaListen();$this.tabsListen();$this.populateInputs();$this.dropDownListen();$this.find('input[type="text"], textarea').on("keyup paste",function(){$this.preventLeave(true);$(this).sq_checkMax()});settings.saveButton.on("click",function(event){event.preventDefault();SQ_DEBUG&&console.log("save");$this.preventLeave(false);$this.saveSEO()});if(typeof $.sq_blockseo!=="undefined"){$.sq_blockseo.on("sq_seo_refresh",function(){settings.refreshButton.trigger("click")})}$(document).on("after-autosave.update-post-slug",function(e,data){$this.preventLeave(false)});if($this.find(".sq_save_ajax").length>0){$this.find(".sq_save_ajax").find("input").on("change",function(){$(this).sq_ajaxSnippetListen()});$this.find(".sq_save_ajax").find("button").on("click",function(){$(this).sq_ajaxSnippetListen()})}return $this};$.fn.sq_checkMax=function(){var $element=$(this);var $divwrap=$element.parents(".sq-input-group:last");var length=0,patternslength=0,elementwords=0,words=0,maxvalue=300;var finalvalue="";if(!$element.length>0)return;if($element.is("input, textarea")){elementwords=finalvalue=$element.val()}else{elementwords=finalvalue=$element.html()}length=elementwords.length;if($divwrap.find(".sq_length").length){maxvalue=parseInt($divwrap.find(".sq_length").data("maxlength"))}if($divwrap.hasClass("sq_pattern_field")){var $patterns=$divwrap.find(".sq_pattern_list");words=elementwords.split(" ");if(words.length>0){for(var i=0;i<words.length;i++){if($patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').length){elementwords=elementwords.replace(words[i],"");elementwords=elementwords.replace(" "," ");elementwords=elementwords.trim();if($patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').data("value")){patternslength+=$patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').data("value").length}finalvalue=finalvalue.replace(new RegExp(words[i],"g"),$patterns.find('li[data-pattern="'+words[i].replace(new RegExp('"',"g"),"")+'"]').data("value"))}}length=elementwords.length+patternslength}}$element.attr("title",finalvalue);$divwrap.find(".sq_length").text(length+"/"+maxvalue);if(length===0||length>maxvalue){$element.attr("style","border: solid 1px red !important")}else{$element.attr("style","border: none !important")}};$.fn.sq_bodyClick=function(ename,cb){return this.each(function(){var $this=$(this),self=this;$(document).on(ename,function sqtempo(e){if(e.target!==self&&!$.contains(self,e.target)){cb.apply(self,[e]);$(document).off(ename,sqtempo)}});$this.on("keydown blur",function sqtabpress(e){if(e.which===9){cb.apply(self,[e]);$this.off("keydown",sqtabpress)}})})};$.fn.toggleSwitch=function(checked){var element=$(this);if(element.prop("checked")&&checked==false||!element.prop("checked")&&checked==true){element.trigger("click")}};$.fn.sq_getSnippet=function(post_id,term_id,taxonomy,post_type){var $this=this;$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_getsnippet",post_id:post_id,term_id:term_id,taxonomy:taxonomy,post_type:post_type,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"){$("div.tooltip").hide();$this.html(response.html);$this.sq_editSnippet();$this.trigger("sq_snippet_loaded");SQ_DEBUG&&console.log("sq_snippet_loaded")}else{$("#sq_blocksnippet").trigger("error.refresh")}if(typeof response.error!=="undefined"){$.sq_showError(response.error,1e4)}}else{$("#sq_blocksnippet").trigger("error.refresh");SQ_DEBUG&&console.log("no data received")}$this.removeClass("sq_minloading")}).fail(function(){SQ_DEBUG&&console.log("no data received");$("#sq_blocksnippet").trigger("error.refresh");$this.removeClass("sq_minloading")},"json")};$.fn.sq_previewSnippet=function(url,show_url){var $this=this;if(typeof url==="undefined"){url=""}if(typeof show_url==="undefined"){show_url=""}$this.find(".sq_snippet_ul").addClass("sq_minloading");$this.find(".sq_snippet_title").html("");$this.find(".sq_snippet_url").html("");$this.find(".sq_snippet_description").html("");$this.find(".sq_snippet_keywords").hide();$this.find(".sq_snippet").show();$this.find(".sq_snippet_update").hide();$this.find(".sq_snippet_customize").hide();$this.find(".ogimage_preview").hide();setTimeout(function(){$.post(sqQuery.ajaxurl,{action:"sq_previewsnippet",url:url,sq_nonce:sqQuery.nonce}).done(function(response){$this.find(".sq_snippet_ul").removeClass("sq_minloading");$this.find(".sq_snippet_update").show();$this.find(".sq_snippet_customize").show();$this.find(".sq_snippet_keywords").show();$this.find(".ogimage_preview").show();if(response){$this.find(".sq_snippet_title").html(response.title);if(show_url!=="")$this.find(".sq_snippet_url").html('<a href="'+url+'" target="_blank">'+show_url+"</a>");else $this.find(".sq_snippet_url").html(response.url);$this.find(".sq_snippet_description").html(response.description)}}).fail(function(){$this.find(".sq_snippet_ul").removeClass("sq_minloading");$this.find(".sq_snippet_update").show()},"json")},500)};$.fn.sq_ajaxSnippetListen=function(){var $this=this;var $input=$("#"+$this.data("input"));var $confirm=$this.data("confirm");var $action=$this.data("action");var $name=$this.data("name");var $value=0;if(!$input.length){$input=$this}if(typeof $confirm!=="undefined"){if(!confirm($confirm))return}if($input.is("checkbox")&&$input.is(":checked")){$value=$input.val()}else if($input.is("select")){$value=$input.find("option:selected").val()}else if($input.is("input")){$value=$input.val()}$this.addClass("sq_minloading");if($action!==""&&$value!==""){$.post(sqQuery.ajaxurl,{action:$action,input:$name,value:$value,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.data!=="undefined"){if(response.data===""){$("#wpbody-content").prepend("Saved")}else{$("#wpbody-content").prepend(response.data)}setTimeout(function(){$this.removeClass("sq_minloading");var $parent=$this.closest("div.sq_save_ajax").parent("div");if($parent.length>0){$parent.find(".sq_deactivated_label").remove();$parent.find(".sq_deactivated").removeClass("sq_deactivated")}else{location.reload()}},1e3)}else if(typeof response.error!=="undefined"){$("body").prepend(response.error);$this.removeClass("sq_minloading")}}).fail(function(){$this.removeClass("sq_minloading");location.reload()},"json")}};if(!$.sq_isGutenberg){$.sq_isGutenberg=function(inp){return typeof window.wp!=="undefined"&&typeof wp.data!=="undefined"&&typeof wp.data.select("core/editor")!=="undefined"&&$.isFunction(wp.data.select("core/editor").getEditedPostAttribute)}}$(document).ready(function(){var $adminbar=$("#wp-admin-bar-sq_bar_menu");var $blocksnippet=false;var sq_snippet_tab="metas";if($adminbar.length>0){if($adminbar.find('#sq_blocksnippet[data-snippet="topmenu"]').length){$blocksnippet=$adminbar.find("#sq_blocksnippet");$blocksnippet.sq_loadSnippet()}else{if($('#sq_blocksnippet[data-snippet!="topmenu"]').length){$blocksnippet=$("#sq_blocksnippet");$adminbar.find("#wp-admin-bar-sq_bar_submenu").remove();$adminbar.find(".ab-item").on("click",function(){if($(".edit-post-layout__content").length>0){$(".edit-post-layout__content").scrollTop($(".edit-post-layout__content").scrollTop()+$blocksnippet.offset().top-100)}else if($(".block-editor-editor-skeleton__content").length>0){$(".block-editor-editor-skeleton__content").scrollTop($(".block-editor-editor-skeleton__content").scrollTop()+$blocksnippet.offset().top-100)}else{$("html,body").scrollTop($blocksnippet.offset().top-50)}});$blocksnippet.addClass("sq_blocksnippet").addClass("sq-shadow-sm").addClass("sq-border-bottom");$blocksnippet.find(".inside").show().sq_loadSnippet()}}if($blocksnippet){$blocksnippet.on("sq_snippet_loaded",function(){$snippet=$(this);$snippet.find(".sq-nav-item.sq-nav-link").on("click",function(){sq_snippet_tab=$(this).data("category")});$snippet.find(".sq-nav-item").removeClass("active");$snippet.find(".sq-tab-pane").removeClass("active");var $tab=$snippet.find(".sq_snippet_menu").find("#sq-nav-item_"+sq_snippet_tab);$tab.addClass("active");$snippet.find($tab.attr("href")).addClass("active")});$blocksnippet.on("error.refresh",function(){$.sq_showError("Couldn't load the page. <span class='sq_snippet_refresh' style='color: #0F75BC; cursor:pointer;'>Please refresh</span>.",0);$(".sq_snippet_refresh").on("click",function(){$blocksnippet.sq_loadSnippet()})})}}})})(jQuery);