SEO SQUIRRLY™ - Version 9.2.11

Version Description

  • 09/11/2019 =
  • SEO Update - Tested and Compatible with WordPress 5.2.3
  • Fix - ranking assistant to set all green on average possitions
  • Fix - Fixed the Squirrly SEO Admin role
Download this release

Release Info

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

Code changes from version 9.2.00 to 9.2.11

classes/FrontController.php CHANGED
@@ -114,6 +114,9 @@ class SQ_Classes_FrontController {
114
  /* show the topbar admin menu and post actions */
115
  SQ_Classes_ObjController::getClass('SQ_Controllers_Snippet');
116
 
 
 
 
117
  }
118
 
119
  /**
114
  /* show the topbar admin menu and post actions */
115
  SQ_Classes_ObjController::getClass('SQ_Controllers_Snippet');
116
 
117
+ /* call the API for save posts */
118
+ SQ_Classes_ObjController::getClass('SQ_Controllers_Api');
119
+
120
  }
121
 
122
  /**
classes/helpers/Tools.php CHANGED
@@ -657,23 +657,6 @@ class SQ_Classes_Helpers_Tools {
657
  return apply_filters('sq_option_' . $key, self::$options[$key]);
658
  }
659
 
660
- /**
661
- * Get the option from database
662
- * @param $key
663
- * @return mixed
664
- */
665
- public static function getMenuVisible($key) {
666
- if (!isset(self::$options['menu'][$key])) {
667
- self::$options = self::getOptions();
668
-
669
- if (!isset(self::$options['menu'][$key])) {
670
- self::$options['menu'][$key] = false;
671
- }
672
- }
673
-
674
- return self::$options['menu'][$key];
675
- }
676
-
677
  /**
678
  * Save the Options in user option table in DB
679
  *
@@ -760,6 +743,23 @@ class SQ_Classes_Helpers_Tools {
760
  delete_user_meta($user_id, $key);
761
  }
762
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
  /**
764
  * Set the header type
765
  * @param string $type
657
  return apply_filters('sq_option_' . $key, self::$options[$key]);
658
  }
659
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
660
  /**
661
  * Save the Options in user option table in DB
662
  *
743
  delete_user_meta($user_id, $key);
744
  }
745
 
746
+ /**
747
+ * Get the option from database
748
+ * @param $key
749
+ * @return mixed
750
+ */
751
+ public static function getMenuVisible($key) {
752
+ if (!isset(self::$options['menu'][$key])) {
753
+ self::$options = self::getOptions();
754
+
755
+ if (!isset(self::$options['menu'][$key])) {
756
+ self::$options['menu'][$key] = false;
757
+ }
758
+ }
759
+
760
+ return self::$options['menu'][$key];
761
+ }
762
+
763
  /**
764
  * Set the header type
765
  * @param string $type
config.json CHANGED
@@ -45,7 +45,6 @@
45
  "actions": {
46
  "action": [
47
  "sq_save_ogimage",
48
- "sq_get_keyword",
49
  "sq_create_demo",
50
  "sq_ajax_type_click",
51
  "sq_ajax_search_blog"
45
  "actions": {
46
  "action": [
47
  "sq_save_ogimage",
 
48
  "sq_create_demo",
49
  "sq_ajax_type_click",
50
  "sq_ajax_search_blog"
controllers/Api.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SQ_Controllers_Api extends SQ_Classes_FrontController {
4
+
5
+ /** @var string token local key */
6
+ private $token;
7
+
8
+ /**
9
+ * Initialize the TinyMCE editor for the current use
10
+ *
11
+ * @return void
12
+ */
13
+ public function hookInit() {
14
+
15
+ if (SQ_Classes_Helpers_Tools::getOption('sq_api') == '')
16
+ return;
17
+
18
+ $this->token = md5(SQ_Classes_Helpers_Tools::getOption('sq_api') . parse_url(home_url(), PHP_URL_HOST));
19
+ //Change the rest api if needed
20
+ add_action('rest_api_init', array($this, 'sqApiCall'));
21
+ }
22
+
23
+
24
+
25
+ function sqApiCall() {
26
+ if (function_exists('register_rest_route')) {
27
+ register_rest_route('save', '/post/', array(
28
+ 'methods' => WP_REST_Server::EDITABLE,
29
+ 'callback' => array($this, 'savePost'),
30
+ ));
31
+
32
+ register_rest_route('test', '/post/', array(
33
+ 'methods' => WP_REST_Server::EDITABLE,
34
+ 'callback' => array($this, 'testConnection'),
35
+ ));
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Test the connection
41
+ * @param WP_REST_Request $request Full details about the request.
42
+ */
43
+ public function testConnection($request) {
44
+ SQ_Classes_Helpers_Tools::setHeader('json');
45
+
46
+ //get the token from API
47
+ $token = $request->get_param('token');
48
+ if ($token <> '') {
49
+ $token = sanitize_text_field($token);
50
+ }
51
+
52
+ if ($this->token <> $token) {
53
+ exit(json_encode(array('connected' => false, 'error' => __('Invalid Token. Please try again', _SQ_PLUGIN_NAME_))));
54
+ }
55
+
56
+ echo json_encode(array('connected' => true, 'error' => false));
57
+ exit();
58
+ }
59
+
60
+ /**
61
+ * Save the Post
62
+ * @param WP_REST_Request $request Full details about the request.
63
+ */
64
+ public function savePost($request) {
65
+ SQ_Classes_Helpers_Tools::setHeader('json');
66
+
67
+ //get the token from API
68
+ $token = $request->get_param('token');
69
+ if ($token <> '') {
70
+ $token = sanitize_text_field($token);
71
+ }
72
+
73
+ if ($this->token <> $token) {
74
+ exit(json_encode(array('error' => __('Connection expired. Please try again', _SQ_PLUGIN_NAME_))));
75
+ }
76
+
77
+ $post = $request->get_param('post');
78
+ if ($post = json_decode($post)) {
79
+ if (isset($post->ID) && $post->ID > 0) {
80
+ $post = new WP_Post($post);
81
+ $post->ID = 0;
82
+ if (isset($post->post_author)) {
83
+ if (is_email($post->post_author)) {
84
+ if ($user = get_user_by('email', $post->post_author)) {
85
+ $post->post_author = $user->ID;
86
+ } else {
87
+ exit(json_encode(array('error' => __('Author not found', _SQ_PLUGIN_NAME_))));
88
+ }
89
+ } else {
90
+ exit(json_encode(array('error' => __('Author not found', _SQ_PLUGIN_NAME_))));
91
+ }
92
+ } else {
93
+ exit(json_encode(array('error' => __('Author not found', _SQ_PLUGIN_NAME_))));
94
+ }
95
+
96
+ $post_ID = wp_insert_post($post->to_array());
97
+ if (is_wp_error($post_ID)) {
98
+ echo json_encode(array('error' => $post_ID->get_error_message()));
99
+ } else {
100
+ echo json_encode(array('saved' => true, 'post_ID' => $post_ID, 'permalink' => get_permalink($post_ID)));
101
+ }
102
+ exit();
103
+ }
104
+ }
105
+ echo json_encode(array('error' => true));
106
+ exit();
107
+ }
108
+
109
+ }
controllers/FocusPages.php CHANGED
@@ -152,6 +152,7 @@ class SQ_Controllers_FocusPages extends SQ_Classes_FrontController {
152
  //set the connection info with GSC and GA
153
  $focuspage->audit->sq_analytics_gsc_connected = (isset($this->checkin->connection_gsc) ? $this->checkin->connection_gsc : 0);
154
  $focuspage->audit->sq_analytics_google_connected = (isset($this->checkin->connection_ga) ? $this->checkin->connection_ga : 0);
 
155
 
156
  SQ_Debug::dump($focuspage, $focuspage->audit);
157
 
152
  //set the connection info with GSC and GA
153
  $focuspage->audit->sq_analytics_gsc_connected = (isset($this->checkin->connection_gsc) ? $this->checkin->connection_gsc : 0);
154
  $focuspage->audit->sq_analytics_google_connected = (isset($this->checkin->connection_ga) ? $this->checkin->connection_ga : 0);
155
+ $focuspage->audit->sq_subscription_serpcheck = (isset($this->checkin->subscription_serpcheck) ? $this->checkin->subscription_serpcheck : 0);
156
 
157
  SQ_Debug::dump($focuspage, $focuspage->audit);
158
 
controllers/Frontend.php CHANGED
@@ -117,10 +117,12 @@ class SQ_Controllers_Frontend extends SQ_Classes_FrontController {
117
  * Hook the Header load
118
  */
119
  public function hookFronthead() {
120
- if (!is_admin() || !defined('SQ_NOCSS') || (defined('SQ_NOCSS') && !SQ_NOCSS)) {
121
- if (!SQ_Classes_Helpers_Tools::isAjax()) {
122
- SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia(_SQ_ASSETS_URL_ . 'css/frontend' . (SQ_DEBUG ? '' : '.min') . '.css');
123
- }
 
 
124
  }
125
  }
126
 
117
  * Hook the Header load
118
  */
119
  public function hookFronthead() {
120
+ if (!is_admin() && defined('SQ_NOCSS') && SQ_NOCSS) {
121
+ return;
122
+ }
123
+
124
+ if (!SQ_Classes_Helpers_Tools::isAjax()) {
125
+ SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia(_SQ_ASSETS_URL_ . 'css/frontend' . (SQ_DEBUG ? '' : '.min') . '.css');
126
  }
127
  }
128
 
controllers/Patterns.php CHANGED
@@ -33,6 +33,10 @@ class SQ_Controllers_Patterns extends SQ_Classes_FrontController {
33
 
34
  //Foreach SQ, if has patterns, replace them
35
  if ($sq_array = $post->sq->toArray()) {
 
 
 
 
36
  $post->sq = $this->processPatterns($sq_array, $post->sq);
37
  }
38
  }
33
 
34
  //Foreach SQ, if has patterns, replace them
35
  if ($sq_array = $post->sq->toArray()) {
36
+
37
+ //set the keywords from sq and not from post
38
+ $this->patterns->keywords = $post->sq->keywords;
39
+
40
  $post->sq = $this->processPatterns($sq_array, $post->sq);
41
  }
42
  }
controllers/Post.php CHANGED
@@ -211,16 +211,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
211
  get_post_status($postarr['ID']) != 'auto-draft' &&
212
  get_post_status($postarr['ID']) != 'inherit'
213
  ) {
214
- //Save the keyword for this post
215
- if ($json = $this->model->getKeyword($postarr['ID'])) {
216
- $json->keyword = addslashes(SQ_Classes_Helpers_Tools::getValue('sq_keyword'));
217
- $this->model->saveKeyword($postarr['ID'], $json);
218
- } else {
219
- $args = array();
220
- $args['keyword'] = addslashes(SQ_Classes_Helpers_Tools::getValue('sq_keyword'));
221
- $this->model->saveKeyword($postarr['ID'], json_decode(json_encode($args)));
222
- }
223
-
224
  //Save the snippet in case is edited in backend and not saved
225
  SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->saveSEO();
226
 
@@ -270,23 +260,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
270
  echo json_encode($return);
271
  exit();
272
 
273
- case 'sq_get_keyword':
274
- if (!current_user_can('sq_manage_snippet')) {
275
- $response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
276
- SQ_Classes_Helpers_Tools::setHeader('json');
277
- echo json_encode($response);
278
- exit();
279
- }
280
-
281
- SQ_Classes_Helpers_Tools::setHeader('json');
282
- if (SQ_Classes_Helpers_Tools::getIsset('post_id')) {
283
- echo json_encode($this->model->getKeywordsFromPost(SQ_Classes_Helpers_Tools::getValue('post_id')));
284
- } else {
285
- echo json_encode(array('error' => true));
286
- }
287
- SQ_Classes_Helpers_Tools::emptyCache();
288
- break;
289
-
290
  case 'sq_create_demo':
291
  $post_type = 'post';
292
  if (post_type_exists($post_type)) {
@@ -294,6 +267,8 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
294
  $json = json_decode(file_get_contents(_SQ_ROOT_DIR_ . 'demo.json'));
295
 
296
  if (isset($json->demo->title) && isset($json->demo->content)) {
 
 
297
  $args = array();
298
  $args['s'] = '"' . addslashes($json->demo->title) . '"';
299
  $args['post_type'] = $post_type;
@@ -314,10 +289,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
314
 
315
  if ($post_id = wp_insert_post($post)) {
316
  if (!is_wp_error($post_id)) {
317
- $args = array();
318
- $args['keyword'] = $json->demo->keyword;
319
- $this->model->saveKeyword($post_id, json_decode(json_encode($args)));
320
-
321
  wp_redirect(admin_url("post.php?post=" . $post_id . "&action=edit&post_type=" . $post_type));
322
  exit();
323
 
@@ -381,6 +352,11 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
381
  private function _checkBriefcaseKeywords($post_id) {
382
  if (SQ_Classes_Helpers_Tools::getIsset('sq_hash')) {
383
  $keywords = SQ_Classes_Helpers_Tools::getValue('sq_briefcase_keyword', array());
 
 
 
 
 
384
  if (!empty($keywords)) {
385
  $sq_hash = SQ_Classes_Helpers_Tools::getValue('sq_hash', md5($post_id));
386
  $url = SQ_Classes_Helpers_Tools::getValue('sq_url', get_permalink($post_id));
211
  get_post_status($postarr['ID']) != 'auto-draft' &&
212
  get_post_status($postarr['ID']) != 'inherit'
213
  ) {
 
 
 
 
 
 
 
 
 
 
214
  //Save the snippet in case is edited in backend and not saved
215
  SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->saveSEO();
216
 
260
  echo json_encode($return);
261
  exit();
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  case 'sq_create_demo':
264
  $post_type = 'post';
265
  if (post_type_exists($post_type)) {
267
  $json = json_decode(file_get_contents(_SQ_ROOT_DIR_ . 'demo.json'));
268
 
269
  if (isset($json->demo->title) && isset($json->demo->content)) {
270
+ @setrawcookie('sq_keyword', rawurlencode($json->demo->keyword), strtotime('+1 hour'), COOKIEPATH, COOKIE_DOMAIN, is_ssl());
271
+
272
  $args = array();
273
  $args['s'] = '"' . addslashes($json->demo->title) . '"';
274
  $args['post_type'] = $post_type;
289
 
290
  if ($post_id = wp_insert_post($post)) {
291
  if (!is_wp_error($post_id)) {
 
 
 
 
292
  wp_redirect(admin_url("post.php?post=" . $post_id . "&action=edit&post_type=" . $post_type));
293
  exit();
294
 
352
  private function _checkBriefcaseKeywords($post_id) {
353
  if (SQ_Classes_Helpers_Tools::getIsset('sq_hash')) {
354
  $keywords = SQ_Classes_Helpers_Tools::getValue('sq_briefcase_keyword', array());
355
+
356
+ if (empty($keywords)) { //if not from brifcase, check the keyword
357
+ $keywords[] = SQ_Classes_Helpers_Tools::getValue('sq_keyword');
358
+ }
359
+
360
  if (!empty($keywords)) {
361
  $sq_hash = SQ_Classes_Helpers_Tools::getValue('sq_hash', md5($post_id));
362
  $url = SQ_Classes_Helpers_Tools::getValue('sq_url', get_permalink($post_id));
controllers/Sitemaps.php CHANGED
@@ -112,6 +112,13 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController {
112
  'order' => 'DESC',
113
  );
114
 
 
 
 
 
 
 
 
115
  //show products
116
  if ($this->model->type == 'sitemap-product') {
117
  if (SQ_Classes_Helpers_Tools::isEcommerce() && $sq_sitemap[$this->model->type][1] == 2) {
@@ -437,6 +444,11 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController {
437
  }
438
  }
439
 
 
 
 
 
 
440
  return esc_url(trailingslashit(home_url())) . $sitemap;
441
  }
442
 
@@ -529,6 +541,7 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController {
529
  AND r.term_taxonomy_id = tt.term_taxonomy_id
530
  ) as lastmod";
531
 
 
532
  return $query;
533
  }
534
 
112
  'order' => 'DESC',
113
  );
114
 
115
+ $this->model->setCurrentLanguage();
116
+ if($this->model->language <> ''){
117
+ if (!SQ_Classes_Helpers_Tools::getOption('sq_sitemap_combinelangs')) {
118
+ $sq_query['lang'] = $this->model->language;
119
+ }
120
+ }
121
+
122
  //show products
123
  if ($this->model->type == 'sitemap-product') {
124
  if (SQ_Classes_Helpers_Tools::isEcommerce() && $sq_sitemap[$this->model->type][1] == 2) {
444
  }
445
  }
446
 
447
+ $this->model->setCurrentLanguage();
448
+ if($this->model->language <> '' && function_exists('pll_home_url')){
449
+ return pll_home_url($this->model->language) . $sitemap;
450
+ }
451
+
452
  return esc_url(trailingslashit(home_url())) . $sitemap;
453
  }
454
 
541
  AND r.term_taxonomy_id = tt.term_taxonomy_id
542
  ) as lastmod";
543
 
544
+
545
  return $query;
546
  }
547
 
models/Assistant.php CHANGED
@@ -622,7 +622,6 @@ class SQ_Models_Assistant {
622
  $rank->average_position > 0 && $rank->average_position <= 10) {
623
  return true;
624
  }
625
- break;
626
  }
627
  }
628
 
622
  $rank->average_position > 0 && $rank->average_position <= 10) {
623
  return true;
624
  }
 
625
  }
626
  }
627
 
models/Post.php CHANGED
@@ -227,239 +227,4 @@ class SQ_Models_Post {
227
  return false;
228
  }
229
 
230
- /**
231
- * Save/Update Meta in database
232
- *
233
- * @param integer $post_id
234
- * @param array $metas [key,value]
235
- * @return array|boolean
236
- */
237
- public function savePostMeta($post_id, $metas = array()) {
238
- global $wpdb;
239
-
240
- if ((int)$post_id == 0 || empty($metas))
241
- return false;
242
-
243
- foreach ($metas as $meta) {
244
- $sql = "SELECT `meta_value`
245
- FROM `" . $wpdb->postmeta . "`
246
- WHERE `meta_key` = '" . $meta['key'] . "' AND `post_id`=" . (int)$post_id;
247
-
248
- if ($wpdb->get_row($sql)) {
249
- $sql = "UPDATE `" . $wpdb->postmeta . "`
250
- SET `meta_value` = '" . addslashes($meta['value']) . "'
251
- WHERE `meta_key` = '" . $meta['key'] . "' AND `post_id`=" . (int)$post_id;
252
- } else {
253
- $sql = "INSERT INTO `" . $wpdb->postmeta . "`
254
- (`post_id`,`meta_key`,`meta_value`)
255
- VALUES (" . (int)$post_id . ",'" . $meta['key'] . "','" . addslashes($meta['value']) . "')";
256
- }
257
- $wpdb->query($sql);
258
- }
259
-
260
- return $metas;
261
- }
262
-
263
- /**
264
- * check if there are keywords saved
265
- * @global object $wpdb
266
- * @return integer|false
267
- */
268
- public function countKeywords() {
269
- global $wpdb;
270
-
271
- if ($posts = $wpdb->get_row("SELECT count(`post_id`) as count
272
- FROM `" . $wpdb->postmeta . "`
273
- WHERE (`meta_key` = '_sq_post_keyword')")) {
274
-
275
- return $posts->count;
276
- }
277
-
278
- return false;
279
- }
280
-
281
- /**
282
- * check if there are keywords saved
283
- * @global object $wpdb
284
- * @return integer|false
285
- */
286
- public function getPostWithKeywords($filter = '', $ord = 'meta_id') {
287
- global $wpdb;
288
-
289
- if ($filter <> '') {
290
- $filter = ' AND (' . $filter . ') ';
291
- }
292
-
293
- if ($posts = $wpdb->get_results("SELECT `post_id`, `meta_value`
294
- FROM `" . $wpdb->postmeta . "`
295
- WHERE (`meta_key` = '_sq_post_keyword')"
296
- . $filter .
297
- 'ORDER BY `' . $ord . '`')) {
298
-
299
- $posts = array_map(array($this, 'jsonDecodeValue'), $posts);
300
-
301
- return $posts;
302
- }
303
-
304
- return false;
305
- }
306
-
307
- public function jsonDecodeValue($post) {
308
- $post->meta_value = json_decode($post->meta_value);
309
- return $post;
310
- }
311
-
312
- /**
313
- * get the keyword
314
- * @global object $wpdb
315
- * @param integer $post_id
316
- * @return boolean
317
- */
318
- public function getKeyword($post_id) {
319
- global $wpdb;
320
-
321
- if ($row = $wpdb->get_row("SELECT `post_id`, `meta_value`
322
- FROM `" . $wpdb->postmeta . "`
323
- WHERE (`meta_key` = '_sq_post_keyword' AND `post_id`=" . (int)$post_id . ")
324
- ORDER BY `meta_id` DESC")) {
325
-
326
- return json_decode($row->meta_value);
327
- }
328
-
329
- return false;
330
- }
331
-
332
- /**
333
- * Save the post keyword
334
- * @param integer $post_id
335
- * @param object $args
336
- */
337
- public function saveKeyword($post_id, $args) {
338
- $args->update = current_time('timestamp');
339
-
340
- $meta[] = array('key' => '_sq_post_keyword',
341
- 'value' => json_encode($args));
342
-
343
- $this->savePostMeta($post_id, $meta);
344
-
345
- return json_encode($args);
346
- }
347
-
348
- public function getKeywordsFromPost($id) {
349
- $post = get_post($id);
350
- return $this->_getKeywordsbyDensity($post);
351
- }
352
-
353
- /**
354
- * Get keyword by density from post
355
- *
356
- * @return array
357
- */
358
- private function _getKeywordsbyDensity($post) {
359
- $keywords = array();
360
- $content = '';
361
-
362
- if (function_exists('preg_replace')) {
363
- $content = strtolower(preg_replace('/[^a-zA-Z0-9-.]/', ' ', strip_tags($post->post_content)));
364
- } else {
365
- $content = strtolower(strip_tags($post->post_content));
366
- }
367
-
368
- $words = explode(" ", $content);
369
- $phrases = $this->searchPhrase($content);
370
-
371
- if ($post->post_title == '' || count((array)$words) < 5) {
372
- return false;
373
- }
374
-
375
- $common_words = "a,at,i,he,she,it,and,me,my,you,the,tags,hash,to,that,this,they,their";
376
- $common_words = strtolower($common_words);
377
- $common_words = explode(",", $common_words);
378
- // Get keywords
379
- $words_sum = 0;
380
- foreach ($words as $value) {
381
- $common = false;
382
- $value = $this->trimReplace($value);
383
- if (strlen($value) >= 3) {
384
- foreach ($common_words as $common_word) {
385
- if ($common_word == $value) {
386
- $common = true;
387
- }
388
- }
389
- if ($common != true) {
390
- if (!preg_match("/http/i", $value) && !preg_match("/mailto:/i", $value)) {
391
- $keywords[] = SQ_Classes_Tools::i18n($value);
392
- $words_sum++;
393
- }
394
- }
395
- }
396
- }
397
-
398
- $results = $results1 = $results2 = array();
399
- if (is_array($keywords) && !empty($keywords)) {
400
- // Do some maths and write array
401
- $keywords = array_count_values($keywords);
402
- arsort($keywords);
403
-
404
- foreach ($keywords as $key => $value) {
405
- $percent = 100 / $words_sum * $value;
406
- if ($percent > 1) {
407
- foreach ($phrases as $phrase => $count) {
408
- if (strpos($phrase, $key) !== false && !in_array($phrase, $results)) {
409
- if (strpos(strtolower($post->post_title), $phrase) !== false) {
410
- return $phrase;
411
- }
412
- }
413
- }
414
- }
415
- }
416
- }
417
- // Return array
418
- return false;
419
- }
420
-
421
- public function searchPhrase($text) {
422
- $words = explode(".", strtolower($text));
423
- //print_r($words);
424
- $frequencies = array();
425
- foreach ($words as $str) {
426
- $phrases = $this->twoWordPhrases($str);
427
-
428
- foreach ($phrases as $phrase) {
429
- $key = join(' ', $phrase);
430
- if (!isset($frequencies[$key])) {
431
- $frequencies[$key] = 0;
432
- }
433
- $frequencies[$key]++;
434
- }
435
- }
436
- arsort($frequencies);
437
- if (sizeof($frequencies) > 10) {
438
- $frequencies = array_slice($frequencies, 0, 10);
439
- }
440
- return $frequencies;
441
- }
442
-
443
- public function twoWordPhrases($str) {
444
- $words = preg_split('#\s+#', $str, -1, PREG_SPLIT_NO_EMPTY);
445
-
446
- $phrases = array();
447
- if (count((array)$words) > 2) {
448
- foreach (range(0, count((array)$words) - 2) as $offset) {
449
- $phrases[] = array_slice($words, $offset, 2);
450
- }
451
- }
452
- return $phrases;
453
- }
454
-
455
- /**
456
- * Get the newlines out
457
- *
458
- * @return string
459
- */
460
- private function trimReplace($string) {
461
- $string = trim($string);
462
- return (string)str_replace(array("\r", "\r\n", "\n"), '', $string);
463
- }
464
-
465
  }
227
  return false;
228
  }
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
models/Qss.php CHANGED
@@ -59,6 +59,7 @@ class SQ_Models_Qss {
59
  ON DUPLICATE KEY
60
  UPDATE blog_id = '$blog_id', URL = '$url', url_hash = '$url_hash', post_id = '$post_id', seo = '$seo', date_time = '$date_time'";
61
 
 
62
  return $wpdb->query($sq_query);
63
  }
64
 
59
  ON DUPLICATE KEY
60
  UPDATE blog_id = '$blog_id', URL = '$url', url_hash = '$url_hash', post_id = '$post_id', seo = '$seo', date_time = '$date_time'";
61
 
62
+ //echo $wpdb->query($sq_query) . "\n";
63
  return $wpdb->query($sq_query);
64
  }
65
 
models/RoleManager.php CHANGED
@@ -51,16 +51,51 @@ class SQ_Models_RoleManager {
51
  * in case they don't exists
52
  */
53
  public function addSQRoles() {
 
54
  global $wp_roles;
55
 
56
- if (!$wp_roles->is_role('sq_seo_editor') || !$wp_roles->is_role('sq_seo_admin')) {
57
- $this->updateSQCap('sq_seo_author', 'author');
58
- $this->updateSQCap('sq_seo_admin', 'editor');
59
- $this->updateSQCap('sq_seo_admin', 'administrator');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
- //get all Squirrly roles and caps
62
- $this->addSQRole('sq_seo_editor', __('Squirrly SEO Editor', _SQ_PLUGIN_NAME_), 'editor');
63
- $this->addSQRole('sq_seo_admin', __('Squirrly SEO Admin', _SQ_PLUGIN_NAME_), 'editor');
 
 
 
64
 
65
  }
66
  }
@@ -86,22 +121,21 @@ class SQ_Models_RoleManager {
86
  }
87
 
88
  public function removeSQCaps() {
89
- global $wp_roles;
90
-
91
- $this->removeCap('author', $this->getSQCaps('sq_seo_author'));
92
- $this->removeCap('editor', $this->getSQCaps('sq_seo_editor'));
93
- $this->removeCap('administrator', $this->getSQCaps('sq_seo_admin'));
94
 
95
- //get all Squirrly roles and caps
96
- $sqcaps = $this->getSQCaps();
97
- if (!empty($sqcaps)) {
98
- foreach (array_keys($sqcaps) as $role) {
99
- if ($wp_roles->is_role($role)) {
100
- $this->removeCap($role, $this->getSQCaps($role));
101
  }
102
-
103
  }
104
  }
 
105
  }
106
 
107
  /**
@@ -146,6 +180,10 @@ class SQ_Models_RoleManager {
146
  public function addCap($name, $capabilities) {
147
  $role = get_role($name);
148
 
 
 
 
 
149
  foreach ($capabilities as $capability => $grant) {
150
  $role->add_cap($capability, $grant);
151
  }
@@ -158,6 +196,11 @@ class SQ_Models_RoleManager {
158
  */
159
  public function removeCap($name, $capabilities) {
160
  $role = get_role($name);
 
 
 
 
 
161
  if ($role) {
162
  foreach ($capabilities as $capability => $grant) {
163
  $role->remove_cap($capability);
51
  * in case they don't exists
52
  */
53
  public function addSQRoles() {
54
+ /** @var $wp_roles WP_Roles */
55
  global $wp_roles;
56
 
57
+ //$this->removeSQCaps();
58
+ if (function_exists('wp_roles')) {
59
+ $allroles = wp_roles()->get_names();
60
+ if (!empty($allroles)) {
61
+ $allroles = array_keys($allroles);
62
+ }
63
+
64
+ if (!empty($allroles)) {
65
+ foreach ($allroles as $role) {
66
+ if (current_user_can('manage_options') || $role == 'sq_seo_admin') {
67
+ $this->updateSQCap('sq_seo_admin', $role);
68
+ continue;
69
+ }
70
+
71
+ switch ($role) {
72
+ case 'editor':
73
+ case 'sq_seo_editor':
74
+ $this->updateSQCap('sq_seo_editor', $role);
75
+ break;
76
+ case 'author':
77
+ case 'sq_seo_author':
78
+ case 'contributor':
79
+ default:
80
+ if (current_user_can('edit_posts')) {
81
+ $this->updateSQCap('sq_seo_author', $role);
82
+ }
83
+ break;
84
+
85
+ }
86
+ }
87
+ }
88
+
89
+ if (!$wp_roles || !isset($wp_roles->roles) || !method_exists($wp_roles, 'is_role')) {
90
+ return;
91
+ }
92
 
93
+ if (!$wp_roles->is_role('sq_seo_editor') || !$wp_roles->is_role('sq_seo_admin')) {
94
+ //get all Squirrly roles and caps
95
+ $this->addSQRole('sq_seo_editor', __('Squirrly SEO Editor', _SQ_PLUGIN_NAME_), 'editor');
96
+ $this->addSQRole('sq_seo_admin', __('Squirrly SEO Admin', _SQ_PLUGIN_NAME_), 'editor');
97
+
98
+ }
99
 
100
  }
101
  }
121
  }
122
 
123
  public function removeSQCaps() {
124
+ if (function_exists('wp_roles')) {
125
+ $allroles = wp_roles()->get_names();
126
+ if (!empty($allroles)) {
127
+ $allroles = array_keys($allroles);
128
+ }
129
 
130
+ if (!empty($allroles)) {
131
+ foreach ($allroles as $role) {
132
+ $this->removeCap($role, $this->getSQCaps('sq_seo_admin'));
133
+ $this->removeCap($role, $this->getSQCaps('sq_seo_editor'));
134
+ $this->removeCap($role, $this->getSQCaps('sq_seo_author'));
 
135
  }
 
136
  }
137
  }
138
+
139
  }
140
 
141
  /**
180
  public function addCap($name, $capabilities) {
181
  $role = get_role($name);
182
 
183
+ if (!$role || !method_exists($role, 'add_cap')) {
184
+ return;
185
+ }
186
+
187
  foreach ($capabilities as $capability => $grant) {
188
  $role->add_cap($capability, $grant);
189
  }
196
  */
197
  public function removeCap($name, $capabilities) {
198
  $role = get_role($name);
199
+
200
+ if (!$role || !method_exists($role, 'remove_cap')) {
201
+ return;
202
+ }
203
+
204
  if ($role) {
205
  foreach ($capabilities as $capability => $grant) {
206
  $role->remove_cap($capability);
models/Sitemaps.php CHANGED
@@ -12,10 +12,11 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
12
  public $args = array();
13
  public $frequency;
14
  public $type;
 
15
  protected $postmodified;
16
 
17
  public function __construct() {
18
- //parent::__construct();
19
  //For sitemap ping
20
  $this->args['timeout'] = 5;
21
 
@@ -25,6 +26,19 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
25
  $this->frequency['weekly'] = array('sitemap-home' => array(1, 'weekly'), 'sitemap-product' => array(0.8, 'weekly'), 'sitemap-post' => array(0.8, 'weekly'), 'sitemap-page' => array(0.6, 'monthly'), 'sitemap-category' => array(0.3, 'monthly'), 'sitemap-post_tag' => array(0.5, 'weekly'), 'sitemap-archive' => array(0.3, 'monthly'), 'sitemap-author' => array(0.3, 'weekly'), 'sitemap-custom-tax' => array(0.3, 'weekly'), 'sitemap-custom-post' => array(0.8, 'weekly'), 'sitemap-attachment' => array(0.3, 'monthly'));
26
  $this->frequency['monthly'] = array('sitemap-home' => array(1, 'monthly'), 'sitemap-product' => array(0.8, 'weekly'), 'sitemap-post' => array(0.8, 'monthly'), 'sitemap-page' => array(0.6, 'monthly'), 'sitemap-category' => array(0.3, 'monthly'), 'sitemap-post_tag' => array(0.5, 'monthly'), 'sitemap-archive' => array(0.3, 'monthly'), 'sitemap-author' => array(0.3, 'monthly'), 'sitemap-custom-tax' => array(0.3, 'monthly'), 'sitemap-custom-post' => array(0.8, 'monthly'), 'sitemap-attachment' => array(0.3, 'monthly'));
27
  $this->frequency['yearly'] = array('sitemap-home' => array(1, 'monthly'), 'sitemap-product' => array(0.8, 'weekly'), 'sitemap-post' => array(0.8, 'monthly'), 'sitemap-page' => array(0.6, 'yearly'), 'sitemap-category' => array(0.3, 'yearly'), 'sitemap-post_tag' => array(0.5, 'monthly'), 'sitemap-archive' => array(0.3, 'yearly'), 'sitemap-author' => array(0.3, 'yearly'), 'sitemap-custom-tax' => array(0.3, 'yearly'), 'sitemap-custom-post' => array(0.8, 'monthly'), 'sitemap-attachment' => array(0.3, 'monthly'));
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
 
30
  /**
@@ -48,12 +62,14 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
48
  $homes[] = $xml;
49
  }
50
  } else {
 
51
  $xml = array();
52
- $xml['loc'] = esc_url(pll_home_url());
53
  $xml['lastmod'] = trim(mysql2date('Y-m-d\TH:i:s+00:00', date('Y-m-d', strtotime(get_lastpostmodified('gmt'))), false));
54
  $xml['changefreq'] = $this->frequency[SQ_Classes_Helpers_Tools::getOption('sq_sitemap_frequency')]['sitemap-home'][1];
55
  $xml['priority'] = $this->frequency[SQ_Classes_Helpers_Tools::getOption('sq_sitemap_frequency')]['sitemap-home'][0];
56
  $homes[] = $xml;
 
57
  }
58
  } else {
59
 
@@ -86,6 +102,8 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
86
  global $wp_query, $sq_query;
87
 
88
  $wp_query = new WP_Query($sq_query);
 
 
89
  $posts = $post_ids = array();
90
  $posts['contains'] = array();
91
  if (have_posts()) {
@@ -169,6 +187,8 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
169
  global $wp_query, $sq_query;
170
 
171
  $wp_query = new WP_Query($sq_query);
 
 
172
  $posts = array();
173
  $posts['contains'] = array();
174
  if (have_posts()) {
@@ -215,6 +235,7 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
215
  public function getListNews() {
216
  global $wp_query, $sq_query;
217
  $wp_query = new WP_Query($sq_query);
 
218
 
219
  $posts = array();
220
  $posts['contains'] = array();
@@ -340,7 +361,10 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
340
 
341
  }
342
  } else {
343
- $terms = get_terms(str_replace('sitemap-', '', $type));
 
 
 
344
  }
345
 
346
  if (!isset(SQ_Classes_Helpers_Tools::$options['sq_sitemap'][$type])) {
@@ -349,6 +373,13 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
349
 
350
  if (!is_wp_error($terms) && !empty($terms)) {
351
  foreach ($terms AS $term) {
 
 
 
 
 
 
 
352
  if ($post = SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->setPostByTaxID($term->term_id, $term->taxonomy)) {
353
  if ($post->sq->nositemap || !$post->sq->do_sitemap) {
354
  continue;
12
  public $args = array();
13
  public $frequency;
14
  public $type;
15
+ public $language; //plugins language
16
  protected $postmodified;
17
 
18
  public function __construct() {
19
+
20
  //For sitemap ping
21
  $this->args['timeout'] = 5;
22
 
26
  $this->frequency['weekly'] = array('sitemap-home' => array(1, 'weekly'), 'sitemap-product' => array(0.8, 'weekly'), 'sitemap-post' => array(0.8, 'weekly'), 'sitemap-page' => array(0.6, 'monthly'), 'sitemap-category' => array(0.3, 'monthly'), 'sitemap-post_tag' => array(0.5, 'weekly'), 'sitemap-archive' => array(0.3, 'monthly'), 'sitemap-author' => array(0.3, 'weekly'), 'sitemap-custom-tax' => array(0.3, 'weekly'), 'sitemap-custom-post' => array(0.8, 'weekly'), 'sitemap-attachment' => array(0.3, 'monthly'));
27
  $this->frequency['monthly'] = array('sitemap-home' => array(1, 'monthly'), 'sitemap-product' => array(0.8, 'weekly'), 'sitemap-post' => array(0.8, 'monthly'), 'sitemap-page' => array(0.6, 'monthly'), 'sitemap-category' => array(0.3, 'monthly'), 'sitemap-post_tag' => array(0.5, 'monthly'), 'sitemap-archive' => array(0.3, 'monthly'), 'sitemap-author' => array(0.3, 'monthly'), 'sitemap-custom-tax' => array(0.3, 'monthly'), 'sitemap-custom-post' => array(0.8, 'monthly'), 'sitemap-attachment' => array(0.3, 'monthly'));
28
  $this->frequency['yearly'] = array('sitemap-home' => array(1, 'monthly'), 'sitemap-product' => array(0.8, 'weekly'), 'sitemap-post' => array(0.8, 'monthly'), 'sitemap-page' => array(0.6, 'yearly'), 'sitemap-category' => array(0.3, 'yearly'), 'sitemap-post_tag' => array(0.5, 'monthly'), 'sitemap-archive' => array(0.3, 'yearly'), 'sitemap-author' => array(0.3, 'yearly'), 'sitemap-custom-tax' => array(0.3, 'yearly'), 'sitemap-custom-post' => array(0.8, 'monthly'), 'sitemap-attachment' => array(0.3, 'monthly'));
29
+
30
+
31
+ }
32
+
33
+ public function setCurrentLanguage() {
34
+ //Set the local language
35
+ global $polylang;
36
+ $this->language = get_locale();
37
+ if ($polylang && function_exists('pll_default_language') && isset($polylang->links_model)) {
38
+ if (!$this->language = $polylang->links_model->get_language_from_url()) {
39
+ $this->language = pll_default_language();
40
+ }
41
+ }
42
  }
43
 
44
  /**
62
  $homes[] = $xml;
63
  }
64
  } else {
65
+
66
  $xml = array();
67
+ $xml['loc'] = esc_url(pll_home_url($this->language));
68
  $xml['lastmod'] = trim(mysql2date('Y-m-d\TH:i:s+00:00', date('Y-m-d', strtotime(get_lastpostmodified('gmt'))), false));
69
  $xml['changefreq'] = $this->frequency[SQ_Classes_Helpers_Tools::getOption('sq_sitemap_frequency')]['sitemap-home'][1];
70
  $xml['priority'] = $this->frequency[SQ_Classes_Helpers_Tools::getOption('sq_sitemap_frequency')]['sitemap-home'][0];
71
  $homes[] = $xml;
72
+
73
  }
74
  } else {
75
 
102
  global $wp_query, $sq_query;
103
 
104
  $wp_query = new WP_Query($sq_query);
105
+ $wp_query->is_paged = false; //remove pagination
106
+
107
  $posts = $post_ids = array();
108
  $posts['contains'] = array();
109
  if (have_posts()) {
187
  global $wp_query, $sq_query;
188
 
189
  $wp_query = new WP_Query($sq_query);
190
+ $wp_query->is_paged = false; //remove pagination
191
+
192
  $posts = array();
193
  $posts['contains'] = array();
194
  if (have_posts()) {
235
  public function getListNews() {
236
  global $wp_query, $sq_query;
237
  $wp_query = new WP_Query($sq_query);
238
+ $wp_query->is_paged = false; //remove pagination
239
 
240
  $posts = array();
241
  $posts['contains'] = array();
361
 
362
  }
363
  } else {
364
+ $terms = get_terms(str_replace('sitemap-', '', $type), array(
365
+ 'hide_empty' => true,
366
+ 'number' => 500
367
+ ));
368
  }
369
 
370
  if (!isset(SQ_Classes_Helpers_Tools::$options['sq_sitemap'][$type])) {
373
 
374
  if (!is_wp_error($terms) && !empty($terms)) {
375
  foreach ($terms AS $term) {
376
+ //make sure it has a language
377
+ if (function_exists('pll_get_post_translations')) {
378
+ if (!$term->term_id = pll_get_term($term->term_id, $this->language)) {
379
+ continue;
380
+ }
381
+ }
382
+
383
  if ($post = SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->setPostByTaxID($term->term_id, $term->taxonomy)) {
384
  if ($post->sq->nositemap || !$post->sq->do_sitemap) {
385
  continue;
models/Snippet.php CHANGED
@@ -43,6 +43,14 @@ class SQ_Models_Snippet {
43
  $sq->tw_media = SQ_Classes_Helpers_Tools::getValue('sq_tw_media', '');
44
  $sq->tw_type = SQ_Classes_Helpers_Tools::getValue('sq_tw_type', '');
45
 
 
 
 
 
 
 
 
 
46
  if (SQ_Classes_Helpers_Tools::getValue('sq_jsonld_code_type', 'auto') == 'custom') {
47
  if (isset($_POST['sq_jsonld'])) {
48
  $allowed_html = array(
@@ -50,7 +58,7 @@ class SQ_Models_Snippet {
50
  );
51
  $sq->jsonld = strip_tags(wp_unslash(trim(wp_kses($_POST['sq_jsonld'], $allowed_html))));
52
  }
53
- }else{
54
  $sq->jsonld = '';
55
  }
56
 
@@ -62,7 +70,7 @@ class SQ_Models_Snippet {
62
  );
63
  $sq->fpixel = wp_unslash(trim(wp_kses($_POST['sq_fpixel'], $allowed_html)));
64
  }
65
- }else{
66
  $sq->fpixel = '';
67
  }
68
 
43
  $sq->tw_media = SQ_Classes_Helpers_Tools::getValue('sq_tw_media', '');
44
  $sq->tw_type = SQ_Classes_Helpers_Tools::getValue('sq_tw_type', '');
45
 
46
+ //Sanitize Emoticons
47
+ $sq->title = wp_encode_emoji($sq->title);
48
+ $sq->description = wp_encode_emoji($sq->description);
49
+ $sq->og_title = wp_encode_emoji($sq->og_title);
50
+ $sq->og_description = wp_encode_emoji($sq->og_description);
51
+ $sq->tw_title = wp_encode_emoji($sq->tw_title);
52
+ $sq->tw_description = wp_encode_emoji($sq->tw_description);
53
+
54
  if (SQ_Classes_Helpers_Tools::getValue('sq_jsonld_code_type', 'auto') == 'custom') {
55
  if (isset($_POST['sq_jsonld'])) {
56
  $allowed_html = array(
58
  );
59
  $sq->jsonld = strip_tags(wp_unslash(trim(wp_kses($_POST['sq_jsonld'], $allowed_html))));
60
  }
61
+ } else {
62
  $sq->jsonld = '';
63
  }
64
 
70
  );
71
  $sq->fpixel = wp_unslash(trim(wp_kses($_POST['sq_fpixel'], $allowed_html)));
72
  }
73
+ } else {
74
  $sq->fpixel = '';
75
  }
76
 
models/bulkseo/Metas.php CHANGED
@@ -25,12 +25,6 @@ class SQ_Models_Bulkseo_Metas extends SQ_Models_Abstract_Assistant {
25
 
26
  $this->_keyword = $this->_post->sq->keywords;
27
 
28
- if (!$this->_keyword) {
29
- if (isset($this->_post->ID) && $json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($this->_post->ID)) {
30
- $this->_keyword = $json->keyword;
31
- }
32
- }
33
-
34
  //Get all the patterns
35
  $this->_patterns = SQ_Classes_Helpers_Tools::getOption('patterns');
36
 
25
 
26
  $this->_keyword = $this->_post->sq->keywords;
27
 
 
 
 
 
 
 
28
  //Get all the patterns
29
  $this->_patterns = SQ_Classes_Helpers_Tools::getOption('patterns');
30
 
models/domain/Patterns.php CHANGED
@@ -466,34 +466,21 @@ class SQ_Models_Domain_Patterns extends SQ_Models_Abstract_Domain {
466
  }
467
 
468
  protected $_caption; //Attachment caption
 
 
 
469
  protected $_keyword; //Replaced with the posts focus keyword
470
  protected $_focuskw; //Same as keyword
471
 
472
- public function getKeyword() {
473
- if (!isset($this->_keyword) || $this->_keyword == '') {
474
- if (isset($this->id) && (int)$this->id > 0) {
475
- if ($json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($this->id)) {
476
- $this->_focuskw = $this->_keyword = SQ_Classes_Helpers_Sanitize::i18n($json->keyword);
477
- return $this->_keyword;
478
- }
479
- }
480
- $this->_keyword = '';
481
- }
482
 
 
483
  return $this->_keyword;
484
  }
485
 
486
  public function getFocuskw() {
487
- if (!isset($this->_focuskw) || $this->_focuskw == '') {
488
- if (isset($this->id) && (int)$this->id > 0) {
489
- if ($json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($this->id)) {
490
- $this->_focuskw = $this->_keyword = SQ_Classes_Helpers_Sanitize::i18n($json->keyword);
491
- return $this->_focuskw;
492
- }
493
- }
494
- $this->_focuskw = '';
495
- }
496
-
497
  return $this->_focuskw;
498
  }
499
 
466
  }
467
 
468
  protected $_caption; //Attachment caption
469
+
470
+ //handle keywords
471
+ protected $_keywords;
472
  protected $_keyword; //Replaced with the posts focus keyword
473
  protected $_focuskw; //Same as keyword
474
 
475
+ public function setKeywords($value) {
476
+ $this->_focuskw = $this->_keyword =$value;
477
+ }
 
 
 
 
 
 
 
478
 
479
+ public function getKeyword() {
480
  return $this->_keyword;
481
  }
482
 
483
  public function getFocuskw() {
 
 
 
 
 
 
 
 
 
 
484
  return $this->_focuskw;
485
  }
486
 
models/focuspages/Accuracy.php CHANGED
@@ -19,7 +19,7 @@ class SQ_Models_Focuspages_Accuracy extends SQ_Models_Abstract_Assistant {
19
  $this->_tasks[$this->_category] = array(
20
  'accuracy' => array(
21
  'title' => __("Rank accuracy", _SQ_PLUGIN_NAME_),
22
- 'description' => sprintf(__("Do you need better accuracy for your ranking results? %s Look at the Business Plan pricing for Squirrly SEO. %s The SERP Checker Available on FREE and PRO Plans is made via Search Console integration, which means that the information is not as accurate as possible and will not clearly depict the exact position in Google. %s Why? %s Google uses an average when it comes to the position. And it's not the true position. The average is made according to the positions that the page was found on when users did click on it. %s Also, the data inside Search Console is a bit old, so if you're actively trying to increase your rankings day in and day out, you need the Business Plan. %s If you just want casually to know your rankings and not care about FULL accuracy, then you can stick with your current plan.", _SQ_PLUGIN_NAME_), '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />'),
23
  ),
24
  );
25
  }
@@ -55,7 +55,7 @@ class SQ_Models_Focuspages_Accuracy extends SQ_Models_Abstract_Assistant {
55
  * @return string
56
  */
57
  public function getColor($completed) {
58
- if (isset($this->_audit->data->serp_checker) && !empty($this->_audit->data->serp_checker)) {
59
  return self::TASK_COMPLETE;
60
  } elseif ($this->_audit->sq_analytics_gsc_connected) {
61
  return self::TASK_OBCURE;
@@ -69,13 +69,12 @@ class SQ_Models_Focuspages_Accuracy extends SQ_Models_Abstract_Assistant {
69
  * @return bool|WP_Error
70
  */
71
  public function checkAccuracy($task) {
72
-
73
- if (isset($this->_audit->data->serp_checker) && !empty($this->_audit->data->serp_checker)) {
74
- $task['completed'] = true;
75
- }else{
76
  $task['completed'] = false;
 
77
  }
78
 
 
79
  return $task;
80
  }
81
 
19
  $this->_tasks[$this->_category] = array(
20
  'accuracy' => array(
21
  'title' => __("Rank accuracy", _SQ_PLUGIN_NAME_),
22
+ 'description' => sprintf(__("Do you need better accuracy for your ranking results? %s Look at the %sBusiness Plan%s pricing for Squirrly SEO. %s The SERP Checker Available on FREE and PRO Plans is made via Search Console integration, which means that the information is not as accurate as possible and will not clearly depict the exact position in Google. %s Why? %s Google uses an average when it comes to the position. And it's not the true position. The average is made according to the positions that the page was found on when users did click on it. %s Also, the data inside Search Console is a bit old, so if you're actively trying to increase your rankings day in and day out, you need the Business Plan. %s If you just want casually to know your rankings and not care about FULL accuracy, then you can stick with your current plan.", _SQ_PLUGIN_NAME_), '<br /><br />', '<a href="' . SQ_Classes_RemoteController::getMySquirrlyLink('plans') . '" target="_blank"><strong>', '</strong></a>', '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />'),
23
  ),
24
  );
25
  }
55
  * @return string
56
  */
57
  public function getColor($completed) {
58
+ if ($this->_audit->sq_subscription_serpcheck) {
59
  return self::TASK_COMPLETE;
60
  } elseif ($this->_audit->sq_analytics_gsc_connected) {
61
  return self::TASK_OBCURE;
69
  * @return bool|WP_Error
70
  */
71
  public function checkAccuracy($task) {
72
+ if (!$this->_audit->sq_subscription_serpcheck) {
 
 
 
73
  $task['completed'] = false;
74
+ return $task;
75
  }
76
 
77
+ $task['completed'] = true;
78
  return $task;
79
  }
80
 
models/focuspages/Image.php CHANGED
@@ -5,7 +5,7 @@ class SQ_Models_Focuspages_Image extends SQ_Models_Abstract_Assistant {
5
  protected $_category = 'image';
6
 
7
  protected $_keyword = false;
8
- protected $_image = false;
9
 
10
  public function init() {
11
  parent::init();
@@ -22,20 +22,24 @@ class SQ_Models_Focuspages_Image extends SQ_Models_Abstract_Assistant {
22
  if (isset($this->_audit->data->sq_seo_open_graph->value) && $this->_audit->data->sq_seo_open_graph->value <> '') {
23
  $og = json_decode($this->_audit->data->sq_seo_open_graph->value);
24
  if (isset($og->image)) {
25
- $this->_image = $og->image;
26
  }
27
- } elseif (isset($this->_audit->data->sq_seo_twittercard->value) && $this->_audit->data->sq_seo_twittercard->value <> '') {
 
 
28
  $tc = json_decode($this->_audit->data->sq_seo_twittercard->value);
29
  if (isset($tc->image)) {
30
- $this->_image = $tc->image;
31
  }
32
- } elseif ($this->_post->post_content <> '') {
 
 
33
  @preg_match_all('/<img[^>]*src=[\'"]([^\'"]+)[\'"][^>]*>/i', stripslashes($this->_post->post_content), $out);
34
 
35
  if (!empty($out)) {
36
  if (is_array($out[1]) && count((array)$out[1]) > 0) {
37
  foreach ($out[1] as $row) {
38
- $this->_image = $row;
39
  break;
40
  }
41
  }
@@ -51,7 +55,7 @@ class SQ_Models_Focuspages_Image extends SQ_Models_Abstract_Assistant {
51
  $this->_tasks[$this->_category] = array(
52
  'filename' => array(
53
  'title' => __("Keyword in filename", _SQ_PLUGIN_NAME_),
54
- 'value' => ($this->_image ? $this->_image : ''),
55
  'penalty' => 5,
56
  'description' => sprintf(__('Your filename for one of the images in this Focus Page should be: %s keyword.jpg %s Download a relevant image from your page. Change the filename. Then re-upload with the SEO filename and add it your page\'s content again. %s It\'s best to keep this at only one filename which contains the main keyword of the page. %s Why? %s Because Google could consider over-optimization if you used it more than once.', _SQ_PLUGIN_NAME_), '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />'),
57
  ),
@@ -108,11 +112,14 @@ class SQ_Models_Focuspages_Image extends SQ_Models_Abstract_Assistant {
108
 
109
  if (!$this->_keyword) {
110
  $this->_tasks[$this->_category]['filename']['description'] = sprintf(__('Optimize the post first using a Keyword from Squirrly Briefcase', _SQ_PLUGIN_NAME_), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'briefcase') . '" target="_blank">', '</a>');
 
111
  $task['completed'] = false;
112
- } elseif ($this->_image) {
113
- $image = str_replace(array('_', '-', '/', '.'), ' ', $this->_image);
114
- if (stripos($image, $this->_keyword) !== false) {
115
- $task['completed'] = true;
 
 
116
  }
117
  }
118
 
5
  protected $_category = 'image';
6
 
7
  protected $_keyword = false;
8
+ protected $_images = array();
9
 
10
  public function init() {
11
  parent::init();
22
  if (isset($this->_audit->data->sq_seo_open_graph->value) && $this->_audit->data->sq_seo_open_graph->value <> '') {
23
  $og = json_decode($this->_audit->data->sq_seo_open_graph->value);
24
  if (isset($og->image)) {
25
+ $this->_images[] = $og->image;
26
  }
27
+ }
28
+
29
+ if (isset($this->_audit->data->sq_seo_twittercard->value) && $this->_audit->data->sq_seo_twittercard->value <> '') {
30
  $tc = json_decode($this->_audit->data->sq_seo_twittercard->value);
31
  if (isset($tc->image)) {
32
+ $this->_images[] = $tc->image;
33
  }
34
+ }
35
+
36
+ if ($this->_post->post_content <> '') {
37
  @preg_match_all('/<img[^>]*src=[\'"]([^\'"]+)[\'"][^>]*>/i', stripslashes($this->_post->post_content), $out);
38
 
39
  if (!empty($out)) {
40
  if (is_array($out[1]) && count((array)$out[1]) > 0) {
41
  foreach ($out[1] as $row) {
42
+ $this->_images[] = $row;
43
  break;
44
  }
45
  }
55
  $this->_tasks[$this->_category] = array(
56
  'filename' => array(
57
  'title' => __("Keyword in filename", _SQ_PLUGIN_NAME_),
58
+ 'value' => (!empty($this->_images) ? join('<br />', $this->_images) : ''),
59
  'penalty' => 5,
60
  'description' => sprintf(__('Your filename for one of the images in this Focus Page should be: %s keyword.jpg %s Download a relevant image from your page. Change the filename. Then re-upload with the SEO filename and add it your page\'s content again. %s It\'s best to keep this at only one filename which contains the main keyword of the page. %s Why? %s Because Google could consider over-optimization if you used it more than once.', _SQ_PLUGIN_NAME_), '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />', '<br /><br />'),
61
  ),
112
 
113
  if (!$this->_keyword) {
114
  $this->_tasks[$this->_category]['filename']['description'] = sprintf(__('Optimize the post first using a Keyword from Squirrly Briefcase', _SQ_PLUGIN_NAME_), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_research', 'briefcase') . '" target="_blank">', '</a>');
115
+ $task['error_message'] = __("No image found", _SQ_PLUGIN_NAME_);
116
  $task['completed'] = false;
117
+ } elseif (!empty($this->_images)) {
118
+ foreach ($this->_images as $image) {
119
+ $image = str_replace(array('_', '-', '/', '.'), ' ', $image);
120
+ if (stripos($image, $this->_keyword) !== false) {
121
+ $task['completed'] = true;
122
+ }
123
  }
124
  }
125
 
readme.txt CHANGED
@@ -8,435 +8,207 @@ Stable tag: trunk
8
  License: GPLv2 or later
9
  Donate link: https://plugin.squirrly.co/wordpress/seo
10
 
11
- Tailor-made SEO paths lead Non-SEO Experts to Better Rankings. Experts get unprecedented oversight to overcome ranking drawbacks.
12
 
13
  == Description ==
14
- Get Excellent SEO on all your Articles, Pages and WooCommerce products. For both Humans and Search Engines.
15
 
16
- All White-hat and up-to-date. Customer Service included on the free plans.
17
 
18
- The only WordPress SEO plugin that offers Assisted SEO and all the on-page tools you need to take your site from “Never Found” to Always Found on search engines like Google and Bing.
19
 
20
- While Assistant Technology like: Intelligent Parking Assist helps you park your car safely, Squirrly SEO helps you place your pages safely in top positions.
21
 
22
- More than that, some of the Assisted SEO features we have on-board actually help you find spots on search engines, where you’ll easily park your pages and nobody will bother you (because the competition will be low, even though these spots could earn you many organic visits).
23
 
24
- <a href="https://plugin.squirrly.co/wordpress/seo">Facts and Testimonials for this Plugin for WordPress SEO can be found here</a>.
25
 
26
- Could you ever dream your way to the Top positions on search engines? Let’s see how this WordPress plugin will help:
27
 
28
- **Bring a CoPilot Onboard to Accelerate Your SEO Strategy and Keep Ranking**
29
 
30
- Everyone who's been in this industry for a hot second knows that competing for the top rankings in Google can feel a lot like racing. Racing in a super fast, insanely crowded, car race where you're competing with bigger, faster, more expensive cars all the time. Everyone's trying to get in front, stand out and smoke the car behind them.
31
 
32
- And if Search Engine Optimization is a car race, your website is your race car.
33
 
34
- And let’s put it this way: As things stand right now, you could be blindfolded, driving a car not optimized for the race on uncertain track conditions.
35
 
36
- But what if you could look to your right and have someone there you can genuinely trust, someone knowledgeable enough to guide and assist you in this race you're competing in every single day as a site owner?
37
 
38
- I'm talking about someone whose primary concern is to make your job easier and help you SUCCEED.
39
 
40
- That's Squirrly SEO for you.
41
 
42
- Squirrly SEO gives you the Knowledge + Tools + Guidance you need to shift your SEO Results into top Gear:
43
 
44
- * The Knowledge to take the blindfold off and maximize your level of SEO awareness. Step-by-step process with learning on the way, which makes it great for those who are not SEO experts. You'll get free coaching sessions to master the basics of SEO and conquer the advanced tactics.
45
 
46
- * The Tools you need to successfully implement the best SEO tactics. Top automation features to work smarter and more efficient, from Keyword Research, On-Page Optimization, to a Weekly SEO Audit and everything in between.
 
 
47
 
48
- * The Guidance to keep you focused and always moving forward through changing SEO scenery, Google updates and more. You'll benefit from constant in-plugin guidance and Assistants, as well as the fact that we're continually adding new features to meet your evolving needs.
49
 
50
- It's this combination of tools and guidance that helped our users rank their sites on the 1st Page of Google and grow their organic traffic by at least +285%. (You can get MORE <a href="https://squirrly.co/facts">facts here</a>)
51
 
52
- [youtube https://www.youtube.com/watch?v=YWMq5xR6Uxg]
53
 
54
- **Squirrly SEO doesn't push you out of the driver's seat.**
55
 
56
- Other plugins promise you a way to put your site on AutoPilot. But why risk being on autopilot inside a car that’s on the wrong path? Why give up that level of control when you can choose otherwise?
57
 
58
- Squirrly SEO doesn't push you out of the driver's seat. Instead, it fills the role of a savvy SEO ADVISOR to help your rise to the top of SERPs.
59
 
60
- And one of the ways it does this is through a set of powerful features. You've guessed it; it's time to see what's under the hood of Squirrly SEO.
61
 
62
- **Keyword Research**
63
 
64
- Discover long-tail keyword suggestions your site can rank for on the first page of Google directly from your Dashboard. Relevant for the country you want to rank for.
65
 
66
- Long-tail keywords have less competition, which means you don't have to go against SEO mammoths, the industry-leading sites which typically populate the 1st page of Google. So you'll have a real chance of making your way to the top of SERPs.
67
 
68
- Squirrly's SEO advanced algorithms will reveal top keyword opportunities and feed valuable associated data. This up-to-date information will help you assess keywords' potential; so that you can pick the right ones:
69
 
70
- * Discussion. Shows you how popular a topic is on social media.
71
- * Search Volume. Allows you to know what Keywords and Topics your Customers actively search for on Google.
72
- * Competition. Tells you whether you can rank your pages for specific keywords. You'll STOP Wasting your resources creating content blindly and going after keywords your site can't rank for. It will all finally make sense.
73
- * Trend. Shows you the direction in which the interest for a certain topic is heading so that you can be on time with the content you create. Optimizing content for Keywords that have a "steady" or a "going up" trend has the potential to bring you traffic for years to come.
74
 
75
- Another cool thing about this feature is that it lets you play with three levels of complexity: Fast, Normal, Complex when conducting a Keyword Research.
76
 
77
- **You control your keyword research experience.**
78
 
79
- The Fast option will reveal around 10 results while the complex one can deliver around 50 results at once - that's up to 50 new ideas for creating relevant content that has the highest potential for achieving top rankings
80
 
81
- What's more, the industry you’re in will be constantly monitored. This allows Squirrly to suggest new topic ideas you can pursue, even if you're not actively doing keyword research.
82
 
83
- This way, you can be sure that you're not missing out on any incredible keyword opportunity.
84
 
85
- **SEO Live Assistant**
 
 
 
 
 
86
 
87
- This is your GPS for perfect on-page SEO for every article or page you Publish. Get higher rankings for keywords connected to your brand and outrank your competition.
88
 
89
- We built the SEO Live Assistant so that you no longer have to rely on guesswork to make sure you have 100% SEO on your blog posts, your product pages or landing pages.
90
 
91
- The Assistant looks at the topic you're writing about and gives you the coordinates for perfect on-page SEO by providing you with as-you-type advice, right inside your WordPress Dashboard.
92
 
93
- This saves a lot of time for content creation and it helps with quality assurance as well.
94
- Write with both your audience and search engines in mind.
95
 
96
- * Real-time SEO tips
97
- * Makes it clear when you over or under optimize
98
- * Helps you identify and avoid annoying repetitions
99
- * It checks if you have a strong introduction and conclusion for your article, in which you specify the topic you’re writing about.
100
 
101
- With the SEO Live Assistant, you can optimize a page or article for multiple keywords. (in order to improve your Rank Brain ratings)
102
 
103
- You can also re-optimize existing pages in your site.
104
 
105
- But the part you'll love most?
106
 
107
- The SEO Live Assistant is fun to use thanks to the gamification elements that make you feel like a champion every time you do something right, and a section in the Assistant turns Green.
108
 
109
- When all the boxes check green, your article is fully optimized and ready to be Published.
110
 
111
- **Audit Suite**
112
 
113
- Just as any race car needs constant maintenance, your site and strategy need to be constantly tracked, tweaked, and improved. From time to time, there will be stuff you need to fix, things you'll add or replace.
114
 
115
- If you don’t stick with it, you’re going to fall behind.
116
 
117
- Squirrly's Audit Suite monitors all essential aspects of your content marketing strategy and gives you an overall score to note its performance. To do so, it takes six main areas into account:
118
 
119
- * Blogging,
120
- * Traffic,
121
- * Social Media,
122
- * SEO,
123
- * Links,
124
- * Authority.
125
 
126
- By looking at this data, as a site owner, you'll always know how things stand, whether your efforts are paying off, and which areas need more work. You will no longer have to rely on others' theories and opinions to make decisions.
127
 
128
- The way in which the Audit was developed ensures you'll be guided towards the actions you should take to improve your score week after week.
129
 
130
- It also makes it easy to share the information with others on your team who have the authority and the knowledge to act on it.
131
 
132
- For instance, if you see the blogging frequency decrease in the Audit, you can send that information to your content strategist so that you can get things back on track.
133
 
134
- All you have to do is press a button, and the information gets sent via email.
135
 
136
- In many ways, the Audit represents the spirit behind Squirrly SEO the best, as it's a clear representation of the vision that has been with us since day one; and that is to guide users towards taking the best actions using the most efficient tools.
137
 
138
- **Briefcase, Keyword Strategy Assistant**
139
 
140
- How many times has this happened to you? You've started researching ideas for keywords you could use in your posts. After a while, the process became so complex, that you lost count and forgot what was the keyword you began with.
141
 
142
- It would be a pity to overlook great keyword opportunities because you don't have an efficient way to stay organized.
143
 
144
- The Briefcase feature provides a simple way to keep your best keyword opportunities in a dedicated, single place and build a strategy around your main keywords.
145
 
146
- You can Color-Categorize your keywords based on your needs and stay on track with your campaigns.
147
 
148
- You choose the label you assign to each keyword in Briefcase.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
- For instance, you can label them based on the customer journey you want to use them for, such as "awareness stage" or "strong buyer intent."
151
 
152
- Everyone on your team will know what they need to work on in order to enhance your Authority on your main keywords. No more losing focus.
153
 
154
- **Of Course, Squirrly SEO Helps You with Everything Else as well**
155
 
156
- Features that work behind the scenes to help you build a strong Social Media AND SEO Presence
 
 
157
 
158
- * Twitter Cards
159
- * Facebook Open Graph support for both Images and Videos
160
- * LinkedIN titles, images and description for better sharing
161
- * Rich Pins for Pinterest
162
- * Snippet Preview
163
- * Customize Meta Title and Description
164
- * Patterns
165
- * Sitemap
166
- * Blog feeds
167
- * SEO settings
168
- * Performance Analytics with Google Rank Checker that lets you keep a close eye on your rankings and social media metrics.
169
- * Works with multisites.
170
 
171
- **Research Tool for writers (Blogging Assistant) to keep readers on the Page for longer**
172
-
173
- * Find and Insert Copyright Free Images right from your Dashboard (via Squirrly's Inspiration Box)
174
- * Find and Insert Tweets and Wikis to validate your ideas and create well-researched content that includes trending information and expert input
175
- * Link to other articles in your site connected to that topic
176
- * Cite Sources and prove authority for the blog posts you create. It’s a confirmed ranking factor for Google.
177
-
178
- You don't have to be an expert to make the most of all these features. Squirrly SEO has a 'Take you by the hand approach" that works to your benefit even if you are an apprentice when it comes to SEO.
179
-
180
- **Satisfies Your Need for Speed**
181
-
182
- Squirrly SEO is one of the fastest plugins out there. Despite being incredibly complex, it will not slow down your site. This is something that sets Squirrly apart from other plugins, a benefit that many of our current users and developer partners have repeatedly said they appreciate.
183
-
184
- **Compatibility**
185
-
186
- Squirrly SEO works well with WordPress sites that already have other popular plugins installed, such as Yoast or All in One SEO. You can opt-in to keep the settings you've previously made for your site so that you're not forced to start over again with Squirrly :-)
187
-
188
- Again, the goal is to make your job easier.
189
-
190
- **Priceless Customer Service, for Free**
191
-
192
- Squirrly SEO comes with priceless customer service - that you get for free.
193
-
194
- We've always provided excellent, friendly customer service on all the Squirrly Plans. And we'll continue to do so whether you're a paying user or only have the free version installed.
195
-
196
- You can reach our support team on various channels, and we'll make sure that your question or request receives a quick, insightful reply that doesn't leave you feeling bamboozled or frustrated. That's just annoying.
197
-
198
- **3, 2, 1: GO**
199
-
200
- Squirrly SEO is a freemium model, which means you can install the Free Versions. If you have small content marketing needs (about one article posted per week, some keywords that you want to analyze), then it's the perfect plan for you.
201
-
202
- Once you start having more significant content marketing and SEO needs, you can upgrade to the PRO version.
203
-
204
- So do you want to compete in the race? Then, go ahead and install Squirrly SEO.
205
-
206
- You can grab your copy of Squirrly SEO today from the WordPress Plugins Directory. Just hit that download button and start installing it.
207
-
208
- We provide you with a couple of details on installing it: in the Installation Tab.
209
-
210
- **You're getting many Assistants (software powered helpers inside your WP)** that help you overcome your SEO and marketing challenges. It will feel like you're getting a full marketing team behind you, without any of the associated costs. With all the Assistants, you'll be able to do everything on your own.
211
-
212
- These Assistants will help you make great use of all the tools Squirrly provides you inside your WordPress SEO Plugin.
213
-
214
- More Assistants are making their way into Squirrly SEO this year: <a href="https://www.producthunt.com/upcoming/backlinks-assistant-by-squirrly">Meet the BackLinks Assistant</a> | and | <a href="https://www.producthunt.com/upcoming/strategy-assistant-by-squirrly">Meet the Strategy Assistant.</a>
215
-
216
- <a href="https://plugin.squirrly.co/squirrly-seo-pricing/">Over 200 Tools and Features</a> help you find your way to a winning SEO Strategy by giving you search trend information, competition authority information (Powered by Squirrly's Market Intelligence features), competition volume, social media and forum discussion intelligence.
217
-
218
- You'll be able to find the right Keywords which you can optimize or re-optimize your whole WordPress site for.
219
-
220
- **Using SEO Automation features from Squirrly, you can re-optimize a 2,000 products WooCommerce store in a couple of minutes. That's amazing WooCommerce SEO value!**
221
-
222
- Then, once you've established your winning opportunities, place them in Briefcase, so that your team, writers, collaborators will know exactly what they need to work on in order to enhance your Authority on your main keywords.
223
-
224
- You'll easily make any edits you need to your pages, articles, products by using Copyright Free images and other benefits offered to you by the Blogging Assistant inside Squirrly SEO.
225
-
226
- Your pages will be 100% Optimized before you even hit "Save Draft", or "Publish" inside WordPress. The SEO Live Assistant will offer you as-you-type SEO advice to bring your page's content to perfect optimization. This helps you optimize for both Humans and Search Engines. It's an Excellent balance.
227
-
228
- The market you're in will be constantly monitored, in order for Squirrly to suggest you new content ideas you can pursue. (This is handled by the Research Assistant)
229
-
230
- An Audit Suite will be ready for you every single week, to show you where you can improve your Marketing and your Website: blogging audit, social media audit, web authority audit, SEO audit, Traffic Audit.
231
-
232
- You'll never have to doubt your results, because you'll get to see how well your pages are ranking in Google. Best of all: you'll see the real, objective data. You'll see what your potential customers will see when searching for keywords related to your site.
233
-
234
- You can be from any one of the 140 countries we support for Keyword Research and SERP Checking (Google Rank Tracking)
235
-
236
- You can make a decision right now, to get Squirrly WordPress SEO Plugin into your site right away, or to continue your journey of optimizing WordPress sites with the rest of the Wordpress SEO Plugins.
237
-
238
- **If you choose any plugin other than Squirrly, you will soon realize that:**
239
-
240
- - you haven’t chosen the proper keywords. That’s why your WordPress SEO Plugin doesn’t catapult you to that first page of Google search, no matter which plugin you choose.
241
-
242
- - you can end up being #1 on Google for keywords that nobody ever searches for, which means zero search traffic for your WordPress site or WooCommerce store.
243
-
244
- - you don’t know if you manage to rank your pages. The other WordPress SEO plugins won’t show you if they help you reach search engine success.
245
-
246
- - you’ve got no proper way of knowing if the work you do with the other plugins actually makes a difference for the overall WordPress SEO of your site.
247
-
248
- - you won’t be able to manage your strategy. You’ll keep creating content blindly, while losing focus of your overall strategy. Especially if you have a team of writers, this will go south very fast.
249
-
250
- - you'll never know if the work you've done last week brought an improvement in the quality of your site and content.
251
-
252
- **There is only one SEO tool (part software in the Cloud, part delivered inside your very own WordPress) to help you with all of this: Squirrly SEO. It's Everything You’ll Ever Need.**
253
-
254
- And you’re reading about it on this very page. Yes, Squirrly SEO. Current Edition: Squirrly SEO 2019: Strategy. (began with version 8.3.07)
255
-
256
- Download and start using it now.
257
-
258
- Or wait and see why even Earth’s mightiest SEO Experts use this one tool, that was initially fully designed only for NON-SEOs.
259
-
260
- There are lots of features currently in it which are super praised by experts. The details to which you can take your Squirrly are phenomenal.
261
-
262
- [youtube https://www.youtube.com/watch?v=gNhK-y34wtw]
263
-
264
- We have reviews from some of the world's biggest Experts in SEO and Marketing: Neil Patel, Search Engine Journal, Brian Dean, Search Engine Watch and over 1,000 other media outlets and blogs.
265
-
266
- <h3>Top Reviews</h3>
267
- * <em>"Wow, I've been using your tool for a week now and one of my blog ranked no1 out of a million for its key word... amazing"</em>
268
- * <em>" I use Squirrly SEO every time I create a new post."</em> - **Neil Patel**, co-founder of KissMetrics
269
- * <em>"Cool Feature: Squirrly SEO comes packed with a nice keyword research tool that works within the WordPress editor. In addition to the usual metrics (like search volume), it also shows you if that keyword is a hot topic of conversion online. The tool also shows you the stability of that keyword’s search volume over time."</em> - <a href="http://backlinko.com/seo-tools" target="_blank" rel="nofollow">**Brian Dean**</a>, founder of Backlinko
270
- * <em>"It’ll give you a helpful snapshot of how your content is performing."</em> - <a href="https://www.searchenginejournal.com/">**Search Engine Journal**</a>
271
-
272
- **You can read more reviews from Internet Marketing experts on <a href="https://howto.squirrly.co/testimonials/">https://howto.squirrly.co/testimonials/</a>**
273
-
274
- We have over 2,350,000 Downloads!
275
-
276
- **Our Technology is used by Microsoft teams across Europe, BBC, SeedCamp, CyberGhost, and many others.**
277
-
278
- **Here are some of the Assistants you get out-of-the-box when you install Squirrly SEO:**
279
-
280
- Blogging Assistant
281
-
282
- SEO Live Assistant
283
-
284
- Settings Assistant
285
-
286
- Keyword Opportunity Assistant
287
-
288
- SEO Automations Assistant
289
-
290
- Up-Coming Assistants:
291
-
292
- Strategy Assistant
293
-
294
- Backlinks Assistant
295
-
296
- **Squirrly SEO is a Freemium software, like MailChimp.**
297
-
298
- You’ll start with the free version of Squirrly SEO. It will help you if you have small content marketing needs, such as 5 articles published / month, 5 keyword analysis and a weekly SEO audit tool report. When you'll require more, you can pay for the PRO Plan.
299
-
300
- You'll only start paying once you need to do a lot of work within the plugin.
301
-
302
- **All of the following are for free and included in the Free Plan:**
303
-
304
- **Free Access to our Support team:**
305
-
306
- via email, youtube live chat, twitter, facebook messages, in-plugin support options (so you don't even have to leave WordPress to write to us), Google Plus Community.
307
-
308
- **Amazing Speed:**
309
-
310
- Runs ~4 times faster than Yoast SEO and ~8 times faster than All In One SEO.
311
-
312
- **Uncanny Power:**
313
-
314
- Gives you 10 times more features than any other SEO plugin out there.
315
-
316
- It's the reason why Assistants who guide were imperative to our design.
317
-
318
- **Keyword optimizations**
319
-
320
- Up to 5 keywords for each page.
321
-
322
- **Semantic SEO Data and Contextual Keywords:**
323
-
324
- Up to 5 keywords for each page
325
-
326
- **Customer Journey and Buying Stages**
327
-
328
- Model advanced paths from Visit to Purchase for your potential customers.
329
-
330
- **Marketing Clarity Assistant**
331
-
332
- Up to 5 keywords for each page, to help you place in all the keywords that you want to convey for your overall marketing/branding message.
333
-
334
-
335
- **Preview of your page - see exactly how your page will look on:**
336
-
337
- - Google
338
-
339
- - Facebook
340
-
341
- - Twitter
342
-
343
- **Readability Check and Human Friendly Optimization:**
344
-
345
- We analyze your written text to make sure it will sound really good for your Human readers. This will help boost engagement on the page, as well as time on page.
346
-
347
- **No Duplicate Content - Squirrly SEO is the only plugin that handles all the following aspects:**
348
-
349
- - Avoid confusing Google with duplicate content, by setting canonical URLs.
350
-
351
- - Avoid repetitions of the same pieces of code inside the source code of any page on your site. Google penalizes for that. With the Duplicate Remover from Squirrly, this will never be a problem for you. It's performed automatically if you have the setting activated.
352
-
353
- - Avoid duplicate content across multiple pages from your website. The SEO Audit from Squirrly SEO will help you clean all those duplicate pieces of content.
354
-
355
- **Keyword Research and Planning Tool: (for 140 countries)**
356
-
357
- You'll finally find keywords worth pursuing.
358
-
359
- Built 100% for SEO, unlike the Keyword Planner from Google, which is built for Advertising purposes. <a href="https://howto.squirrly.co/wordpress-seo/can-i-use-the-keyword-planner-tool-from-google-for-seo/">Read here about it</a>
360
-
361
- **Briefcase:**
362
-
363
- Organize your SEO Strategy and ALL Your focus keywords in one place, so that you and all collaborators can be on the same page.
364
-
365
- **Audit Suite (Lite)**
366
-
367
- - SEO Audit
368
-
369
- - Blogging Audit
370
-
371
- - Traffic Audit
372
-
373
- - Social Media Audit
374
-
375
- - Links Audit (powered by MOZ)
376
-
377
- - Authority Audit
378
-
379
- **Google Ranking Checkers (for 140 countries)**
380
-
381
- See your Google Rank for the pages you've optimized.
382
-
383
- **Technical SEO - you won't have to know anything about it, because Squirrly runs it in the background for you**
384
-
385
- It doesn’t matter whether you know about robots.txt, .htaccess files, clean permalink URLs or sitemaps – Squirrly SEO makes sure your technical configuration meets the expectations of all search engines.
386
-
387
- **BackUps and Imports:**
388
-
389
- Professional grade backup and importing system, to keep all your sites and all your optimizations safe and sound.
390
-
391
- **User Roles and Permissions:**
392
-
393
- Squirrly SEO Plugin is used by many professional teams in over 90 Countries. It's why we offer them amazing details in how they can setup permissions for their team members.
394
-
395
- **SEO Automation Assistant:**
396
-
397
- Helps you optimize 20, 200 or even 20,000 pages in a couple of minutes. It's the easiest way to get all your pages boosted very fast.
398
-
399
- - Complete with rules for JSON-LD, Open Graph, Twitter Cards, Rich Pins, SEO Title, SEO Description.
400
-
401
- **Over 200 Tools and Features**
402
-
403
- See more on our Pricing Page, to learn more about ALL the features included in the Free Version.
404
-
405
- Scroll down to the second section to get the detailed overview!
406
-
407
- **Principles for our Designs:**
408
-
409
- "Offer the most value, with the least friction possible. Build a software that grows around the user, and not the other way around." These are our guiding principles in all the new versions and product releases we make for Squirrly SEO.
410
-
411
- You can start using Squirrly SEO when you have very basic SEO needs, and then grow as much as you want when you start needing super advanced tech at your disposal.
412
-
413
- We offer amazing Customer Service because it help you be happy and be successful! There's also another reason: every customer interaction helps us take this product to the next level. We're in love with the power that Customer Service has in building ground-breaking products.
414
-
415
- We're doing our best to be great listeners and understand the underlying problems of our users and customers.
416
-
417
- We focus a lot on making the next version the best version! And we're also trying to launch as many useful updates as possible.
418
-
419
- There are many good reasons for you to get a monthly or yearly subscription. <a href="https://www.squirrly.co/3_reasons_why_a_subscription_based_payment_makes_sense_for_you-pagblog-article_id62166-html/">Here are some of the best reasons.</a>
420
-
421
- Our startup consists of 15 content marketing professionals dedicated to making Squirrly SEO an amazing piece of software and writing great training materials to help you be successful and stay successful.
422
-
423
- Over 1000 Content Marketing Experts have reviewed our Wordpress SEO plugin and loved it.
424
-
425
- Over 2580 students to our $147 Content Marketing Training on Udemy. Part of that training you'll be receiving for free when signing up for this Wordpress seo plugin.
426
-
427
- Over +285% increase in traffic to over 49,000 study participants. (who optimized to at least 50% with Squirrly SEO)
428
-
429
- More than helping you with your internet marketing efforts, we strive to offer Excellence in Customer Service.
430
-
431
- * We have a Free Training session with 14 lessons and 10 actionable work files, awaiting you after you install the plugin and connect to squirrly.co (You'll receive them by email.)
432
-
433
- * You'll be able to get support from us from the plugin, from our <a href="https://www.facebook.com/Squirrly.co">Facebook page</a>, <a href="https://twitter.com/squirrlyhq">our Twitter</a>, email, <a href="https://www.youtube.com/c/GetGrowthTV?sub_confirmation=1">Youtube live chat</a> and we can even schedule a Skype call, if fixes are needed.
434
-
435
- We're passionate about seeing you get a great and happy experience, so we'll do our best to fix anything that may come up very fast.
436
-
437
- From the Live Assistant to the best SEO tools for website audit, you'll get access to all of them by installing only this plugin. Exactly the zip that you find here on the WordPress plugins directory.
438
-
439
- See all the Features of our product on the <a title="Squirrly WordPress SEO" href="https://howto.squirrly.co/kb/slides/">All Squirrly SEO Features </a>.
440
 
441
  <a title="Squirrly SEO Plugin" href="/extend/plugins/squirrly-seo/screenshots/">Check our screenshots</a>| <a title="Squirrly SEO" href="https://www.squirrly.co/wordpress-seo-by-squirrly" target="_blank">Go to our official site</a> | Free Version (if you install from the WP directory) OR <a title="See Pricing" href="https://plugin.squirrly.co/squirrly-pricing-plans/" target="_blank">Pricing Plans</a>
442
 
@@ -493,17 +265,60 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
493
  == Screenshots ==
494
  1. Wp Seo - Optimize your article with SEO Live Assistant
495
  2. Wp Seo - Find the top keywords with the Keyword Research
496
- 3. Wp Seo - Customize the META with the SEO Snippet
497
- 4. Wp Seo - Find your top posts and authors with Squirrly SEO Analytics
498
- 5. Wp Seo - Monitor your success with the Performance Analytics
499
- 6. Wp Seo - Let Squirrly SEO do the SEO Settings that your blog needs
500
- 7. Wp Seo - Check your Weekly Site Audit and improve to get higher scores
501
- 8. Wp Seo - Use the research tools for writers from the Inspiration box.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
 
503
  == Upgrade Notice ==
504
  Squirrly SEO 9.1.00 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.
505
 
506
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  = 9.2.00 - 08/06/2019 =
508
  * Update - Present the main features in Tutorial
509
  * Fix - Ignore the www. on external links in focus page > outbound links
8
  License: GPLv2 or later
9
  Donate link: https://plugin.squirrly.co/wordpress/seo
10
 
11
+ Looking to rank your WP site? | Follow a clear recipe for SEO | Tweak over 54 ranking factors
12
 
13
  == Description ==
 
14
 
15
+ There is a New Squirrly. It looks at each page on your WordPress site the same way Google does. It translates everything for you with simple red and green elements. You'll get the answers you were waiting for.
16
 
17
+ This is the only plugin and SEO software capable of adapting to the specifics of each page and the context it has inside a website. It provides answers for you, after very complex analysis made on multiple levels.
18
 
19
+ There are about 20 Million pages that Google can display for every single search a user makes. How does Google decide to display YOUR page within the first 10 results? Out of millions of pages it could display?
20
 
21
+ The new SEO Squirrly knows the answer. Powered by advanced cloud servers owned by the Squirrly Company, the MarketIntelligence big data analysis we do, and data sources like: Moz, Majestic, Alexa, Semrush, Google Analytics, ContentLook, crawlers owned by Squirrly: we are in a unique position that allows us to see each page the same way that Google's algorithms see it.
22
 
23
+ Squirrly provides different answers for different pages for different website owners, because you can't treat any two pages from the Web the same way. Google doesn't. Since we released this, we brought more success to our customers than ever before: <a title="Squirrly SEO Success for WordPress Users" href="https://plugin.squirrly.co/seo-success/">SEO Success With Squirrly's Algorithms</a>
24
 
25
+ "Turn Red Elements to Green and You Will Win." Some of the customers from the success stories mentioned above did not believe we've made everything so easy. They tried it. And they were convinced.
26
 
27
+ It has been our mission to help you take pages from "Never Found to Always Found". With the new Squirrly we've managed to fully deliver on our promise. But for us, this is only the beginning.
28
 
29
+ It’s time to rethink the old way of doing search engine optimization for WordPress.
30
 
31
+ Why? Because the old way of doing things is no longer relevant to how search engines work today. Because Google does NOT perceive your pages as being all the same.
32
 
33
+ There is no “one size fits all” in SEO, so using an SEO plugin that treats all pages the same way is dangerous for your business.
34
 
35
+ It’s like applying a random treatment regardless of the symptoms, just because it had worked once (in another case) for another patient. Would YOU put your faith in that?
36
 
37
+ No.
38
 
39
+ It makes absolutely no sense, not when you can use Squirrly SEO 2019 (brand new. complete redesign) which looks at your pages like Google does.
40
 
41
+ The revolutionary <a title="The Revolutionary Concept And Method" href="https://plugin.squirrly.co/focus-pages/">concept of Focus Pages</a> is here to transform and innovate the way you optimize your WordPress site because it’s not enough to have a destination (being found on the first page of Google).
42
 
43
+ You also need an updated map for HOW to get there. We built Focus Pages to provide a customized route to reach that First Page destination for each one of your pages.
44
 
45
+ Everything from creating human-optimized content to SEO keywords and the user’s experience on your site is checked for in one way or another. Also factors related to quality signals like: impressions, clicks, ctr, social signals, inner links, links from other sites, authority of sites sending links to you.
46
+
47
+ In fact, Squirrly SEO 2019 now looks at over 54 critical ranking factors that Google takes into account when analyzing a page and deciding how high to place it in SERPs.
48
 
49
+ For every page that you add as a Focus Page inside Squirrly SEO, the plugin will show you exactly what actions to take to rank a particular page higher in Google. You’ll know precisely what to focus on to generate the most impact.
50
 
51
+ Everything is shaped into clear tasks, and all you need to do is turn the RED elements you will see inside into Green. That’s all!.
52
 
53
+ The details will be completely different from page to page because every page has its own path to SEO success and this is not a generic plugin. So you won’t be given a generic analysis.
54
 
55
+ This is the only plugin and SEO software capable of adapting to the specifics of each page and the context it has inside a website.
56
 
57
+ The amount of data being processed and the way we process the data is a culmination of groundbreaking work.
58
 
59
+ With the new Squirrly SEO 2019, we fix problems related to SEO that no other plugin or software can fix. Because we approach things in a way that hasn’t been done before.
60
 
 
61
 
62
+ A 14 Days Journey to Better Ranking
63
 
64
+ As part of the new Squirrly SEO 2019, you’ll also be able to start a 14 Days Journey to Better Ranking. If you ever felt like you were stumbling in the dark when trying to rank your pages, embarking on this journey will finally make you feel like you’re making progress.
65
 
66
+ During the 14 days, you’ll be able to follow a clear process and receive Daily recipes to help you finally achieve SEO results.
67
 
68
+ You don’t need to know the first thing about SEO to join. You’ll get access to the #1 software for SEO and step-by-step guidance on how to use it to maximize your results.
69
 
70
+ You’ll know which features to use and at which point in your journey, according to the current issue you’re planning to fix.
71
+
72
+ It’s as easy as that.
 
73
 
74
+ If you’re an SEO expert reading this, there’s great news for you, too!
75
 
76
+ We’re now providing experts with unprecedented monitoring capabilities. You’ll keep all your sites and your clients’ sites in Great SEO Shape with the best in class oversight features: Bulk SEO, Focus Pages, SEO Audit and SEO Issues Scanner.
77
 
78
+ Bulk SEO Settings helps you tweak the title, description, JSON-LD, Facebook, Twitter and visibility details for every page from one super-easy and super-intuitive dashboard.
79
 
80
+ SEO Automation tools (with Expert-level access) will turn SEO work into something that’s easier than reading the news in a self-driving car on your way to work.
81
 
82
+ Squirrly SEO 2019 (Strategy) helps you create and focus on amazing SEO Strategies:
83
 
84
+ - Focus Pages
85
+ - Bulk SEO Settings
86
+ - 14 Days Journey to Better Ranking
87
+ - Automation
88
+ - SERP Checker
89
+ - Unprecedented Oversight to make sure nothing goes wrong SEO-wise.
90
 
91
+ See how we fix common SEO problems with this brand new release: <a title="Years of Bad SEO Can Easily Be Fixed" href="https://www.squirrly.co/most-common-seo-problems-that-we-see-in-customers-sites-time-and-again/">We've made it incredibly easy to fix SEO issues which are found on almost every site you'll see.</a>
92
 
93
+ See why Generic WordPress SEO Plugins just aren’t enough anymore (not in 2019) <a title="Generic Plugins for WordPress SEO are dangerous" href="https://www.squirrly.co/how-do-generic-seo-plugins-work-in-wordpress-and-why-is-squirrly-seo-different/">Generic SEO Plugins are dangerous because they let the user believe that SEO involves no work at all.</a>
94
 
95
+ See the multiple levels of WordPress SEO. <a title="Levels of SEO: Keyword Competition, Time on Page, Bounce Rate, Exit Rates, Impressions, and a lot more" href="https://www.squirrly.co/all-the-important-levels-of-search-engine-optimization-explained/">Just adding a rich snippet or validating a Twitter card doesn't increase your rankings on Google. Just makes things look nice. To make these elements really work for ranking higher, you need all levels of SEO.</a>
96
 
97
+ This is WordPress.
 
98
 
99
+ And Squirrly is the best WordPress SEO plugin you will find.
 
 
 
100
 
101
+ Because we build insanely great marketing software at the Squirrly company, we've decided to make the plugin part of our revolutionary SEO Software be a revolutionary plugin itself.
102
 
103
+ Unlike many other plugin creators, we've made the free version you download and install today on WordPress all that you will need.
104
 
105
+ We do have Squirrly PRO <a title="Insanely Great. SEO Platform." href="https://plugin.squirrly.co/">SEE Squirrly PRO.</a>, which takes everything you've just read here to the extreme.
106
 
107
+ You can even use Squirrly PRO to rank a page within the first 10 results in one week and on our plugin's homepage you can even read the documentation or the way we've applied that method multiple times.
108
 
109
+ However, the Squirrly PRO uses the same base plugin you find here. There is no other extra thing you will have to install in WordPress.
110
 
111
+ You can switch between free and pro anytime you want.
112
 
113
+ It's a Freemium model, like MailChimp.
114
 
115
+ We provide all plugin-related features on the Free accounts. And even lots of the API-based features (which come from our servers and the partner services as described in the beginning of this WP description for our best WordPress SEO Plugin).
116
 
117
+ That's how committed we are to offering you a WordPress SEO plugin that works together with you, according to how ready you are to invest more in your WordPress SEO.
118
 
119
+ We've had people switching to PRO only after gaining success and Page 1 rankings on Google with the free version. And you can read this in some of our success stories. <a title="Squirrly SEO Success for WordPress Users" href="https://plugin.squirrly.co/seo-success/">SEO Success With Squirrly's Algorithms</a>
 
 
 
 
 
120
 
121
+ The PRO helps you super-charge the results and gain more results for more pages.
122
 
123
+ However, the Free version is ground breaking in and of its own.
124
 
125
+ We are proud of it. Our many partners are also proud to install it on client websites.
126
 
127
+ Some agencies have clients for whom they install free and clients for whom they install PRO.
128
 
129
+ And yes, we offer Excellent Customer Service for the FREE plan too.
130
 
131
+ You can take a look at the facts about WordPress SEO Success with the plugin. <a title="Squirrly SEO Success for WordPress Users" href="https://plugin.squirrly.co/seo-success/">SEO Success - FACTS</a>
132
 
133
+ Then, take a look at the WordPress SEO Learning Success with our company. We send many great trainings to our users which help them become SEO and Digital Marketing Superstars. <a title="Success Clients Have With Learning From Our Resources" href="https://www.squirrly.co/facts/learning-success/">Learning Success - FACTS</a>
134
 
135
+ Over 1,000 Content Marketing Professionals and Experts have written about Squirrly PRO.
136
 
137
+ Squirrly was featured in: Forbes, TechCrunch, Wall Street Journal, Search Engine Journal, Clickz.com, Innovation Labs, Delivering Happiness, Search Engine Watch, Elegant Themes, Boston.com, SEO Hacker, WP Mayor, Manage WP, TechNation.io, TechHub.com, Kinsta, Spotify, Backlinko, Gartner, EDB-GOV-Singapore
138
 
139
+ Hundreds of testimonials and over 5,000 B2B customers who purchased subscriptions for Squirrly SEO. You can see all these and more on our website:
140
 
141
+ <a title="Official Website for the Plugin" href="https://plugin.squirrly.co/">Squirrly SEO</a>
142
 
143
+ Our Commitment to building insanely great marketing software means that we've even revolutionized the "usual" things offered by wordpress seo plugins:
144
+ - ZERO-Clicks installation. Once you connect to Squirrly cloud, the Automation feature begins configuring everything your WP requires for great SEO.
145
+ - up to 13 types of schema org JSON-LD implementations you can make
146
+ - different JSON-LD for different pages
147
+ - customize any JSON-LD schme org implementation
148
+ - includes a creator tool that allows you to build and validate your JSON-LD schema
149
+ - best RICH PINS definitions and integrations ever found in a wordpress seo plugin
150
+ - Automation Features that automate everything from semantic definitions, to social media definitions, to custom post types to pure WordPress SEO.
151
+ - Facebook Pixel advanced options for eCommerce.
152
+ - Facebook Pixel tracking with custom rules for custom pages.
153
+ - Google Analytics tracking with custom rules for custom pages
154
+ - Google Analytics tracking fixes included with the 14 Days Journey
155
+ - Google Analytics FULL integrations, to get accurate Traffic Data in the SEO Audit and to get accurate Google Search Engine readings for quality content (as I said: we look for "quality content" the same way that Google does.)
156
+ - No-Index options made with WebDeveloper-Approved customization levels
157
+ - No-Index specific Custom Post Types
158
+ - No-Index based on custom page rules
159
+ - No-Index based on Sitemap XML settings
160
+ - No-Index based on robots.txt rules
161
+ - Checking robots.txt - your customized version vs what WordPress renders
162
+ - Creating robots.txt
163
+ - Managing robots.txt
164
+ - robots file checked in SEO Audit
165
+ - robots file checked in WordPress Admin
166
+ - robots file checked in Focus Pages
167
+ - Protection against no-index placed by mistake: in the WordPress Settings
168
+ - Protection against no-index placed by mistake: in "Scan for SEO Issues"
169
+ - Protection against no-index placed by mistake: in BULK SEO Settings
170
+ - Protection against no-index placed by mistake: in Focus Pages
171
+ - Protection against common seo mistakes (100% tailored to the WordPress environment): by using the "Scan for SEO Issues" feature
172
+ - we call this protection: Oversight, but we mean it in the "positive way".
173
+ - Protection against using "bad keywords" that your site can never rank top 10 for (you need to use Focus Pages section for this one)
174
+ - warnings against over 54 types of ranking drawbacks ("ranking drawback" - an element inside your WordPress site that makes Google decide NOT to award your page with higher rankings)
175
+ - Most advanced Sitemap XML
176
+ - Pictures in Sitemap XML
177
+ - Sitemap XML enhanced with Videos
178
+ - Sitemap XML settings for frequency with which you add new content to the site
179
+ - Sitemap XML to get you in Google News
180
+ - Sitemap XML with organized sub-sitemaps
181
+ - Sitemap XML with Page-Level customization options
182
+ - Sitemap XML inclusions / exclusions according to rules based on Custom post Types and Automation Features.
183
+ - Open Graph
184
+ - Open Graph Preview
185
+ - Open Graph BULK work-flow.
186
+ - Open Graph Automation with different rules according to different custom post types
187
+ - Open Graph object Type
188
+ - Open Graph and fb admin page id
189
+ - Open Graph and author URL
190
+ - Open Graph with VIDEO, which makes the video PLAY directly inside Facebook.
191
+ - Open Graph Validation
192
+ - Rich Pins Validation
193
+ - Twitter Card validation
194
+ - Twitter Card - large
195
+ - Twitter Card - summary
196
+ - Twitter Card Bulk work-flow
197
+ - Twitter Card Automation with different rules according to different custom post types
198
+ - Twitter Card Preview
199
 
200
+ Actually, this list goes on. A Lot.
201
 
202
+ There were over 200 features back when we released Squirrly SEO: Steve. Right now, after all these years, that number went up by... like way too much.
203
 
204
+ Which is one of the reasons we made the process of working with Red Elements. And turning them to Green.
205
 
206
+ What happens in the background is breath-taking. There is so much going on. However, for you, as a user, the experience is fun and easy.
207
+
208
+ We've truly made SEO Uncomplicated.
209
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
+ See an amazing User's Manual and a lot of documentation for how to use everything in the plugin <a title="Squirrly WordPress SEO" href="https://howto.squirrly.co/">Help Center and User's Manual</a>.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
 
213
  <a title="Squirrly SEO Plugin" href="/extend/plugins/squirrly-seo/screenshots/">Check our screenshots</a>| <a title="Squirrly SEO" href="https://www.squirrly.co/wordpress-seo-by-squirrly" target="_blank">Go to our official site</a> | Free Version (if you install from the WP directory) OR <a title="See Pricing" href="https://plugin.squirrly.co/squirrly-pricing-plans/" target="_blank">Pricing Plans</a>
214
 
265
  == Screenshots ==
266
  1. Wp Seo - Optimize your article with SEO Live Assistant
267
  2. Wp Seo - Find the top keywords with the Keyword Research
268
+ 3. Wp Seo - Organize the Keywords with Squirrly SEO Briefcase
269
+ 4. Wp Seo - Customize the META with the SEO Snippet
270
+ 5. Wp Seo - Optimize the Social Media snippet
271
+ 6. Wp Seo - Monitor your success with the Squirrly Ranking
272
+ 7. Wp Seo - Let Squirrly SEO do the SEO Settings that your blog needs
273
+ 8. Wp Seo - Let Squirrly SEO do the Social Media optimization
274
+ 9. Wp Seo - Let Squirrly SEO do the Structured Data JSON-LD optimization
275
+ 10. Wp Seo - Squirrly SEO Live Assistant bar
276
+ 11. Wp Seo - Squirrly SEO Live Assistant optimize for multiple keywords
277
+ 12. Wp Seo - SLA Trending Topics
278
+ 14. Wp Seo - Research Multiple Keywords
279
+ 15. Wp Seo - Check Keyword Research informations
280
+ 16. Wp Seo - Find Long Tail Keywords
281
+ 17. Wp Seo - Organize Keywords by Labels
282
+ 18. Wp Seo - Search and Filter Keywords with Squirrly SEO Briefcase
283
+ 19. Wp Seo - Squirrly SEO Snippet for Social Media
284
+ 20. Wp Seo - Squirrly SEO Snippet for Twitter Card
285
+ 21. Wp Seo - Squirrly SEO Snippet for Facebook Share
286
+ 22. Wp Seo - JSON-LD Structured Data
287
+ 23. Wp Seo - Squirrly SEO Automation
288
+ 24. Wp Seo - Squirrly SEO Automation Settings
289
+ 25. Wp Seo - Squirrly SEO Google Sitemap XML
290
+ 26. Wp Seo - Squirrly SEO Audit
291
+ 27. Wp Seo - Squirrly SEO Audit Score and Tasks
292
+ 28. Wp Seo - Facebook Pixel, Google Analytics and Google Search Console
293
 
294
  == Upgrade Notice ==
295
  Squirrly SEO 9.1.00 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.
296
 
297
  == Changelog ==
298
+ = 9.2.11 - 09/11/2019 =
299
+ * SEO Update - Tested and Compatible with WordPress 5.2.3
300
+ * Fix - ranking assistant to set all green on average possitions
301
+ * Fix - Fixed the Squirrly SEO Admin role
302
+
303
+ = 9.2.10 - 09/03/2019 =
304
+ * Update - Squirrly Live Assistant for multiple languages
305
+ * Update - my.squirrly.co to post on WordPress through a secure connection
306
+ * Update - Update SEO METAs with last Google Algorithms
307
+ * Update - Set Squirrly capabilities for each role
308
+ * Update - Keywords suggestion update for better results
309
+ * Fix - User Role Management when Admin has multiple roles
310
+ * Fix - Sitemap terms exclude empty tags and categories
311
+ * Fix - Sitemap taxonomi limit included to prevent timeouts
312
+ * Fix - Fix small bugs
313
+
314
+ = 9.2.01 - 08/20/2019 =
315
+ * Update - Allow emoji in title and description in SEO Snippet
316
+ * Fix - The keyword in article image for Focus Pages
317
+ * Fix - Acuracy in Focus Pages
318
+ * Fix - Save and Error messages in Bulk SEO Snippet
319
+ * Fix - Remove the page from sitemap when pagination
320
+ * Fix - Add language slug in Polylang sitemap when the languages are not combined
321
+
322
  = 9.2.00 - 08/06/2019 =
323
  * Update - Present the main features in Tutorial
324
  * Fix - Ignore the www. on external links in focus page > outbound links
squirrly.php CHANGED
@@ -7,14 +7,14 @@
7
  Plugin URI: https://www.squirrly.co
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://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
9
  Author: Squirrly SEO
10
- Version: 9.2.00
11
  Author URI: https://www.squirrly.co
12
  */
13
  if (!defined('SQ_VERSION')) {
14
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
15
- define('SQ_VERSION', '9.2.00');
16
  //The last stable version
17
- define('SQ_STABLE_VERSION', '9.1.19');
18
  // Call config files
19
  try {
20
  require_once(dirname(__FILE__) . '/config/config.php');
7
  Plugin URI: https://www.squirrly.co
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://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
9
  Author: Squirrly SEO
10
+ Version: 9.2.11
11
  Author URI: https://www.squirrly.co
12
  */
13
  if (!defined('SQ_VERSION')) {
14
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
15
+ define('SQ_VERSION', '9.2.11');
16
  //The last stable version
17
+ define('SQ_STABLE_VERSION', '9.2.00');
18
  // Call config files
19
  try {
20
  require_once(dirname(__FILE__) . '/config/config.php');
view/Blocks/SLASearch.php CHANGED
@@ -24,18 +24,14 @@
24
  </div>
25
  <div class="sq_keyword">
26
  <?php
27
- global $post;
28
- $sq_keyword = '';
29
- if (isset($post->ID) && $json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($post->ID)) {
30
- $sq_keyword = SQ_Classes_Helpers_Sanitize::i18n($json->keyword);
31
- } elseif (SQ_Classes_Helpers_Tools::getOption('sq_keyword_help')) {
32
  ?>
33
  <div id="sq_keyword_help" style="display:none">
34
  <span></span><?php _e('Enter a keyword', _SQ_PLUGIN_NAME_); ?>
35
  <p><?php _e('for Squirrly Live SEO optimization', _SQ_PLUGIN_NAME_); ?></p></div><?php
36
  }
37
  ?>
38
- <input type="text" id="sq_keyword" name="sq_keyword" value="<?php echo $sq_keyword ?>" autocomplete="off" placeholder="<?php echo __('Type in your keyword...', _SQ_PLUGIN_NAME_) ?>"/>
39
  <input type="button" id="sq_keyword_check" value=">"/>
40
 
41
  <div id="sq_suggestion" style="display:none">
24
  </div>
25
  <div class="sq_keyword">
26
  <?php
27
+ if (SQ_Classes_Helpers_Tools::getOption('sq_keyword_help')) {
 
 
 
 
28
  ?>
29
  <div id="sq_keyword_help" style="display:none">
30
  <span></span><?php _e('Enter a keyword', _SQ_PLUGIN_NAME_); ?>
31
  <p><?php _e('for Squirrly Live SEO optimization', _SQ_PLUGIN_NAME_); ?></p></div><?php
32
  }
33
  ?>
34
+ <input type="text" id="sq_keyword" name="sq_keyword" value="" autocomplete="off" placeholder="<?php echo __('Type in your keyword...', _SQ_PLUGIN_NAME_) ?>"/>
35
  <input type="button" id="sq_keyword_check" value=">"/>
36
 
37
  <div id="sq_suggestion" style="display:none">
view/Blocks/Snippet.php CHANGED
@@ -12,7 +12,6 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
12
  $loadpatterns = false;
13
  }
14
 
15
-
16
  //Clear the Title and Description for admin use only
17
  $view->post->sq->title = $view->post->sq->getClearedTitle();
18
  $view->post->sq->description = $view->post->sq->getClearedDescription();
@@ -185,19 +184,19 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
185
 
186
  <div class="sq-actions">
187
  <div class="sq-action">
188
- <span style="display: none" class="sq-value sq-title-value"><?php echo $view->post->sq->title ?></span>
189
  <span class="sq-action-title" title="<?php echo $view->post->sq->title ?>"><?php _e('Current Title', _SQ_PLUGIN_NAME_) ?>: <span class="sq-title-value"><?php echo $view->post->sq->title ?></span></span>
190
  </div>
191
  <?php if (isset($view->post->post_title) && $view->post->post_title <> '') { ?>
192
  <div class="sq-action">
193
- <span style="display: none" class="sq-value"><?php echo $view->post->post_title ?></span>
194
  <span class="sq-action-title" title="<?php echo $view->post->post_title ?>"><?php _e('Default Title', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_title ?></span></span>
195
  </div>
196
  <?php } ?>
197
 
198
  <?php if ($view->post->sq_adm->patterns->title <> '') { ?>
199
  <div class="sq-action">
200
- <span style="display: none" class="sq-value"><?php echo $view->post->sq_adm->patterns->title ?></span>
201
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->title ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->title . '</span>' : '') ?></span>
202
  </div>
203
  <?php } ?>
@@ -237,21 +236,21 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
237
  <div class="sq-actions">
238
  <?php if (isset($view->post->sq->description) && $view->post->sq->description <> '') { ?>
239
  <div class="sq-action">
240
- <span style="display: none" class="sq-value sq-description-value"><?php echo $view->post->sq->description ?></span>
241
  <span class="sq-action-title" title="<?php echo $view->post->sq->description ?>"><?php _e('Current Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->sq->description ?></span></span>
242
  </div>
243
  <?php } ?>
244
 
245
  <?php if (isset($view->post->post_excerpt) && $view->post->post_excerpt <> '') { ?>
246
  <div class="sq-action">
247
- <span style="display: none" class="sq-value"><?php echo $view->post->post_excerpt ?></span>
248
  <span class="sq-action-title" title="<?php echo $view->post->post_excerpt ?>"><?php _e('Default Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_excerpt ?></span></span>
249
  </div>
250
  <?php } ?>
251
 
252
  <?php if ($view->post->sq_adm->patterns->description <> '') { ?>
253
  <div class="sq-action">
254
- <span style="display: none" class="sq-value"><?php echo $view->post->sq_adm->patterns->description ?></span>
255
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->description ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->description . '</span>' : '') ?></span>
256
  </div>
257
  <?php } ?>
@@ -306,13 +305,13 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
306
  <div class="sq-actions">
307
  <?php if (!is_admin() && !is_network_admin()) { ?>
308
  <div class="sq-action">
309
- <span style="display: none" class="sq-value sq-canonical-value"></span>
310
  <span class="sq-action-title"><?php _e('Current', _SQ_PLUGIN_NAME_) ?>: <span class="sq-canonical-value"></span></span>
311
  </div>
312
  <?php } ?>
313
  <?php if (isset($view->post->url) && $view->post->url <> '') { ?>
314
  <div class="sq-action">
315
- <span style="display: none" class="sq-value"><?php echo urldecode($view->post->url) ?></span>
316
  <span class="sq-action-title" title="<?php echo urldecode($view->post->url) ?>"><?php _e('Default Link', _SQ_PLUGIN_NAME_) ?>: <span><?php echo urldecode($view->post->url) ?></span></span>
317
  </div>
318
  <?php } ?>
@@ -584,19 +583,19 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
584
 
585
  <div class="sq-actions">
586
  <div class="sq-action">
587
- <span style="display: none" class="sq-value sq-title-value"><?php echo $view->post->sq->og_title ?></span>
588
  <span class="sq-action-title" title="<?php echo $view->post->sq->og_title ?>"><?php _e('Current Title', _SQ_PLUGIN_NAME_) ?>: <span class="sq-title-value"><?php echo $view->post->sq->og_title ?></span></span>
589
  </div>
590
  <?php if (isset($view->post->post_title) && $view->post->post_title <> '') { ?>
591
  <div class="sq-action">
592
- <span style="display: none" class="sq-value"><?php echo $view->post->post_title ?></span>
593
  <span class="sq-action-title" title="<?php echo $view->post->post_title ?>"><?php _e('Default Title', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_title ?></span></span>
594
  </div>
595
  <?php } ?>
596
 
597
  <?php if ($view->post->sq_adm->patterns->title <> '') { ?>
598
  <div class="sq-action">
599
- <span style="display: none" class="sq-value"><?php echo $view->post->sq_adm->patterns->title ?></span>
600
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->title ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->title . '</span>' : '') ?></span>
601
  </div>
602
  <?php } ?>
@@ -628,21 +627,21 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
628
  <div class="sq-actions">
629
  <?php if (isset($view->post->sq->og_description) && $view->post->sq->og_description <> '') { ?>
630
  <div class="sq-action">
631
- <span style="display: none" class="sq-value sq-description-value"><?php echo $view->post->sq->og_description ?></span>
632
  <span class="sq-action-title" title="<?php echo $view->post->sq->og_description ?>"><?php _e('Current Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->sq->og_description ?></span></span>
633
  </div>
634
  <?php } ?>
635
 
636
  <?php if (isset($view->post->post_excerpt) && $view->post->post_excerpt <> '') { ?>
637
  <div class="sq-action">
638
- <span style="display: none" class="sq-value"><?php echo $view->post->post_excerpt ?></span>
639
  <span class="sq-action-title" title="<?php echo $view->post->post_excerpt ?>"><?php _e('Default Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_excerpt ?></span></span>
640
  </div>
641
  <?php } ?>
642
 
643
  <?php if ($view->post->sq_adm->patterns->description <> '') { ?>
644
  <div class="sq-action">
645
- <span style="display: none" class="sq-value"><?php echo $view->post->sq_adm->patterns->description ?></span>
646
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->description ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->description . '</span>' : '') ?></span>
647
  </div>
648
  <?php } ?>
@@ -839,19 +838,19 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
839
 
840
  <div class="sq-actions">
841
  <div class="sq-action">
842
- <span style="display: none" class="sq-value sq-title-value"><?php echo $view->post->sq->tw_title ?></span>
843
  <span class="sq-action-title" title="<?php echo $view->post->sq->tw_title ?>"><?php _e('Current Title', _SQ_PLUGIN_NAME_) ?>: <span class="sq-title-value"><?php echo $view->post->sq->tw_title ?></span></span>
844
  </div>
845
  <?php if (isset($view->post->post_title) && $view->post->post_title <> '') { ?>
846
  <div class="sq-action">
847
- <span style="display: none" class="sq-value"><?php echo $view->post->post_title ?></span>
848
  <span class="sq-action-title" title="<?php echo $view->post->post_title ?>"><?php _e('Default Title', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_title ?></span></span>
849
  </div>
850
  <?php } ?>
851
 
852
  <?php if ($view->post->sq_adm->patterns->title <> '') { ?>
853
  <div class="sq-action">
854
- <span style="display: none" class="sq-value"><?php echo $view->post->sq_adm->patterns->title ?></span>
855
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->title ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->title . '</span>' : '') ?></span>
856
  </div>
857
  <?php } ?>
@@ -883,21 +882,21 @@ if (SQ_Classes_Helpers_Tools::getOption('sq_api') <> '') {
883
  <div class="sq-actions">
884
  <?php if (isset($view->post->sq->tw_description) && $view->post->sq->tw_description <> '') { ?>
885
  <div class="sq-action">
886
- <span style="display: none" class="sq-value sq-description-value"><?php echo $view->post->sq->tw_description ?></span>
887
  <span class="sq-action-title" title="<?php echo $view->post->sq->tw_description ?>"><?php _e('Current Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->sq->tw_description ?></span></span>
888
  </div>
889
  <?php } ?>
890
 
891
  <?php if (isset($view->post->post_excerpt) && $view->post->post_excerpt <> '') { ?>
892
  <div class="sq-action">
893
- <span style="display: none" class="sq-value"><?php echo $view->post->post_excerpt ?></span>
894
  <span class="sq-action-title" title="<?php echo $view->post->post_excerpt ?>"><?php _e('Default Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_excerpt ?></span></span>
895
  </div>
896
  <?php } ?>
897
 
898
  <?php if ($view->post->sq_adm->patterns->description <> '') { ?>
899
  <div class="sq-action">
900
- <span style="display: none" class="sq-value"><?php echo $view->post->sq_adm->patterns->description ?></span>
901
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->description ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->description . '</span>' : '') ?></span>
902
  </div>
903
  <?php } ?>
12
  $loadpatterns = false;
13
  }
14
 
 
15
  //Clear the Title and Description for admin use only
16
  $view->post->sq->title = $view->post->sq->getClearedTitle();
17
  $view->post->sq->description = $view->post->sq->getClearedDescription();
184
 
185
  <div class="sq-actions">
186
  <div class="sq-action">
187
+ <span style="display: none" class="sq-value sq-title-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq->title) ?>"></span>
188
  <span class="sq-action-title" title="<?php echo $view->post->sq->title ?>"><?php _e('Current Title', _SQ_PLUGIN_NAME_) ?>: <span class="sq-title-value"><?php echo $view->post->sq->title ?></span></span>
189
  </div>
190
  <?php if (isset($view->post->post_title) && $view->post->post_title <> '') { ?>
191
  <div class="sq-action">
192
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->post_title) ?>"></span>
193
  <span class="sq-action-title" title="<?php echo $view->post->post_title ?>"><?php _e('Default Title', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_title ?></span></span>
194
  </div>
195
  <?php } ?>
196
 
197
  <?php if ($view->post->sq_adm->patterns->title <> '') { ?>
198
  <div class="sq-action">
199
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq_adm->patterns->title) ?>"></span>
200
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->title ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->title . '</span>' : '') ?></span>
201
  </div>
202
  <?php } ?>
236
  <div class="sq-actions">
237
  <?php if (isset($view->post->sq->description) && $view->post->sq->description <> '') { ?>
238
  <div class="sq-action">
239
+ <span style="display: none" class="sq-value sq-description-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq->description) ?>"></span>
240
  <span class="sq-action-title" title="<?php echo $view->post->sq->description ?>"><?php _e('Current Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->sq->description ?></span></span>
241
  </div>
242
  <?php } ?>
243
 
244
  <?php if (isset($view->post->post_excerpt) && $view->post->post_excerpt <> '') { ?>
245
  <div class="sq-action">
246
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->post_excerpt) ?>"></span>
247
  <span class="sq-action-title" title="<?php echo $view->post->post_excerpt ?>"><?php _e('Default Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_excerpt ?></span></span>
248
  </div>
249
  <?php } ?>
250
 
251
  <?php if ($view->post->sq_adm->patterns->description <> '') { ?>
252
  <div class="sq-action">
253
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq_adm->patterns->description) ?>"></span>
254
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->description ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->description . '</span>' : '') ?></span>
255
  </div>
256
  <?php } ?>
305
  <div class="sq-actions">
306
  <?php if (!is_admin() && !is_network_admin()) { ?>
307
  <div class="sq-action">
308
+ <span style="display: none" class="sq-value sq-canonical-value" data-value=""></span>
309
  <span class="sq-action-title"><?php _e('Current', _SQ_PLUGIN_NAME_) ?>: <span class="sq-canonical-value"></span></span>
310
  </div>
311
  <?php } ?>
312
  <?php if (isset($view->post->url) && $view->post->url <> '') { ?>
313
  <div class="sq-action">
314
+ <span style="display: none" class="sq-value" data-value="<?php echo urldecode($view->post->url) ?>"></span>
315
  <span class="sq-action-title" title="<?php echo urldecode($view->post->url) ?>"><?php _e('Default Link', _SQ_PLUGIN_NAME_) ?>: <span><?php echo urldecode($view->post->url) ?></span></span>
316
  </div>
317
  <?php } ?>
583
 
584
  <div class="sq-actions">
585
  <div class="sq-action">
586
+ <span style="display: none" class="sq-value sq-title-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq->og_title) ?>"></span>
587
  <span class="sq-action-title" title="<?php echo $view->post->sq->og_title ?>"><?php _e('Current Title', _SQ_PLUGIN_NAME_) ?>: <span class="sq-title-value"><?php echo $view->post->sq->og_title ?></span></span>
588
  </div>
589
  <?php if (isset($view->post->post_title) && $view->post->post_title <> '') { ?>
590
  <div class="sq-action">
591
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->post_title) ?>"></span>
592
  <span class="sq-action-title" title="<?php echo $view->post->post_title ?>"><?php _e('Default Title', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_title ?></span></span>
593
  </div>
594
  <?php } ?>
595
 
596
  <?php if ($view->post->sq_adm->patterns->title <> '') { ?>
597
  <div class="sq-action">
598
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq_adm->patterns->title) ?>"></span>
599
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->title ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->title . '</span>' : '') ?></span>
600
  </div>
601
  <?php } ?>
627
  <div class="sq-actions">
628
  <?php if (isset($view->post->sq->og_description) && $view->post->sq->og_description <> '') { ?>
629
  <div class="sq-action">
630
+ <span style="display: none" class="sq-value sq-description-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq->og_description) ?>"></span>
631
  <span class="sq-action-title" title="<?php echo $view->post->sq->og_description ?>"><?php _e('Current Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->sq->og_description ?></span></span>
632
  </div>
633
  <?php } ?>
634
 
635
  <?php if (isset($view->post->post_excerpt) && $view->post->post_excerpt <> '') { ?>
636
  <div class="sq-action">
637
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->post_excerpt) ?>"></span>
638
  <span class="sq-action-title" title="<?php echo $view->post->post_excerpt ?>"><?php _e('Default Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_excerpt ?></span></span>
639
  </div>
640
  <?php } ?>
641
 
642
  <?php if ($view->post->sq_adm->patterns->description <> '') { ?>
643
  <div class="sq-action">
644
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq_adm->patterns->description) ?>"></span>
645
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->description ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->description . '</span>' : '') ?></span>
646
  </div>
647
  <?php } ?>
838
 
839
  <div class="sq-actions">
840
  <div class="sq-action">
841
+ <span style="display: none" class="sq-value sq-title-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq->tw_title ) ?>"></span>
842
  <span class="sq-action-title" title="<?php echo $view->post->sq->tw_title ?>"><?php _e('Current Title', _SQ_PLUGIN_NAME_) ?>: <span class="sq-title-value"><?php echo $view->post->sq->tw_title ?></span></span>
843
  </div>
844
  <?php if (isset($view->post->post_title) && $view->post->post_title <> '') { ?>
845
  <div class="sq-action">
846
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->post_title) ?>"></span>
847
  <span class="sq-action-title" title="<?php echo $view->post->post_title ?>"><?php _e('Default Title', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_title ?></span></span>
848
  </div>
849
  <?php } ?>
850
 
851
  <?php if ($view->post->sq_adm->patterns->title <> '') { ?>
852
  <div class="sq-action">
853
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"',$view->post->sq_adm->patterns->title) ?>"></span>
854
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->title ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->title . '</span>' : '') ?></span>
855
  </div>
856
  <?php } ?>
882
  <div class="sq-actions">
883
  <?php if (isset($view->post->sq->tw_description) && $view->post->sq->tw_description <> '') { ?>
884
  <div class="sq-action">
885
+ <span style="display: none" class="sq-value sq-description-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq->tw_description) ?>"></span>
886
  <span class="sq-action-title" title="<?php echo $view->post->sq->tw_description ?>"><?php _e('Current Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->sq->tw_description ?></span></span>
887
  </div>
888
  <?php } ?>
889
 
890
  <?php if (isset($view->post->post_excerpt) && $view->post->post_excerpt <> '') { ?>
891
  <div class="sq-action">
892
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->post_excerpt) ?>"></span>
893
  <span class="sq-action-title" title="<?php echo $view->post->post_excerpt ?>"><?php _e('Default Description', _SQ_PLUGIN_NAME_) ?>: <span><?php echo $view->post->post_excerpt ?></span></span>
894
  </div>
895
  <?php } ?>
896
 
897
  <?php if ($view->post->sq_adm->patterns->description <> '') { ?>
898
  <div class="sq-action">
899
+ <span style="display: none" class="sq-value" data-value="<?php echo str_replace('"', '\\"', $view->post->sq_adm->patterns->description) ?>"></span>
900
  <span class="sq-action-title" title="<?php echo $view->post->sq_adm->patterns->description ?>"><?php echo($loadpatterns ? __('Pattern', _SQ_PLUGIN_NAME_) . ': <span>' . $view->post->sq_adm->patterns->description . '</span>' : '') ?></span>
901
  </div>
902
  <?php } ?>
view/Ranking/Rankings.php CHANGED
@@ -40,11 +40,19 @@ $view->checkin->subscription_serpcheck = (isset($view->checkin->subscription_ser
40
  echo '<div class="alert alert-success text-center">';
41
  echo sprintf(__("%sSERP Checker Business:%s We update the best ranks for each keyword, daily. 100%% accurate and objective.", _SQ_PLUGIN_NAME_), '<strong>', '</strong>');
42
  echo '</div>';
 
 
 
 
 
 
43
  } else {
44
  echo '<div class="alert alert-warning text-center">';
45
  echo sprintf(__("%sSERP Checker Lite:%s We show ranks according to what Google shows you in Google Search Console. Positions shown by GSC are averages, not exact positions in SERPs. To have your rankings checked daily please upgrade your plan to %sBusiness Plan%s", _SQ_PLUGIN_NAME_), '<strong>', '</strong>', '<a href="' . SQ_Classes_RemoteController::getMySquirrlyLink('plans') . '" target="_blank"><strong>', '</strong></a>');
46
  echo '</div>';
47
  }
 
 
48
  }
49
 
50
  if (!$connect->google_search_console) { ?>
40
  echo '<div class="alert alert-success text-center">';
41
  echo sprintf(__("%sSERP Checker Business:%s We update the best ranks for each keyword, daily. 100%% accurate and objective.", _SQ_PLUGIN_NAME_), '<strong>', '</strong>');
42
  echo '</div>';
43
+
44
+ if (!$view->checkin->subscription_serps) {
45
+ echo '<div class="alert alert-success text-center">';
46
+ echo sprintf(__("%sNo SERP queries remained.%s Please check your %saccount status and limits%s", _SQ_PLUGIN_NAME_), '<strong>', '</strong>', '<a href="' . SQ_Classes_RemoteController::getMySquirrlyLink('account') . '" target="_blank"><strong>', '</strong></a>');
47
+ echo '</div>';
48
+ }
49
  } else {
50
  echo '<div class="alert alert-warning text-center">';
51
  echo sprintf(__("%sSERP Checker Lite:%s We show ranks according to what Google shows you in Google Search Console. Positions shown by GSC are averages, not exact positions in SERPs. To have your rankings checked daily please upgrade your plan to %sBusiness Plan%s", _SQ_PLUGIN_NAME_), '<strong>', '</strong>', '<a href="' . SQ_Classes_RemoteController::getMySquirrlyLink('plans') . '" target="_blank"><strong>', '</strong></a>');
52
  echo '</div>';
53
  }
54
+
55
+
56
  }
57
 
58
  if (!$connect->google_search_console) { ?>
view/assets/css/snippet.css CHANGED
@@ -105,6 +105,7 @@
105
  line-height: 20px;
106
  }
107
 
 
108
  #wpadminbar .sq_blocksnippet,
109
  .sq_blocksnippet {
110
  font-size: 14px;
@@ -423,8 +424,8 @@
423
  max-width: 500px !important;
424
  }
425
 
426
- .sq_tab_facebook .sq_snippet_preview img,
427
- .sq_tab_twitter .sq_snippet_preview img {
428
  max-height: 100% !important;
429
  height: 100% !important;
430
  width: 100% !important;
105
  line-height: 20px;
106
  }
107
 
108
+
109
  #wpadminbar .sq_blocksnippet,
110
  .sq_blocksnippet {
111
  font-size: 14px;
424
  max-width: 500px !important;
425
  }
426
 
427
+ .sq_tab_facebook .sq_snippet_preview img:not(.emoji),
428
+ .sq_tab_twitter .sq_snippet_preview img:not(.emoji) {
429
  max-height: 100% !important;
430
  height: 100% !important;
431
  width: 100% !important;
view/assets/css/snippet.min.css CHANGED
@@ -1 +1 @@
1
- @import 'logo.css';@import url('https://fonts.googleapis.com/css?family=Open + Sans');@-webkit-keyframes play{from{background-position:0 0}to{background-position:-400px}}@-moz-keyframes play{from{background-position:0 0}to{background-position:-400px}}@-ms-keyframes play{from{background-position:0 0}to{background-position:-400px}}@-o-keyframes play{from{background-position:0 0}to{background-position:-400px}}@keyframes play{from{background-position:0 0}to{background-position:-400px}}.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 0 !important;margin:0 0 0 5px !important;height:16px !important;width:20px !important;background:transparent 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}#wpadminbar .sq_blocksnippet *,.sq_blocksnippet *{width:initial;height:initial;position:relative;text-shadow:initial;text-transform:initial;text-decoration:none;transition:initial;box-sizing:border-box !important;letter-spacing:normal !important;border-radius:initial;box-shadow:initial;vertical-align:initial;min-height:auto;min-width:auto;-webkit-text-size-adjust:100% !important;-ms-text-size-adjust:100% !important;-webkit-tap-highlight-color:transparent !important}.sq_blocksnippet *:not(.fa){font-size:14px !important;font-family:'Open Sans',sans-serif !important;line-height:20px}#wpadminbar .sq_blocksnippet,.sq_blocksnippet{font-size:14px;font-weight:400;color:#333}.sq_blocksnippet .sq-small,.sq_blocksnippet .sq-small *{font-size:11px !important}#wpadminbar .sq_blocksnippet{background-color:#fff;width:800px !important;max-height:500px;overflow-x:auto;position:fixed !important;right:5px}#wpadminbar li.open>.ab-sub-wrapper{display:block !important}#wpadminbar #wp-admin-bar-sq_bar_menu .ab-item{cursor:pointer !important;padding:0 15px !important;line-height:28px !important}#wpadminbar .quicklinks #wp-admin-bar-sq_bar_menu a{height:inherit !important;margin:inherit !important}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-sq_bar_menu:hover{background:#fff !important;color:#444 !important}#wpadminbar #wp-admin-bar-sq_bar_menu-default{padding:0 !important;min-width:500px}#wpadminbar #wp-admin-bar-sq_bar_menu-default .ab-item{display:none}#wpadminbar #wp-admin-bar-sq_bar_menu{color:#FFF !important;text-decoration:none !important;text-shadow:0 -1px 0 rgba(0,0,0,0.25) !important;background-color:#e1560a !important;background-image:-moz-linear-gradient(top,#f87229,#e1560a) !important;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f87229),to(#e1560a)) !important;background-image:-webkit-linear-gradient(top,#f87229,#e1560a) !important;background-image:-o-linear-gradient(top,#27cda5,#1b8d71) !important;background-image:linear-gradient(to bottom,#f87229,#e1560a) !important;background-repeat:repeat-x !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f87229',endColorstr='#e1560a',GradientType=0) !important;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false) !important}#wpadminbar .ab-sub-wrapper{-webkit-box-shadow:0 7px 5px rgba(0,0,0,.2) !important;-moz-box-shadow:0 7px 5px rgba(0,0,0,.2) !important;box-shadow:0 7px 5px rgba(0,0,0,.2) !important}#wpadminbar .sq_blocksnippet .sq-small,#wpadminbar .sq_blocksnippet .sq-small span{line-height:15px !important}#wpadminbar .sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link){color:#f16112 !important;text-decoration:none !important}#wpadminbar .sq_blocksnippet ul{margin-top:0 !important;margin-bottom:14px !important}.sq_blocksnippet .hndle{color:#fff !important;background-color:#948691 !important;border-color:#897b86 !important;line-height:30px !important;font-size:16px !important;margin:1px !important;padding:10px !important}.sq_blocksnippet .screen-reader-text,.sq_blocksnippet .inside .sq-close{display:none}.sq_blocksnippet .toggle-indicator{display:block;z-index:1;color:white}.sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link),.sq_blocksnippet a *{color:#f16112 !important;text-decoration:none !important}.sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link):hover,.sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link):hover *{color:#f14644 !important;text-decoration:none !important}.sq_blocksnippet input[type=text],.sq_blocksnippet textarea,.sq_blocksnippet select{background-color:#e5f5dd;resize:none}.sq_blocksnippet,.sq_blocksnippet ::after,.sq_blocksnippet ::before{box-sizing:border-box}.sq_blocksnippet{background-color:white !important;min-height:50px !important;min-width:600px !important}.sq_blocksnippet .inside{padding:0 !important;margin:0 !important}.sq_blocksnippet .sq_tab_preview{min-height:223px !important}.sq_blocksnippet:before{display:block !important;border:none !important;content:" " !important;background:transparent url('../img/sprite.png') repeat-x 0 -360px !important;width:100% !important;height:5px !important;border-radius:2px 2px 0 0 !important;opacity:.3 !important}.sq_blocksnippet .sq_savenotice{width:100% !important;position:absolute !important;top:33px !important;left:0 !important}.sq_blocksnippet .sq_tab_facebook .sq_og_media_preview,.sq_blocksnippet .sq_tab_twitter .sq_tw_media_preview{line-height:1 !important;max-width:100% !important}.sq_blocksnippet .sq_snippet_smallimage{width:150px !important;max-height:105px !important;height:105px !important;float:left !important;margin-right:10px !important}.sq_blocksnippet .sq_tab_facebook .sq_og_image_close,.sq_blocksnippet .sq_tab_twitter .sq_tw_image_close{display:none;position:absolute !important;right:-8px !important;top:-8px !important;border:1px #ccc !important;background:#ddd !important;color:#444 !important;border-radius:50% !important;width:20px !important;line-height:20px !important;text-align:center !important;cursor:pointer !important;z-index:100}.sq_blocksnippet .sq_absolute{position:absolute !important}.sq_snippet_preview{position:relative !important}.sq_snippet_preview:before{display:block !important;content:" " !important;background:transparent url('../img/sprite.png') repeat-x 0 -360px !important;width:100% !important;height:5px !important;border-radius:2px 2px 0 0 !important;opacity:.3 !important}.sq_snippet_preview:hover:before{opacity:.8 !important}.sq_snippet_preview li{float:none !important;font-family:arial,sans-serif !important;font-size:13px !important;font-weight:normal !important;text-align:left !important;line-height:10px !important;margin:0 !important;padding:0 !important}.sq_snippet_preview .sq_snippet_name{position:absolute !important;right:0 !important;top:-8px !important;background-color:linen !important;border:1px solid #ddd !important;font-size:10px !important;padding:0 10px !important}.sq_snippet_preview .sq_snippet_title{color:#1a1a1a !important;text-decoration:none !important;cursor:pointer !important;line-height:20px !important;font-size:16px !important;font-weight:bold !important;margin:5px auto !important}.sq_snippet_preview .sq_snippet_url,.sq_snippet_preview .sq_snippet_url a{color:#093 !important;font-size:11px !important;line-height:15px !important;overflow:visible !important;text-decoration:none !important}.sq_snippet_preview .sq_snippet_description{color:#8c8c8c !important;font-size:13px !important;line-height:16px !important;margin:5px auto !important;overflow:hidden !important}.sq_snippet_preview .sq_snippet_keywords{color:#1a0dab !important;font-size:12px !important;line-height:18px !important;margin-top:5px !important}.sq_snippet_preview .sq_snippet_ul li#sq_snippet_keywords{margin:10px 0 0 0 !important;color:blue !important;font-size:10px !important;cursor:pointer !important}.sq_snippet_preview .sq_snippet_image{max-height:260px;overflow:hidden;justify-content:center;display:flex}.sq_snippet_preview .sq_snippet_disclaimer{position:absolute !important;left:0 !important;bottom:-17px !important;color:#999 !important;font-size:10px !important;padding:0 3px !important}.sq_snippet_preview div.sq_fp_ogimage img{max-width:100% !important}.sq_snippet_preview div.sq_fp_ogimage_close{position:absolute !important;right:-8px !important;top:-8px !important;border:1px #ccc !important;background:#ddd !important;border-radius:50% !important;width:20px !important;line-height:20px !important;text-align:center !important;cursor:pointer !important}.sq_tab_facebook .sq_snippet_preview,.sq_tab_twitter .sq_snippet_preview{max-width:500px !important}.sq_tab_facebook .sq_snippet_preview img,.sq_tab_twitter .sq_snippet_preview img{max-height:100% !important;height:100% !important;width:100% !important}.sq_tab_facebook .sq_snippet_preview .sq_snippet_title,.sq_tab_twitter .sq_snippet_preview .sq_snippet_title{font-size:18px !important;line-height:22px !important;margin:12px 0 !important}.sq_tab_facebook .sq_snippet_preview .sq_snippet_author{font-size:14px !important;margin-top:5px !important;color:#999 !important;font-variant:all-small-caps !important;float:right !important}.sq_tab_facebook .sq_snippet_preview .sq_snippet_sitename,.sq_tab_twitter .sq_snippet_preview .sq_snippet_sitename{font-size:14px !important;margin-top:10px !important;color:#999 !important;font-variant:all-small-caps !important;float:none !important}@media only screen and (max-width:1024px){.sq_snippet_preview #sq_snippet_ul #sq_snippet_title{clear:both !important}}.sq_snippet_menu{background-color:#fdfdfd !important;flex:0 0 180px !important;box-sizing:border-box !important}.sq_blocksnippet .sq-action-title{font-size:14px !important;font-weight:400 !important;color:#74767d !important;padding:0 5px !important;margin:0 !important;line-height:33px !important;max-width:100% !important;text-overflow:ellipsis !important;white-space:nowrap !important;overflow:hidden !important;display:inline-block !important}.sq_blocksnippet .sq-actions{display:none;position:absolute !important;left:0 !important;top:52px;width:100% !important;height:105px !important;border:1px solid #ddd !important;border-radius:2px !important;overflow:auto !important;overflow-x:hidden !important;box-shadow:0 0 2px 1px #999 !important;background-color:#fff !important;color:#6c757d !important;z-index:100000 !important}.sq_blocksnippet div.sq-actions .sq-action{width:100% !important;line-height:0 !important;height:auto !important;display:block !important;cursor:pointer !important;padding:0 !important;margin:0 !important}.sq_blocksnippet div.sq-actions .sq-action.focused,.sq_blocksnippet div.sq-actions .sq-action.active,.sq_blocksnippet div.sq-actions .sq-action:hover{background-color:#f1f1f1}.sq_blocksnippet div.sq-actions .sq-action span.sq-action-title span{color:#0a0a0a !important;font-size:14px !important;font-weight:bold !important}.sq_blocksnippet .sq-bootstrap-tagsinput{background-color:#f1f1f1 !important;border:1px solid #ccc !important;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075) !important;padding:0 6px !important;color:#555 !important;vertical-align:middle !important;line-height:22px !important;cursor:text !important}.sq_blocksnippet .sq-bootstrap-tagsinput input{border:none !important;box-shadow:none !important;outline:none !important;padding:0 5px !important;margin:5px 0 !important;width:auto !important;max-width:inherit !important}.sq_blocksnippet .sq-form-control::placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-form-control input::-moz-placeholder,.sq_blocksnippet .sq-form-control textarea::-moz-placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-form-control input:-ms-input-placeholder,.sq_blocksnippet .sq-form-control textarea:-ms-input-placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-form-control input::-webkit-input-placeholder,.sq_blocksnippet .sq-form-control textarea::-webkit-input-placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-bootstrap-tagsinput input:focus{border:none !important;box-shadow:none !important}.sq_blocksnippet .sq-bootstrap-tagsinput .sq-tag{margin:3px 5px 3px 0 !important;font-size:100% !important;display:inline-block !important;color:white !important;background-color:darkcyan !important;padding:0 10px !important;line-height:30px !important}.sq_blocksnippet .sq-bootstrap-tagsinput .sq-tag [data-role="remove"]{margin-left:8px !important;cursor:pointer !important}.sq_blocksnippet .sq-bootstrap-tagsinput .sq-tag [data-role="remove"]:after{content:"x" !important;padding:0 2px !important}.sq_blocksnippet .sq_deactivated{position:relative !important;opacity:.4 !important}.sq_blocksnippet .sq_deactivated:before{content:" " !important;position:absolute !important;height:calc(100% + 20px) !important;width:100% !important;background:#f1f1f1 !important;opacity:.7 !important;top:-10px !important;z-index:1000 !important;cursor:pointer !important;border-radius:6px !important}.sq_blocksnippet .sq_deactivated_label{position:absolute !important;z-index:1001 !important;right:0 !important}@media only screen and (max-width:1200px){.sq_snippet_btn_refresh,.sq_snippet_btn_edit{min-width:110px;margin-bottom:1px}.sq_tab_twitter .sq_snippet_btn_refresh,.sq_tab_twitter .sq_snippet_btn_edit,.sq_tab_facebook .sq_snippet_btn_refresh,.sq_tab_facebook .sq_snippet_btn_edit{min-width:140px;margin-bottom:1px}}
1
+ @import 'logo.css';@import url('https://fonts.googleapis.com/css?family=Open+Sans');@-webkit-keyframes play{from{background-position:0 0}to{background-position:-400px}}@-moz-keyframes play{from{background-position:0 0}to{background-position:-400px}}@-ms-keyframes play{from{background-position:0 0}to{background-position:-400px}}@-o-keyframes play{from{background-position:0 0}to{background-position:-400px}}@keyframes play{from{background-position:0 0}to{background-position:-400px}}.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 0 !important;margin:0 0 0 5px !important;height:16px !important;width:20px !important;background:transparent 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}#wpadminbar .sq_blocksnippet *,.sq_blocksnippet *{width:initial;height:initial;position:relative;text-shadow:initial;text-transform:initial;text-decoration:none;transition:initial;box-sizing:border-box !important;letter-spacing:normal !important;border-radius:initial;box-shadow:initial;vertical-align:initial;min-height:auto;min-width:auto;-webkit-text-size-adjust:100% !important;-ms-text-size-adjust:100% !important;-webkit-tap-highlight-color:transparent !important}.sq_blocksnippet *:not(.fa){font-size:14px !important;font-family:'Open Sans',sans-serif !important;line-height:20px}#wpadminbar .sq_blocksnippet,.sq_blocksnippet{font-size:14px;font-weight:400;color:#333}.sq_blocksnippet .sq-small,.sq_blocksnippet .sq-small *{font-size:11px !important}#wpadminbar .sq_blocksnippet{background-color:#fff;width:800px !important;max-height:500px;overflow-x:auto;position:fixed !important;right:5px}#wpadminbar li.open>.ab-sub-wrapper{display:block !important}#wpadminbar #wp-admin-bar-sq_bar_menu .ab-item{cursor:pointer !important;padding:0 15px !important;line-height:28px !important}#wpadminbar .quicklinks #wp-admin-bar-sq_bar_menu a{height:inherit !important;margin:inherit !important}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-sq_bar_menu:hover{background:#fff !important;color:#444 !important}#wpadminbar #wp-admin-bar-sq_bar_menu-default{padding:0 !important;min-width:500px}#wpadminbar #wp-admin-bar-sq_bar_menu-default .ab-item{display:none}#wpadminbar #wp-admin-bar-sq_bar_menu{color:#FFF !important;text-decoration:none !important;text-shadow:0 -1px 0 rgba(0,0,0,0.25) !important;background-color:#e1560a !important;background-image:-moz-linear-gradient(top,#f87229,#e1560a) !important;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f87229),to(#e1560a)) !important;background-image:-webkit-linear-gradient(top,#f87229,#e1560a) !important;background-image:-o-linear-gradient(top,#27cda5,#1b8d71) !important;background-image:linear-gradient(to bottom,#f87229,#e1560a) !important;background-repeat:repeat-x !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f87229',endColorstr='#e1560a',GradientType=0) !important;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false) !important}#wpadminbar .ab-sub-wrapper{-webkit-box-shadow:0 7px 5px rgba(0,0,0,.2) !important;-moz-box-shadow:0 7px 5px rgba(0,0,0,.2) !important;box-shadow:0 7px 5px rgba(0,0,0,.2) !important}#wpadminbar .sq_blocksnippet .sq-small,#wpadminbar .sq_blocksnippet .sq-small span{line-height:15px !important}#wpadminbar .sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link){color:#f16112 !important;text-decoration:none !important}#wpadminbar .sq_blocksnippet ul{margin-top:0 !important;margin-bottom:14px !important}.sq_blocksnippet .hndle{color:#fff !important;background-color:#948691 !important;border-color:#897b86 !important;line-height:30px !important;font-size:16px !important;margin:1px !important;padding:10px !important}.sq_blocksnippet .screen-reader-text,.sq_blocksnippet .inside .sq-close{display:none}.sq_blocksnippet .toggle-indicator{display:block;z-index:1;color:white}.sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link),.sq_blocksnippet a *{color:#f16112 !important;text-decoration:none !important}.sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link):hover,.sq_blocksnippet a:not(.btn):not(.sq-btn):not(.sq-nav-link):hover *{color:#f14644 !important;text-decoration:none !important}.sq_blocksnippet input[type=text],.sq_blocksnippet textarea,.sq_blocksnippet select{background-color:#e5f5dd;resize:none}.sq_blocksnippet,.sq_blocksnippet ::after,.sq_blocksnippet ::before{box-sizing:border-box}.sq_blocksnippet{background-color:white !important;min-height:50px !important;min-width:600px !important}.sq_blocksnippet .inside{padding:0 !important;margin:0 !important}.sq_blocksnippet .sq_tab_preview{min-height:223px !important}.sq_blocksnippet:before{display:block !important;border:none !important;content:" " !important;background:transparent url('../img/sprite.png') repeat-x 0 -360px !important;width:100% !important;height:5px !important;border-radius:2px 2px 0 0 !important;opacity:.3 !important}.sq_blocksnippet .sq_savenotice{width:100% !important;position:absolute !important;top:33px !important;left:0 !important}.sq_blocksnippet .sq_tab_facebook .sq_og_media_preview,.sq_blocksnippet .sq_tab_twitter .sq_tw_media_preview{line-height:1 !important;max-width:100% !important}.sq_blocksnippet .sq_snippet_smallimage{width:150px !important;max-height:105px !important;height:105px !important;float:left !important;margin-right:10px !important}.sq_blocksnippet .sq_tab_facebook .sq_og_image_close,.sq_blocksnippet .sq_tab_twitter .sq_tw_image_close{display:none;position:absolute !important;right:-8px !important;top:-8px !important;border:1px #ccc !important;background:#ddd !important;color:#444 !important;border-radius:50% !important;width:20px !important;line-height:20px !important;text-align:center !important;cursor:pointer !important;z-index:100}.sq_blocksnippet .sq_absolute{position:absolute !important}.sq_snippet_preview{position:relative !important}.sq_snippet_preview:before{display:block !important;content:" " !important;background:transparent url('../img/sprite.png') repeat-x 0 -360px !important;width:100% !important;height:5px !important;border-radius:2px 2px 0 0 !important;opacity:.3 !important}.sq_snippet_preview:hover:before{opacity:.8 !important}.sq_snippet_preview li{float:none !important;font-family:arial,sans-serif !important;font-size:13px !important;font-weight:normal !important;text-align:left !important;line-height:10px !important;margin:0 !important;padding:0 !important}.sq_snippet_preview .sq_snippet_name{position:absolute !important;right:0 !important;top:-8px !important;background-color:linen !important;border:1px solid #ddd !important;font-size:10px !important;padding:0 10px !important}.sq_snippet_preview .sq_snippet_title{color:#1a1a1a !important;text-decoration:none !important;cursor:pointer !important;line-height:20px !important;font-size:16px !important;font-weight:bold !important;margin:5px auto !important}.sq_snippet_preview .sq_snippet_url,.sq_snippet_preview .sq_snippet_url a{color:#093 !important;font-size:11px !important;line-height:15px !important;overflow:visible !important;text-decoration:none !important}.sq_snippet_preview .sq_snippet_description{color:#8c8c8c !important;font-size:13px !important;line-height:16px !important;margin:5px auto !important;overflow:hidden !important}.sq_snippet_preview .sq_snippet_keywords{color:#1a0dab !important;font-size:12px !important;line-height:18px !important;margin-top:5px !important}.sq_snippet_preview .sq_snippet_ul li#sq_snippet_keywords{margin:10px 0 0 0 !important;color:blue !important;font-size:10px !important;cursor:pointer !important}.sq_snippet_preview .sq_snippet_image{max-height:260px;overflow:hidden;justify-content:center;display:flex}.sq_snippet_preview .sq_snippet_disclaimer{position:absolute !important;left:0 !important;bottom:-17px !important;color:#999 !important;font-size:10px !important;padding:0 3px !important}.sq_snippet_preview div.sq_fp_ogimage img{max-width:100% !important}.sq_snippet_preview div.sq_fp_ogimage_close{position:absolute !important;right:-8px !important;top:-8px !important;border:1px #ccc !important;background:#ddd !important;border-radius:50% !important;width:20px !important;line-height:20px !important;text-align:center !important;cursor:pointer !important}.sq_tab_facebook .sq_snippet_preview,.sq_tab_twitter .sq_snippet_preview{max-width:500px !important}.sq_tab_facebook .sq_snippet_preview img:not(.emoji),.sq_tab_twitter .sq_snippet_preview img:not(.emoji){max-height:100% !important;height:100% !important;width:100% !important}.sq_tab_facebook .sq_snippet_preview .sq_snippet_title,.sq_tab_twitter .sq_snippet_preview .sq_snippet_title{font-size:18px !important;line-height:22px !important;margin:12px 0 !important}.sq_tab_facebook .sq_snippet_preview .sq_snippet_author{font-size:14px !important;margin-top:5px !important;color:#999 !important;font-variant:all-small-caps !important;float:right !important}.sq_tab_facebook .sq_snippet_preview .sq_snippet_sitename,.sq_tab_twitter .sq_snippet_preview .sq_snippet_sitename{font-size:14px !important;margin-top:10px !important;color:#999 !important;font-variant:all-small-caps !important;float:none !important}@media only screen and (max-width:1024px){.sq_snippet_preview #sq_snippet_ul #sq_snippet_title{clear:both !important}}.sq_snippet_menu{background-color:#fdfdfd !important;flex:0 0 180px !important;box-sizing:border-box !important}.sq_blocksnippet .sq-action-title{font-size:14px !important;font-weight:400 !important;color:#74767d !important;padding:0 5px !important;margin:0 !important;line-height:33px !important;max-width:100% !important;text-overflow:ellipsis !important;white-space:nowrap !important;overflow:hidden !important;display:inline-block !important}.sq_blocksnippet .sq-actions{display:none;position:absolute !important;left:0 !important;top:52px;width:100% !important;height:105px !important;border:1px solid #ddd !important;border-radius:2px !important;overflow:auto !important;overflow-x:hidden !important;box-shadow:0 0 2px 1px #999 !important;background-color:#fff !important;color:#6c757d !important;z-index:100000 !important}.sq_blocksnippet div.sq-actions .sq-action{width:100% !important;line-height:0 !important;height:auto !important;display:block !important;cursor:pointer !important;padding:0 !important;margin:0 !important}.sq_blocksnippet div.sq-actions .sq-action.focused,.sq_blocksnippet div.sq-actions .sq-action.active,.sq_blocksnippet div.sq-actions .sq-action:hover{background-color:#f1f1f1}.sq_blocksnippet div.sq-actions .sq-action span.sq-action-title span{color:#0a0a0a !important;font-size:14px !important;font-weight:bold !important}.sq_blocksnippet .sq-bootstrap-tagsinput{background-color:#f1f1f1 !important;border:1px solid #ccc !important;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075) !important;padding:0 6px !important;color:#555 !important;vertical-align:middle !important;line-height:22px !important;cursor:text !important}.sq_blocksnippet .sq-bootstrap-tagsinput input{border:none !important;box-shadow:none !important;outline:none !important;padding:0 5px !important;margin:5px 0 !important;width:auto !important;max-width:inherit !important}.sq_blocksnippet .sq-form-control::placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-form-control input::-moz-placeholder,.sq_blocksnippet .sq-form-control textarea::-moz-placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-form-control input:-ms-input-placeholder,.sq_blocksnippet .sq-form-control textarea:-ms-input-placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-form-control input::-webkit-input-placeholder,.sq_blocksnippet .sq-form-control textarea::-webkit-input-placeholder{color:#777 !important;opacity:.8 !important;font-style:italic !important}.sq_blocksnippet .sq-bootstrap-tagsinput input:focus{border:none !important;box-shadow:none !important}.sq_blocksnippet .sq-bootstrap-tagsinput .sq-tag{margin:3px 5px 3px 0 !important;font-size:100% !important;display:inline-block !important;color:white !important;background-color:darkcyan !important;padding:0 10px !important;line-height:30px !important}.sq_blocksnippet .sq-bootstrap-tagsinput .sq-tag [data-role="remove"]{margin-left:8px !important;cursor:pointer !important}.sq_blocksnippet .sq-bootstrap-tagsinput .sq-tag [data-role="remove"]:after{content:"x" !important;padding:0 2px !important}.sq_blocksnippet .sq_deactivated{position:relative !important;opacity:.4 !important}.sq_blocksnippet .sq_deactivated:before{content:" " !important;position:absolute !important;height:calc(100% + 20px) !important;width:100% !important;background:#f1f1f1 !important;opacity:.7 !important;top:-10px !important;z-index:1000 !important;cursor:pointer !important;border-radius:6px !important}.sq_blocksnippet .sq_deactivated_label{position:absolute !important;z-index:1001 !important;right:0 !important}@media only screen and (max-width:1200px){.sq_snippet_btn_refresh,.sq_snippet_btn_edit{min-width:110px;margin-bottom:1px}.sq_tab_twitter .sq_snippet_btn_refresh,.sq_tab_twitter .sq_snippet_btn_edit,.sq_tab_facebook .sq_snippet_btn_refresh,.sq_tab_facebook .sq_snippet_btn_edit{min-width:140px;margin-bottom:1px}}
view/assets/js/highlight.js CHANGED
@@ -56,12 +56,12 @@
56
  },
57
 
58
  generate: function() {
 
59
  this.$el
60
  .addClass(ID + '-input ' + ID + '-content')
61
  .on('input.' + ID, this.handleInput.bind(this))
62
  .on('scroll.' + ID, this.handleScroll.bind(this));
63
 
64
-
65
  this.$highlights = $('<div>', { class: ID + '-highlights ' + ID + '-content' });
66
 
67
  this.$backdrop = $('<div>', { class: ID + '-backdrop' })
@@ -72,24 +72,15 @@
72
  .append(this.$backdrop, this.$el) // moves $el into $container
73
  .on('scroll', this.blockContainerScroll.bind(this));
74
 
75
- this.fixPadding();
76
 
77
- // this.browser = this.detectBrowser();
78
- // switch (this.browser) {
79
- // case 'firefox':
80
- // this.fixFirefox();
81
- // break;
82
- // case 'ios':
83
- // this.fixIOS();
84
- // break;
85
- //
86
- // }
87
 
88
  // plugin function checks this for success
89
  this.isGenerated = true;
90
 
91
  // trigger input event to highlight any existing input
92
  this.handleInput();
 
93
  },
94
 
95
  // browser sniffing sucks, but there are browser-specific quirks to handle
56
  },
57
 
58
  generate: function() {
59
+
60
  this.$el
61
  .addClass(ID + '-input ' + ID + '-content')
62
  .on('input.' + ID, this.handleInput.bind(this))
63
  .on('scroll.' + ID, this.handleScroll.bind(this));
64
 
 
65
  this.$highlights = $('<div>', { class: ID + '-highlights ' + ID + '-content' });
66
 
67
  this.$backdrop = $('<div>', { class: ID + '-backdrop' })
72
  .append(this.$backdrop, this.$el) // moves $el into $container
73
  .on('scroll', this.blockContainerScroll.bind(this));
74
 
 
75
 
76
+ this.fixPadding();
 
 
 
 
 
 
 
 
 
77
 
78
  // plugin function checks this for success
79
  this.isGenerated = true;
80
 
81
  // trigger input event to highlight any existing input
82
  this.handleInput();
83
+
84
  },
85
 
86
  // browser sniffing sucks, but there are browser-specific quirks to handle
view/assets/js/patterns.js CHANGED
@@ -18,7 +18,7 @@ var $sq_patterns = [];
18
  }
19
 
20
  //Check if multiple snippets exists
21
- if($this.data('patternid')) {
22
  settings.patternid = $this.data('patternid');
23
  }
24
 
@@ -110,12 +110,12 @@ var $sq_patterns = [];
110
  if (typeof pattern !== 'undefined') {
111
  var value = settings.field.val();
112
  //clear the white spaces
113
- if (pattern !== '{{sep}}' && value.indexOf(pattern) !== -1) {
114
  value = value.replace(pattern, '').replace(' ', ' ').trim();
115
  } else {
116
- if(value.split(" ").pop() !== pattern) {
117
  value = (value + ' ' + pattern).trim();
118
- }else{
119
  value = value.substring(0, value.lastIndexOf(pattern)).trim();
120
  }
121
  }
@@ -157,7 +157,7 @@ var $sq_patterns = [];
157
  $this.highlightListen = function () {
158
  settings.field.highlightWithinTextarea({highlight: /({{[^\}]+}})/g});
159
 
160
- settings.field.on('change', function () {
161
  $(this).highlightWithinTextarea({highlight: /({{[^\}]+}})/g});
162
  });
163
  };
@@ -165,6 +165,9 @@ var $sq_patterns = [];
165
  if (settings.field) {
166
  $this.listenIcon();
167
  $this.highlightListen();
 
 
 
168
  }
169
 
170
 
18
  }
19
 
20
  //Check if multiple snippets exists
21
+ if ($this.data('patternid')) {
22
  settings.patternid = $this.data('patternid');
23
  }
24
 
110
  if (typeof pattern !== 'undefined') {
111
  var value = settings.field.val();
112
  //clear the white spaces
113
+ if (pattern !== '{{sep}}' && value.indexOf(pattern) !== -1) {
114
  value = value.replace(pattern, '').replace(' ', ' ').trim();
115
  } else {
116
+ if (value.split(" ").pop() !== pattern) {
117
  value = (value + ' ' + pattern).trim();
118
+ } else {
119
  value = value.substring(0, value.lastIndexOf(pattern)).trim();
120
  }
121
  }
157
  $this.highlightListen = function () {
158
  settings.field.highlightWithinTextarea({highlight: /({{[^\}]+}})/g});
159
 
160
+ settings.field.off('change').on('change', function () {
161
  $(this).highlightWithinTextarea({highlight: /({{[^\}]+}})/g});
162
  });
163
  };
165
  if (settings.field) {
166
  $this.listenIcon();
167
  $this.highlightListen();
168
+
169
+ //console.log(settings.field.attr('name'), settings.field.html());
170
+
171
  }
172
 
173
 
view/assets/js/patterns.min.js CHANGED
@@ -3,7 +3,7 @@ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"un
3
  $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");"undefined"===typeof SQ_DEBUG&&(SQ_DEBUG=!1);var $sq_patterns=[];
4
  (function(a){a.fn.sq_patterns=function(){var b=this,c=!1,e=0,d=a('<div class="sq_pattern_icon" title="Click to edit/add more patterns"></div>'),f=a('<div class="sq_pattern_list sq-col-sm-12 sq-mx-0 sq-px-0" style="display: none"><ul><li class="sq_nostyle">Click to insert a pattern:</li></ul></div>');0<b.find("input[type=text]").length?c=b.find("input[type=text]"):0<b.find("textarea").length&&(c=b.find("textarea"));b.data("patternid")&&(e=b.data("patternid"));d.off("click");f.find("li").off("click");
5
  b.init=function(){if(!b.find(".sq_pattern_list").length){b.append(f);var c=b.parents(".sq_blocksnippet:last");"undefined"===typeof $sq_patterns[e]&&($sq_patterns[e]=b.sq_getPatterns(c.find("input[name=sq_post_id]").val(),c.find("input[name=sq_term_id]").val(),c.find("input[name=sq_taxonomy]").val(),c.find("input[name=sq_post_type]").val()));$sq_patterns[e].done(function(c){if("undefined"!==typeof c){if(SQ_DEBUG&&console.log(c),"undefined"!==typeof c.json){a.sq_patterns_list=a.parseJSON(c.json);for(var d in a.sq_patterns_list)("{{page}}"===
6
- d||""!==a.sq_patterns_list[d]&&null!==a.sq_patterns_list[d])&&b.find(".sq_pattern_list").find("ul").append('<li class="sqtooltip" data-pattern="'+d+'" data-value="'+a.sq_patterns_list[d]+'" title="'+a.sq_patterns_list[d]+'">'+d+"</li>");a.fn.tooltip&&b.find(".sqtooltip").tooltip({placement:"top",trigger:"hover"});b.selectPattern()}}else SQ_DEBUG&&console.log("no data received")})}};b.listenIcon=function(){b.find(".sq_pattern_icon").length||(b.append(d),d.on("click",function(){f.toggle();f.is(":visible")?
7
- (d.addClass("sq_opened"),b.selectPattern(),c.off("change").on("change",function(){b.selectPattern()}),f.find("li:not(.sq_nostyle)").off("click").on("click",function(){b.selectPattern(a(this).html())})):d.removeClass("sq_opened")}))};b.selectPattern=function(b){var d=[];if("undefined"!==typeof b){var e=c.val();e="{{sep}}"!==b&&-1!==e.indexOf(b)?e.replace(b,"").replace(" "," ").trim():e.split(" ").pop()!==b?(e+" "+b).trim():e.substring(0,e.lastIndexOf(b)).trim();c.val(e)}1<c.val().length&&(d=c.val().split(" "));
8
- f.find("li").each(function(){a(this).removeClass("sq_patterns_selected")});if(0<d.length)for(var g=0;g<d.length;g++)d[g].match(/{{[a-z_]+}}/g)&&f.find("li").each(function(){d[g]===a(this).html()&&a(this).addClass("sq_patterns_selected")});a.fn.highlightWithinTextarea&&c.highlightWithinTextarea({highlight:/({{[^\}]+}})/g});a.fn.sq_checkMax&&c.sq_checkMax()};b.highlightListen=function(){c.highlightWithinTextarea({highlight:/({{[^\}]+}})/g});c.on("change",function(){a(this).highlightWithinTextarea({highlight:/({{[^\}]+}})/g})})};
9
- c&&(b.listenIcon(),b.highlightListen());return b};a.fn.sq_getPatterns=function(b,c,e,d){var f=this;f.addClass("sq_minloading");return a.post(sqQuery.ajaxurl,{action:"sq_getpatterns",post_id:b,term_id:c,taxonomy:e,post_type:d,sq_nonce:sqQuery.nonce}).done(function(a){SQ_DEBUG&&console.log(a);f.removeClass("sq_minloading")}).fail(function(){SQ_DEBUG&&console.log("no data received");f.removeClass("sq_minloading")})};a(document).ready(function(){a(".sq_pattern_field").each(function(){a(this).sq_patterns().init()})})})(jQuery);
3
  $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");"undefined"===typeof SQ_DEBUG&&(SQ_DEBUG=!1);var $sq_patterns=[];
4
  (function(a){a.fn.sq_patterns=function(){var b=this,c=!1,e=0,d=a('<div class="sq_pattern_icon" title="Click to edit/add more patterns"></div>'),f=a('<div class="sq_pattern_list sq-col-sm-12 sq-mx-0 sq-px-0" style="display: none"><ul><li class="sq_nostyle">Click to insert a pattern:</li></ul></div>');0<b.find("input[type=text]").length?c=b.find("input[type=text]"):0<b.find("textarea").length&&(c=b.find("textarea"));b.data("patternid")&&(e=b.data("patternid"));d.off("click");f.find("li").off("click");
5
  b.init=function(){if(!b.find(".sq_pattern_list").length){b.append(f);var c=b.parents(".sq_blocksnippet:last");"undefined"===typeof $sq_patterns[e]&&($sq_patterns[e]=b.sq_getPatterns(c.find("input[name=sq_post_id]").val(),c.find("input[name=sq_term_id]").val(),c.find("input[name=sq_taxonomy]").val(),c.find("input[name=sq_post_type]").val()));$sq_patterns[e].done(function(c){if("undefined"!==typeof c){if(SQ_DEBUG&&console.log(c),"undefined"!==typeof c.json){a.sq_patterns_list=a.parseJSON(c.json);for(var d in a.sq_patterns_list)("{{page}}"===
6
+ d||""!==a.sq_patterns_list[d]&&null!==a.sq_patterns_list[d])&&b.find(".sq_pattern_list").find("ul").append('<li data-pattern="'+d+'" data-value="'+a.sq_patterns_list[d]+'" title="'+a.sq_patterns_list[d]+'">'+d+"</li>");b.selectPattern()}}else SQ_DEBUG&&console.log("no data received")})}};b.listenIcon=function(){b.find(".sq_pattern_icon").length||(b.append(d),d.on("click",function(){f.toggle();f.is(":visible")?(d.addClass("sq_opened"),b.selectPattern(),c.off("change").on("change",function(){b.selectPattern()}),
7
+ f.find("li:not(.sq_nostyle)").off("click").on("click",function(){b.selectPattern(a(this).html())})):d.removeClass("sq_opened")}))};b.selectPattern=function(b){var d=[];if("undefined"!==typeof b){var e=c.val();e="{{sep}}"!==b&&-1!==e.indexOf(b)?e.replace(b,"").replace(" "," ").trim():e.split(" ").pop()!==b?(e+" "+b).trim():e.substring(0,e.lastIndexOf(b)).trim();c.val(e)}1<c.val().length&&(d=c.val().split(" "));f.find("li").each(function(){a(this).removeClass("sq_patterns_selected")});if(0<d.length)for(var g=
8
+ 0;g<d.length;g++)d[g].match(/{{[a-z_]+}}/g)&&f.find("li").each(function(){d[g]===a(this).html()&&a(this).addClass("sq_patterns_selected")});a.fn.highlightWithinTextarea&&c.highlightWithinTextarea({highlight:/({{[^\}]+}})/g});a.fn.sq_checkMax&&c.sq_checkMax()};b.highlightListen=function(){c.highlightWithinTextarea({highlight:/({{[^\}]+}})/g});c.off("change").on("change",function(){a(this).highlightWithinTextarea({highlight:/({{[^\}]+}})/g})})};c&&(b.listenIcon(),b.highlightListen());return b};a.fn.sq_getPatterns=
9
+ function(b,c,e,d){var f=this;f.addClass("sq_minloading");return a.post(sqQuery.ajaxurl,{action:"sq_getpatterns",post_id:b,term_id:c,taxonomy:e,post_type:d,sq_nonce:sqQuery.nonce}).done(function(a){SQ_DEBUG&&console.log(a);f.removeClass("sq_minloading")}).fail(function(){SQ_DEBUG&&console.log("no data received");f.removeClass("sq_minloading")})};a(document).ready(function(){a(".sq_pattern_field").each(function(){a(this).sq_patterns().init()})})})(jQuery);
view/assets/js/snippet.js CHANGED
@@ -2,12 +2,11 @@ if (typeof SQ_DEBUG === 'undefined') var SQ_DEBUG = false;
2
  //Blogs
3
  (function ($) {
4
 
5
-
6
  $.sq_showSaved = function (message, time) {
7
- if (!$('#sq_blocksnippet').find('.sq_tabcontent').length) {
8
- $('#sq_blocksnippet').prepend('<div class="sq_tabcontent" ></div>');
9
  }
10
- $('#sq_blocksnippet').find('.sq_tabcontent').prepend('<div class="sq-alert sq-my-2 sq-alert-success sq-alert-absolute" >' + message + '</div>');
11
 
12
  if (typeof time !== 'undefined' && time > 0) {
13
  setTimeout(function () {
@@ -17,10 +16,10 @@ if (typeof SQ_DEBUG === 'undefined') var SQ_DEBUG = false;
17
  };
18
 
19
  $.sq_showError = function (message, time) {
20
- if (!$('#sq_blocksnippet').find('.sq_tabcontent').length) {
21
- $('#sq_blocksnippet').prepend('<div class="sq_tabcontent" ></div>');
22
  }
23
- $('#sq_blocksnippet').find('.sq_tabcontent').prepend('<div class="sq-alert sq-my-2 sq-alert-danger sq-alert-absolute" >' + message + '</div>');
24
 
25
  if (typeof time !== 'undefined' && time > 0) {
26
  setTimeout(function () {
@@ -120,7 +119,7 @@ if (typeof SQ_DEBUG === 'undefined') var SQ_DEBUG = false;
120
 
121
  'validKeyword': false,
122
  '__sq_save_message': (typeof __sq_save_message !== 'undefined' ? __sq_save_message : 'Saved!'),
123
- '__sq_error_message': (typeof __sq_error_message !== 'undefined' ? __sq_error_message : 'ERROR! Could not save the data. Please refresh'),
124
  '__sq_save_message_preview': (typeof __sq_save_message_preview !== 'undefined' ? __sq_save_message_preview : 'Saved! Reload to see the changes.')
125
 
126
  }, options);
@@ -206,6 +205,26 @@ if (typeof SQ_DEBUG === 'undefined') var SQ_DEBUG = false;
206
  var $sq_hash = $this.find('#sq_hash');
207
  if ($sq_hash.val() !== '') {
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  $.post(sqQuery.ajaxurl,
210
  {
211
  action: "sq_saveseo",
@@ -458,7 +477,7 @@ if (typeof SQ_DEBUG === 'undefined') var SQ_DEBUG = false;
458
  //Set the selected action value in the input
459
  if (typeof actionValue !== "undefined" && actionValue !== "") {
460
  //Set the Value
461
- input.val(actionValue.html());
462
 
463
  //trigger change for patterns
464
  input.trigger('change');
2
  //Blogs
3
  (function ($) {
4
 
 
5
  $.sq_showSaved = function (message, time) {
6
+ if (!$('.sq_blocksnippet').find('.sq_tabcontent').length) {
7
+ $('.sq_blocksnippet').prepend('<div class="sq_tabcontent" ></div>');
8
  }
9
+ $('.sq_blocksnippet').find('.sq_tabcontent').prepend('<div class="sq-alert sq-my-2 sq-alert-success sq-alert-absolute" >' + message + '</div>');
10
 
11
  if (typeof time !== 'undefined' && time > 0) {
12
  setTimeout(function () {
16
  };
17
 
18
  $.sq_showError = function (message, time) {
19
+ if (!$('.sq_blocksnippet').find('.sq_tabcontent').length) {
20
+ $('.sq_blocksnippet').prepend('<div class="sq_tabcontent" ></div>');
21
  }
22
+ $('.sq_blocksnippet').find('.sq_tabcontent').prepend('<div class="sq-alert sq-my-2 sq-alert-danger sq-alert-absolute" >' + message + '</div>');
23
 
24
  if (typeof time !== 'undefined' && time > 0) {
25
  setTimeout(function () {
119
 
120
  'validKeyword': false,
121
  '__sq_save_message': (typeof __sq_save_message !== 'undefined' ? __sq_save_message : 'Saved!'),
122
+ '__sq_error_message': (typeof __sq_error_message !== 'undefined' ? __sq_error_message : 'ERROR! Could not save the data. Please try again.'),
123
  '__sq_save_message_preview': (typeof __sq_save_message_preview !== 'undefined' ? __sq_save_message_preview : 'Saved! Reload to see the changes.')
124
 
125
  }, options);
205
  var $sq_hash = $this.find('#sq_hash');
206
  if ($sq_hash.val() !== '') {
207
 
208
+ //Remove the emoji image
209
+ if (settings.sq_title.find('.emoji').length > 0) {
210
+ settings.sq_title.find('.emoji').after(settings.sq_title.find('.emoji').attr('alt')).remove();
211
+ }
212
+ if (settings.sq_description.find('.emoji').length > 0) {
213
+ settings.sq_description.find('.emoji').after(settings.sq_description.find('.emoji').attr('alt')).remove();
214
+ }
215
+ if (settings.sq_tw_title.find('.emoji').length > 0) {
216
+ settings.sq_tw_title.find('.emoji').after(settings.sq_tw_title.find('.emoji').attr('alt')).remove();
217
+ }
218
+ if (settings.sq_tw_description.find('.emoji').length > 0) {
219
+ settings.sq_tw_description.find('.emoji').after(settings.sq_tw_description.find('.emoji').attr('alt')).remove();
220
+ }
221
+ if (settings.sq_og_title.find('.emoji').length > 0) {
222
+ settings.sq_og_title.find('.emoji').after(settings.sq_og_title.find('.emoji').attr('alt')).remove();
223
+ }
224
+ if (settings.sq_og_description.find('.emoji').length > 0) {
225
+ settings.sq_og_description.find('.emoji').after(settings.sq_og_description.find('.emoji').attr('alt')).remove();
226
+ }
227
+
228
  $.post(sqQuery.ajaxurl,
229
  {
230
  action: "sq_saveseo",
477
  //Set the selected action value in the input
478
  if (typeof actionValue !== "undefined" && actionValue !== "") {
479
  //Set the Value
480
+ input.val(actionValue.data('value'));
481
 
482
  //trigger change for patterns
483
  input.trigger('change');
view/assets/js/snippet.min.js CHANGED
@@ -1,39 +1,40 @@
1
  var SQ_DEBUG,$jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,d,a){c instanceof String&&(c=String(c));for(var b=c.length,e=0;e<b;e++){var h=c[e];if(d.call(a,h,e,c))return{i:e,v:h}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,a){c!=Array.prototype&&c!=Object.prototype&&(c[d]=a.value)};
2
  $jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,a,b){if(d){a=$jscomp.global;c=c.split(".");for(b=0;b<c.length-1;b++){var e=c[b];e in a||(a[e]={});a=a[e]}c=c[c.length-1];b=a[c];d=d(b);d!=b&&null!=d&&$jscomp.defineProperty(a,c,{configurable:!0,writable:!0,value:d})}};
3
  $jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,a){return $jscomp.findInternal(this,c,a).v}},"es6","es3");"undefined"===typeof SQ_DEBUG&&(SQ_DEBUG=!1);
4
- (function(c){c.sq_showSaved=function(d,a){c("#sq_blocksnippet").find(".sq_tabcontent").length||c("#sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>');c("#sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-success sq-alert-absolute" >'+d+"</div>");"undefined"!==typeof a&&0<a&&setTimeout(function(){jQuery(".sq-alert").hide()},a)};c.sq_showError=function(d,a){c("#sq_blocksnippet").find(".sq_tabcontent").length||c("#sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>');
5
- c("#sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-danger sq-alert-absolute" >'+d+"</div>");"undefined"!==typeof a&&0<a&&setTimeout(function(){jQuery(".sq-alert").hide()},a)};c.fn.sq_loadSnippet=function(){c("input[name=sq_post_id]").length||(0<c("input[name=post_ID]").length&&this.prepend('<input type="hidden" name="sq_post_id" value="'+c("input[name=post_ID]").val()+'">'),0<c("input[name=post_type]").length&&this.prepend('<input type="hidden" name="sq_post_type" value="'+
6
  c("input[name=post_type]").val()+'">'),0<c("input[name=tag_ID]").length&&this.prepend('<input type="hidden" name="sq_term_id" value="'+c("input[name=tag_ID]").val()+'">'),0<c("input[name=taxonomy]").length&&this.prepend('<input type="hidden" name="sq_taxonomy" value="'+c("input[name=taxonomy]").val()+'">'));this.each(function(){c(this).sq_getSnippet(c(this).find("input[name=sq_post_id]").val(),c(this).find("input[name=sq_term_id]").val(),c(this).find("input[name=sq_taxonomy]").val(),c(this).find("input[name=sq_post_type]").val())})};
7
  c.fn.sq_editSnippet=function(d){var a=this,b=c.extend({called:"normal",sq_snippet_wrap:a.find(".sq_snippet_wrap"),editButton:a.find(".sq_snippet_btn_edit"),saveButton:a.find(".sq_snippet_btn_save"),cancelButton:a.find(".sq_snippet_btn_cancel"),refreshButton:a.find(".sq_snippet_btn_refresh"),last_tab:null,closeButton:a.find(".sq-close"),sq_url:a.find("input[name=sq_url]"),sq_doseo:a.find("input[name=sq_doseo].sq-switch"),sq_toggle:a.find(".sq-toggle"),sq_title:a.find("textarea[name=sq_title]"),sq_description:a.find("textarea[name=sq_description]"),
8
  sq_keywords:a.find("input[name=sq_keywords]"),sq_noindex:a.find("input[name=sq_noindex]"),sq_nofollow:a.find("input[name=sq_nofollow]"),sq_nositemap:a.find("input[name=sq_nositemap]"),sq_canonical:a.find("input[name=sq_canonical]"),sq_og_media:a.find("input[name=sq_og_media]"),sq_og_media_preview:a.find("img.sq_og_media_preview"),og_image_close:a.find(".sq_og_image_close"),sq_og_title:a.find("textarea[name=sq_og_title]"),sq_og_description:a.find("textarea[name=sq_og_description]"),sq_og_author:a.find("input[name=sq_og_author]"),
9
  sq_og_type:a.find("select[name=sq_og_type]"),sq_og_pixel:a.find("#sq_og_pixel_id"),sq_tw_media:a.find("input[name=sq_tw_media]"),sq_tw_media_preview:a.find("img.sq_tw_media_preview"),tw_image_close:a.find(".sq_tw_image_close"),sq_tw_title:a.find("textarea[name=sq_tw_title]"),sq_tw_description:a.find("textarea[name=sq_tw_description]"),sq_tw_type:a.find("select[name=sq_tw_type]"),sq_jsonld:a.find("textarea[name=sq_jsonld]"),sq_jsonld_code_type:a.find("select.sq_jsonld_code_type"),sq_jsonld_custom_code:a.find("div.sq_jsonld_custom_code"),
10
  sq_fpixel:a.find("textarea[name=sq_fpixel]"),sq_fpixel_code_type:a.find("select.sq_fpixel_code_type"),sq_fpixel_custom_code:a.find("div.sq_fpixel_custom_code"),sq_post_id:0<a.find("input[name=sq_post_id]").length?a.find("input[name=sq_post_id]").val():0,sq_term_id:0<a.find("input[name=sq_term_id]").length?a.find("input[name=sq_term_id]").val():0,sq_taxonomy:0<a.find("input[name=sq_taxonomy]").length?a.find("input[name=sq_taxonomy]").val():"",sq_post_type:0<a.find("input[name=sq_post_type]").length?
11
- a.find("input[name=sq_post_type]").val():"",previewTab:a.find(".sq_tab_preview"),editTab:a.find(".sq_tab_edit"),validKeyword:!1,__sq_save_message:"undefined"!==typeof __sq_save_message?__sq_save_message:"Saved!",__sq_error_message:"undefined"!==typeof __sq_error_message?__sq_error_message:"ERROR! Could not save the data. Please refresh",__sq_save_message_preview:"undefined"!==typeof __sq_save_message_preview?__sq_save_message_preview:"Saved! Reload to see the changes."},d);a.initNav=function(){var c=
12
  a.parents(".menupop:last");0<c.length&&"topmenu"===a.data("snippet")?(c.off("hover"),c.find(".ab-item").on("click",function(){c.addClass("open")}),b.closeButton.on("click",function(){c.removeClass("open");c.removeClass("hover")}),c.find(".sq_snippet_wrap").show()):(a.off("hover"),b.closeButton.on("click",function(){a.hide()}))};a.listenDoSeo=function(){b.sq_doseo.on("change",function(){a.saveSEO()});b.sq_doseo.prop("checked")?(b.previewTab.show(),b.editTab.hide()):(b.previewTab.hide(),b.editTab.hide(),
13
- b.cancelButton.hide())};a.tabsListen=function(){a.find("#sq_tabs").find("li").on("click",function(b){b.preventDefault();$li=c(this);a.find("#sq_tabs").find("li").each(function(){c(this).removeClass("active")});a.find(".sq_tabcontent").each(function(){c(this).hide()});a.find("#sq_tab_"+$li.find("a").text().toString().toLowerCase()).show();$li.addClass("active")})};a.saveSEO=function(){a.preventLeave(!1);a.addClass("sq_minloading");var d=a.find("#sq_hash");""!==d.val()&&c.post(sqQuery.ajaxurl,{action:"sq_saveseo",
14
- sq_title:0<b.sq_title.length?a.escapeHtml(b.sq_title.val()):"",sq_description:0<b.sq_description.length?a.escapeHtml(b.sq_description.val()):"",sq_keywords:0<b.sq_keywords.length?a.escapeHtml(b.sq_keywords.val()):"",sq_canonical:0<b.sq_canonical.length?a.escapeHtml(b.sq_canonical.val()):"",sq_noindex:0<a.find("input[name=sq_noindex]:checked").length?parseInt(a.find("input[name=sq_noindex]:checked").val()):1,sq_nofollow:0<a.find("input[name=sq_nofollow]:checked").length?parseInt(a.find("input[name=sq_nofollow]:checked").val()):
15
- 1,sq_nositemap:0<a.find("input[name=sq_nositemap]:checked").length?parseInt(a.find("input[name=sq_nositemap]:checked").val()):1,sq_tw_title:0<b.sq_tw_title.length?a.escapeHtml(b.sq_tw_title.val()):"",sq_tw_description:0<b.sq_tw_description.length?a.escapeHtml(b.sq_tw_description.val()):"",sq_tw_media:0<b.sq_tw_media.length?b.sq_tw_media.val():"",sq_tw_type:0<b.sq_tw_type.length?b.sq_tw_type.find("option:selected").val():"",sq_og_title:0<b.sq_og_title.length?a.escapeHtml(b.sq_og_title.val()):"",sq_og_description:0<
16
- b.sq_og_description.length?a.escapeHtml(b.sq_og_description.val()):"",sq_og_type:0<b.sq_og_type.length?b.sq_og_type.find("option:selected").val():"",sq_og_author:0<b.sq_og_author.length?a.escapeHtml(b.sq_og_author.val()):"",sq_og_media:0<b.sq_og_media.length?b.sq_og_media.val():"",sq_jsonld_code_type:0<b.sq_jsonld_code_type.length?b.sq_jsonld_code_type.find("option:selected").val():"auto",sq_jsonld:0<b.sq_jsonld.length&&"custom"===b.sq_jsonld_code_type.find("option:selected").val()?b.sq_jsonld.val():
17
- "",sq_fpixel_code_type:0<b.sq_fpixel_code_type.length?b.sq_fpixel_code_type.find("option:selected").val():"auto",sq_fpixel:0<b.sq_fpixel.length&&"custom"===b.sq_fpixel_code_type.find("option:selected").val()?b.sq_fpixel.val():"",sq_url:0<b.sq_url.length?a.escapeHtml(b.sq_url.val()):"",sq_hash:d.val(),post_id:b.sq_post_id,term_id:b.sq_term_id,taxonomy:b.sq_taxonomy,post_type:b.sq_post_type,sq_doseo:0<a.find("input[name=sq_doseo]:checked").length?parseInt(a.find("input[name=sq_doseo]:checked").val()):
18
- 0,sq_nonce:sqQuery.nonce},function(){}).done(function(d){a.removeClass("sq_minloading");if("undefined"!==typeof d.saved){if("undefined"!==typeof d.html){var e=a.find(".sq-nav-item.active");a.html(d.html);a.sq_editSnippet({called:"ajax"});a.find(e).trigger("click");a.trigger("sq_snippet_loaded");a.trigger("sq_snippet_saved");SQ_DEBUG&&console.log("sq_snippet_loaded");SQ_DEBUG&&console.log("sq_snippet_saved")}else c.sq_showError("Couldn't load the page. Please refresh.",0);"undefined"!==typeof d.error?
19
- c.sq_showError(d.error,2E3):c.sq_showSaved(b.__sq_save_message,2E3)}else c.sq_showError(b.__sq_error_message,2E3)}).fail(function(){a.removeClass("sq_minloading");c.sq_showError(b.__sq_error_message,2E3)})};a.populateInputs=function(){var d=c(document).find("head title").text();d||(d="");(d=a.find('meta[name="description"]').attr("content"))||(d="");0<a.find(".sq_title").length&&a.find(".sq_title").each(function(){c(this).sq_checkMax()});0<a.find(".sq_description").length&&a.find(".sq_description").each(function(){c(this).sq_checkMax()});
20
- 0<a.find(".sq_tab_facebook").find(".sq_deactivated").length&&(a.find(".sq_tab_facebook").find(".sq_snippet_title").text(a.find(".sq_tab_meta").find(".sq_snippet_title").text()),a.find(".sq_tab_facebook").find(".sq_snippet_description").text(a.find(".sq_tab_meta").find(".sq_snippet_description").text()));0<a.find(".sq_tab_twitter").find(".sq_deactivated").length&&(a.find(".sq_tab_twitter").find(".sq_snippet_title").text(a.find(".sq_tab_meta").find(".sq_snippet_title").text()),a.find(".sq_tab_twitter").find(".sq_snippet_description").text(a.find(".sq_tab_meta").find(".sq_snippet_description").text()));
21
- b.sq_og_media_preview&&""!==b.sq_og_media.val()&&(b.sq_og_media_preview.attr("src",b.sq_og_media.val()),b.og_image_close.show());b.og_image_close.on("click",function(){b.sq_og_media_preview.attr("src","");b.sq_og_media.val("");c(this).hide()});b.sq_tw_media_preview&&""!==b.sq_tw_media.val()&&(b.sq_tw_media_preview.attr("src",b.sq_tw_media.val()),b.tw_image_close.show());b.tw_image_close.on("click",function(){b.sq_tw_media_preview.attr("src","");b.sq_tw_media.val("");c(this).hide()});b.refreshButton.on("click",
22
- function(){a.sq_loadSnippet()});a.keywordsListen();b.editButton.on("click",function(){b.previewTab.hide();b.editTab.show();b.cancelButton.on("click",function(){b.previewTab.show();b.editTab.hide()});c.isFunction(c.fn.sq_patterns)&&a.find(".sq_pattern_field").each(function(){c(this).sq_patterns().init()})})};a.mediaListen=function(){a.find(".sq_get_og_media, .sq_get_tw_media").click(function(a){a.preventDefault();var d=c(this).parents(".sq-row:last").find(".sq_og_media_preview"),e=c(this).parents(".sq-row:last").find(".sq_og_image_close"),
23
- g=c(this).parents(".sq-row:last").find(".sq_tw_media_preview"),l=c(this).parents(".sq-row:last").find(".sq_tw_image_close");k&&k.open();var k=wp.media({title:"Select Media",multiple:!1,library:{type:"image"}});k.on("close",function(){var a=null,c=0;k.state().get("selection").each(function(b){a=b.attributes.url;c++});0<d.length&&null!==a&&(b.sq_og_media.val(a),d.attr("src",a),e.show());0<g.length&&null!==a&&(b.sq_tw_media.val(a),g.attr("src",a),l.show())});k.on("open",function(){k.state().get("selection")});
24
- k.open()})};a.dropDownListen=function(){var a,d,f;b.sq_toggle.on("click",function(){f=c(this);f.css("height","auto");d=f.parents(".sq-input-group:last").find(".sq-actions");if("small"==d.data("position"))d.css("top","35px"),d.css("height","36px");else{var b=f.height()+20;d.css("top",b+"px")}a=d.find(".sq-action");d.show();a.on("click",function(){var a=c(this).find(".sq-value");"undefined"!==typeof a&&""!==a&&(f.val(a.html()),f.trigger("change"),f.sq_checkMax())});f.on("keyup",function(){c(this).parents(".sq-input-group:last").find(".sq-actions").hide()});
25
- f.sq_bodyClick("click",function(){c(this).parents(".sq-input-group:last").find(".sq-actions").hide()})});b.sq_jsonld_code_type.on("change",function(){"custom"===b.sq_jsonld_code_type.find("option:selected").val()?b.sq_jsonld_custom_code.show():b.sq_jsonld_custom_code.hide()});b.sq_fpixel_code_type.on("change",function(){"custom"===b.sq_fpixel_code_type.find("option:selected").val()?b.sq_fpixel_custom_code.show():b.sq_fpixel_custom_code.hide()})};a.keywordsListen=function(){b.sq_keywords.sqtagsinput("items")};
26
- a.escapeHtml=function(a){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return a.toString().replace(/[&<>"']/g,function(a){return b[a]})};a.preventLeave=function(a){if(0==c("form#post").length)if(a)c(window).on("beforeunload",function(){return confirm("You have unsave changes in Squirrly Snippet. Are you sure you want to proceed?")});else c(window).off("beforeunload")};a.initNav();a.listenDoSeo();a.mediaListen();a.tabsListen();a.populateInputs();a.dropDownListen();a.find('input[type="text"], textarea').on("keyup paste",
27
- function(){a.preventLeave(!0);c(this).sq_checkMax()});b.saveButton.on("click",function(b){b.preventDefault();SQ_DEBUG&&console.log("save");a.preventLeave(!1);a.saveSEO()});if("undefined"!==typeof c.sq_blockseo)c.sq_blockseo.on("sq_seo_refresh",function(){b.refreshButton.trigger("click")});c(document).on("after-autosave.update-post-slug",function(b,c){a.preventLeave(!1)});0<a.find(".sq_save_ajax").length&&(a.find(".sq_save_ajax").find("input").on("change",function(){c(this).sq_ajaxSnippetListen()}),
28
- a.find(".sq_save_ajax").find("button").on("click",function(){c(this).sq_ajaxSnippetListen()}));return a};c.fn.sq_checkMax=function(){var d=c(this),a=d.parents(".sq-input-group:last"),b=0,e=300,h;if(!(0< !d.length)){var f=d.is("input, textarea")?h=d.val():h=d.html();var g=f.length;a.find(".sq_length").length&&(e=parseInt(a.find(".sq_length").data("maxlength")));if(a.hasClass("sq_pattern_field")){var l=a.find(".sq_pattern_list");var k=f.split(" ");if(0<k.length){for(g=0;g<k.length;g++)l.find('li[data-pattern="'+
29
- k[g].replace(/"/g,"")+'"]').length&&(f=f.replace(k[g],""),f=f.replace(" "," "),f=f.trim(),l.find('li[data-pattern="'+k[g].replace(/"/g,"")+'"]').data("value")&&(b+=l.find('li[data-pattern="'+k[g].replace(/"/g,"")+'"]').data("value").length),h=h.replace(new RegExp(k[g],"g"),l.find('li[data-pattern="'+k[g].replace(/"/g,"")+'"]').data("value")));g=f.length+b}}d.attr("title",h);a.find(".sq_length").text(g+"/"+e);0===g||g>e?d.attr("style","border: solid 1px red !important"):d.attr("style","border: none !important")}};
30
- c.fn.sq_bodyClick=function(d,a){return this.each(function(){var b=c(this),e=this;c(document).on(d,function f(b){b.target===e||c.contains(e,b.target)||(a.apply(e,[b]),c(document).off(d,f))});b.on("keydown blur",function g(c){9===c.which&&(a.apply(e,[c]),b.off("keydown",g))})})};c.fn.toggleSwitch=function(d){var a=c(this);(a.prop("checked")&&0==d||!a.prop("checked")&&1==d)&&a.trigger("click")};c.fn.sq_getSnippet=function(d,a,b,e){var h=this;h.addClass("sq_minloading");c.post(sqQuery.ajaxurl,{action:"sq_getsnippet",
31
- post_id:d,term_id:a,taxonomy:b,post_type:e,sq_nonce:sqQuery.nonce}).done(function(a){"undefined"!==typeof a?("undefined"!==typeof a.html?(c("div.tooltip").hide(),h.html(a.html),h.sq_editSnippet(),h.trigger("sq_snippet_loaded"),SQ_DEBUG&&console.log("sq_snippet_loaded")):c("#sq_blocksnippet").trigger("error.refresh"),"undefined"!==typeof a.error&&c.sq_showError(a.error,1E4)):(c("#sq_blocksnippet").trigger("error.refresh"),SQ_DEBUG&&console.log("no data received"));h.removeClass("sq_minloading")}).fail(function(){SQ_DEBUG&&
32
- console.log("no data received");c("#sq_blocksnippet").trigger("error.refresh");h.removeClass("sq_minloading")})};c.fn.sq_previewSnippet=function(d,a){var b=this;"undefined"===typeof d&&(d="");"undefined"===typeof a&&(a="");b.find(".sq_snippet_ul").addClass("sq_minloading");b.find(".sq_snippet_title").html("");b.find(".sq_snippet_url").html("");b.find(".sq_snippet_description").html("");b.find(".sq_snippet_keywords").hide();b.find(".sq_snippet").show();b.find(".sq_snippet_update").hide();b.find(".sq_snippet_customize").hide();
33
- b.find(".ogimage_preview").hide();setTimeout(function(){c.post(sqQuery.ajaxurl,{action:"sq_previewsnippet",url:d,sq_nonce:sqQuery.nonce}).done(function(c){b.find(".sq_snippet_ul").removeClass("sq_minloading");b.find(".sq_snippet_update").show();b.find(".sq_snippet_customize").show();b.find(".sq_snippet_keywords").show();b.find(".ogimage_preview").show();c&&(b.find(".sq_snippet_title").html(c.title),""!==a?b.find(".sq_snippet_url").html('<a href="'+d+'" target="_blank">'+a+"</a>"):b.find(".sq_snippet_url").html(c.url),
34
- b.find(".sq_snippet_description").html(c.description))}).fail(function(){b.find(".sq_snippet_ul").removeClass("sq_minloading");b.find(".sq_snippet_update").show()},"json")},500)};c.fn.sq_ajaxSnippetListen=function(){var d=this,a=c("#"+d.data("input")),b=d.data("confirm"),e=d.data("action"),h=d.data("name"),f=0;a.length||(a=d);if("undefined"===typeof b||confirm(b))a.is("checkbox")&&a.is(":checked")?f=a.val():a.is("select")?f=a.find("option:selected").val():a.is("input")&&(f=a.val()),d.addClass("sq_minloading"),
35
- ""!==e&&""!==f&&c.post(sqQuery.ajaxurl,{action:e,input:h,value:f,sq_nonce:sqQuery.nonce}).done(function(a){"undefined"!==typeof a.data?(""===a.data?c("#wpbody-content").prepend("Saved"):c("#wpbody-content").prepend(a.data),setTimeout(function(){d.removeClass("sq_minloading");var a=d.closest("div.sq_save_ajax").parent("div");0<a.length?(a.find(".sq_deactivated_label").remove(),a.find(".sq_deactivated").removeClass("sq_deactivated")):location.reload()},1E3)):"undefined"!==typeof a.error&&(c("body").prepend(a.error),
36
- d.removeClass("sq_minloading"))}).fail(function(){d.removeClass("sq_minloading");location.reload()},"json")};c.sq_isGutenberg||(c.sq_isGutenberg=function(d){return"undefined"!==typeof window.wp&&"undefined"!==typeof wp.data&&"undefined"!==typeof wp.data.select("core/editor")&&c.isFunction(wp.data.select("core/editor").getEditedPostAttribute)});c(document).ready(function(){var d=c("#wp-admin-bar-sq_bar_menu"),a=!1,b="metas";0<d.length&&(d.find('#sq_blocksnippet[data-snippet="topmenu"]').length?(a=
37
- d.find("#sq_blocksnippet"),a.sq_loadSnippet()):c('#sq_blocksnippet[data-snippet!="topmenu"]').length&&(a=c("#sq_blocksnippet"),d.find("#wp-admin-bar-sq_bar_submenu").remove(),d.find(".ab-item").on("click",function(){0<c(".edit-post-layout__content").length?c(".edit-post-layout__content").scrollTop(c(".edit-post-layout__content").scrollTop()+a.offset().top-100):c("html,body").scrollTop(a.offset().top-50)}),a.addClass("sq_blocksnippet").addClass("sq-shadow-sm").addClass("sq-border-bottom"),a.find(".inside").show().sq_loadSnippet()),
38
- a&&(a.on("sq_snippet_loaded",function(){$snippet=c(this);$snippet.find(".sq-nav-item.sq-nav-link").on("click",function(){b=c(this).data("category")});$snippet.find(".sq-nav-item").removeClass("active");$snippet.find(".sq-tab-pane").removeClass("active");var a=$snippet.find(".sq_snippet_menu").find("#sq-nav-item_"+b);a.addClass("active");$snippet.find(a.attr("href")).addClass("active")}),a.on("error.refresh",function(){c.sq_showError("Couldn't load the page. <span class='sq_snippet_refresh' style='color: #0F75BC; cursor:pointer;'>Please refresh</span>.",
39
- 0);c(".sq_snippet_refresh").on("click",function(){a.sq_loadSnippet()})})))})})(jQuery);
 
1
  var SQ_DEBUG,$jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,d,a){c instanceof String&&(c=String(c));for(var b=c.length,e=0;e<b;e++){var h=c[e];if(d.call(a,h,e,c))return{i:e,v:h}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,a){c!=Array.prototype&&c!=Object.prototype&&(c[d]=a.value)};
2
  $jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,a,b){if(d){a=$jscomp.global;c=c.split(".");for(b=0;b<c.length-1;b++){var e=c[b];e in a||(a[e]={});a=a[e]}c=c[c.length-1];b=a[c];d=d(b);d!=b&&null!=d&&$jscomp.defineProperty(a,c,{configurable:!0,writable:!0,value:d})}};
3
  $jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,a){return $jscomp.findInternal(this,c,a).v}},"es6","es3");"undefined"===typeof SQ_DEBUG&&(SQ_DEBUG=!1);
4
+ (function(c){c.sq_showSaved=function(d,a){c(".sq_blocksnippet").find(".sq_tabcontent").length||c(".sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>');c(".sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-success sq-alert-absolute" >'+d+"</div>");"undefined"!==typeof a&&0<a&&setTimeout(function(){jQuery(".sq-alert").hide()},a)};c.sq_showError=function(d,a){c(".sq_blocksnippet").find(".sq_tabcontent").length||c(".sq_blocksnippet").prepend('<div class="sq_tabcontent" ></div>');
5
+ c(".sq_blocksnippet").find(".sq_tabcontent").prepend('<div class="sq-alert sq-my-2 sq-alert-danger sq-alert-absolute" >'+d+"</div>");"undefined"!==typeof a&&0<a&&setTimeout(function(){jQuery(".sq-alert").hide()},a)};c.fn.sq_loadSnippet=function(){c("input[name=sq_post_id]").length||(0<c("input[name=post_ID]").length&&this.prepend('<input type="hidden" name="sq_post_id" value="'+c("input[name=post_ID]").val()+'">'),0<c("input[name=post_type]").length&&this.prepend('<input type="hidden" name="sq_post_type" value="'+
6
  c("input[name=post_type]").val()+'">'),0<c("input[name=tag_ID]").length&&this.prepend('<input type="hidden" name="sq_term_id" value="'+c("input[name=tag_ID]").val()+'">'),0<c("input[name=taxonomy]").length&&this.prepend('<input type="hidden" name="sq_taxonomy" value="'+c("input[name=taxonomy]").val()+'">'));this.each(function(){c(this).sq_getSnippet(c(this).find("input[name=sq_post_id]").val(),c(this).find("input[name=sq_term_id]").val(),c(this).find("input[name=sq_taxonomy]").val(),c(this).find("input[name=sq_post_type]").val())})};
7
  c.fn.sq_editSnippet=function(d){var a=this,b=c.extend({called:"normal",sq_snippet_wrap:a.find(".sq_snippet_wrap"),editButton:a.find(".sq_snippet_btn_edit"),saveButton:a.find(".sq_snippet_btn_save"),cancelButton:a.find(".sq_snippet_btn_cancel"),refreshButton:a.find(".sq_snippet_btn_refresh"),last_tab:null,closeButton:a.find(".sq-close"),sq_url:a.find("input[name=sq_url]"),sq_doseo:a.find("input[name=sq_doseo].sq-switch"),sq_toggle:a.find(".sq-toggle"),sq_title:a.find("textarea[name=sq_title]"),sq_description:a.find("textarea[name=sq_description]"),
8
  sq_keywords:a.find("input[name=sq_keywords]"),sq_noindex:a.find("input[name=sq_noindex]"),sq_nofollow:a.find("input[name=sq_nofollow]"),sq_nositemap:a.find("input[name=sq_nositemap]"),sq_canonical:a.find("input[name=sq_canonical]"),sq_og_media:a.find("input[name=sq_og_media]"),sq_og_media_preview:a.find("img.sq_og_media_preview"),og_image_close:a.find(".sq_og_image_close"),sq_og_title:a.find("textarea[name=sq_og_title]"),sq_og_description:a.find("textarea[name=sq_og_description]"),sq_og_author:a.find("input[name=sq_og_author]"),
9
  sq_og_type:a.find("select[name=sq_og_type]"),sq_og_pixel:a.find("#sq_og_pixel_id"),sq_tw_media:a.find("input[name=sq_tw_media]"),sq_tw_media_preview:a.find("img.sq_tw_media_preview"),tw_image_close:a.find(".sq_tw_image_close"),sq_tw_title:a.find("textarea[name=sq_tw_title]"),sq_tw_description:a.find("textarea[name=sq_tw_description]"),sq_tw_type:a.find("select[name=sq_tw_type]"),sq_jsonld:a.find("textarea[name=sq_jsonld]"),sq_jsonld_code_type:a.find("select.sq_jsonld_code_type"),sq_jsonld_custom_code:a.find("div.sq_jsonld_custom_code"),
10
  sq_fpixel:a.find("textarea[name=sq_fpixel]"),sq_fpixel_code_type:a.find("select.sq_fpixel_code_type"),sq_fpixel_custom_code:a.find("div.sq_fpixel_custom_code"),sq_post_id:0<a.find("input[name=sq_post_id]").length?a.find("input[name=sq_post_id]").val():0,sq_term_id:0<a.find("input[name=sq_term_id]").length?a.find("input[name=sq_term_id]").val():0,sq_taxonomy:0<a.find("input[name=sq_taxonomy]").length?a.find("input[name=sq_taxonomy]").val():"",sq_post_type:0<a.find("input[name=sq_post_type]").length?
11
+ a.find("input[name=sq_post_type]").val():"",previewTab:a.find(".sq_tab_preview"),editTab:a.find(".sq_tab_edit"),validKeyword:!1,__sq_save_message:"undefined"!==typeof __sq_save_message?__sq_save_message:"Saved!",__sq_error_message:"undefined"!==typeof __sq_error_message?__sq_error_message:"ERROR! Could not save the data. Please try again.",__sq_save_message_preview:"undefined"!==typeof __sq_save_message_preview?__sq_save_message_preview:"Saved! Reload to see the changes."},d);a.initNav=function(){var c=
12
  a.parents(".menupop:last");0<c.length&&"topmenu"===a.data("snippet")?(c.off("hover"),c.find(".ab-item").on("click",function(){c.addClass("open")}),b.closeButton.on("click",function(){c.removeClass("open");c.removeClass("hover")}),c.find(".sq_snippet_wrap").show()):(a.off("hover"),b.closeButton.on("click",function(){a.hide()}))};a.listenDoSeo=function(){b.sq_doseo.on("change",function(){a.saveSEO()});b.sq_doseo.prop("checked")?(b.previewTab.show(),b.editTab.hide()):(b.previewTab.hide(),b.editTab.hide(),
13
+ b.cancelButton.hide())};a.tabsListen=function(){a.find("#sq_tabs").find("li").on("click",function(b){b.preventDefault();$li=c(this);a.find("#sq_tabs").find("li").each(function(){c(this).removeClass("active")});a.find(".sq_tabcontent").each(function(){c(this).hide()});a.find("#sq_tab_"+$li.find("a").text().toString().toLowerCase()).show();$li.addClass("active")})};a.saveSEO=function(){a.preventLeave(!1);a.addClass("sq_minloading");var d=a.find("#sq_hash");""!==d.val()&&(0<b.sq_title.find(".emoji").length&&
14
+ b.sq_title.find(".emoji").after(b.sq_title.find(".emoji").attr("alt")).remove(),0<b.sq_description.find(".emoji").length&&b.sq_description.find(".emoji").after(b.sq_description.find(".emoji").attr("alt")).remove(),0<b.sq_tw_title.find(".emoji").length&&b.sq_tw_title.find(".emoji").after(b.sq_tw_title.find(".emoji").attr("alt")).remove(),0<b.sq_tw_description.find(".emoji").length&&b.sq_tw_description.find(".emoji").after(b.sq_tw_description.find(".emoji").attr("alt")).remove(),0<b.sq_og_title.find(".emoji").length&&
15
+ b.sq_og_title.find(".emoji").after(b.sq_og_title.find(".emoji").attr("alt")).remove(),0<b.sq_og_description.find(".emoji").length&&b.sq_og_description.find(".emoji").after(b.sq_og_description.find(".emoji").attr("alt")).remove(),c.post(sqQuery.ajaxurl,{action:"sq_saveseo",sq_title:0<b.sq_title.length?a.escapeHtml(b.sq_title.val()):"",sq_description:0<b.sq_description.length?a.escapeHtml(b.sq_description.val()):"",sq_keywords:0<b.sq_keywords.length?a.escapeHtml(b.sq_keywords.val()):"",sq_canonical:0<
16
+ b.sq_canonical.length?a.escapeHtml(b.sq_canonical.val()):"",sq_noindex:0<a.find("input[name=sq_noindex]:checked").length?parseInt(a.find("input[name=sq_noindex]:checked").val()):1,sq_nofollow:0<a.find("input[name=sq_nofollow]:checked").length?parseInt(a.find("input[name=sq_nofollow]:checked").val()):1,sq_nositemap:0<a.find("input[name=sq_nositemap]:checked").length?parseInt(a.find("input[name=sq_nositemap]:checked").val()):1,sq_tw_title:0<b.sq_tw_title.length?a.escapeHtml(b.sq_tw_title.val()):"",
17
+ sq_tw_description:0<b.sq_tw_description.length?a.escapeHtml(b.sq_tw_description.val()):"",sq_tw_media:0<b.sq_tw_media.length?b.sq_tw_media.val():"",sq_tw_type:0<b.sq_tw_type.length?b.sq_tw_type.find("option:selected").val():"",sq_og_title:0<b.sq_og_title.length?a.escapeHtml(b.sq_og_title.val()):"",sq_og_description:0<b.sq_og_description.length?a.escapeHtml(b.sq_og_description.val()):"",sq_og_type:0<b.sq_og_type.length?b.sq_og_type.find("option:selected").val():"",sq_og_author:0<b.sq_og_author.length?
18
+ a.escapeHtml(b.sq_og_author.val()):"",sq_og_media:0<b.sq_og_media.length?b.sq_og_media.val():"",sq_jsonld_code_type:0<b.sq_jsonld_code_type.length?b.sq_jsonld_code_type.find("option:selected").val():"auto",sq_jsonld:0<b.sq_jsonld.length&&"custom"===b.sq_jsonld_code_type.find("option:selected").val()?b.sq_jsonld.val():"",sq_fpixel_code_type:0<b.sq_fpixel_code_type.length?b.sq_fpixel_code_type.find("option:selected").val():"auto",sq_fpixel:0<b.sq_fpixel.length&&"custom"===b.sq_fpixel_code_type.find("option:selected").val()?
19
+ b.sq_fpixel.val():"",sq_url:0<b.sq_url.length?a.escapeHtml(b.sq_url.val()):"",sq_hash:d.val(),post_id:b.sq_post_id,term_id:b.sq_term_id,taxonomy:b.sq_taxonomy,post_type:b.sq_post_type,sq_doseo:0<a.find("input[name=sq_doseo]:checked").length?parseInt(a.find("input[name=sq_doseo]:checked").val()):0,sq_nonce:sqQuery.nonce},function(){}).done(function(d){a.removeClass("sq_minloading");if("undefined"!==typeof d.saved){if("undefined"!==typeof d.html){var e=a.find(".sq-nav-item.active");a.html(d.html);a.sq_editSnippet({called:"ajax"});
20
+ a.find(e).trigger("click");a.trigger("sq_snippet_loaded");a.trigger("sq_snippet_saved");SQ_DEBUG&&console.log("sq_snippet_loaded");SQ_DEBUG&&console.log("sq_snippet_saved")}else c.sq_showError("Couldn't load the page. Please refresh.",0);"undefined"!==typeof d.error?c.sq_showError(d.error,2E3):c.sq_showSaved(b.__sq_save_message,2E3)}else c.sq_showError(b.__sq_error_message,2E3)}).fail(function(){a.removeClass("sq_minloading");c.sq_showError(b.__sq_error_message,2E3)}))};a.populateInputs=function(){var d=
21
+ c(document).find("head title").text();d||(d="");(d=a.find('meta[name="description"]').attr("content"))||(d="");0<a.find(".sq_title").length&&a.find(".sq_title").each(function(){c(this).sq_checkMax()});0<a.find(".sq_description").length&&a.find(".sq_description").each(function(){c(this).sq_checkMax()});0<a.find(".sq_tab_facebook").find(".sq_deactivated").length&&(a.find(".sq_tab_facebook").find(".sq_snippet_title").text(a.find(".sq_tab_meta").find(".sq_snippet_title").text()),a.find(".sq_tab_facebook").find(".sq_snippet_description").text(a.find(".sq_tab_meta").find(".sq_snippet_description").text()));
22
+ 0<a.find(".sq_tab_twitter").find(".sq_deactivated").length&&(a.find(".sq_tab_twitter").find(".sq_snippet_title").text(a.find(".sq_tab_meta").find(".sq_snippet_title").text()),a.find(".sq_tab_twitter").find(".sq_snippet_description").text(a.find(".sq_tab_meta").find(".sq_snippet_description").text()));b.sq_og_media_preview&&""!==b.sq_og_media.val()&&(b.sq_og_media_preview.attr("src",b.sq_og_media.val()),b.og_image_close.show());b.og_image_close.on("click",function(){b.sq_og_media_preview.attr("src",
23
+ "");b.sq_og_media.val("");c(this).hide()});b.sq_tw_media_preview&&""!==b.sq_tw_media.val()&&(b.sq_tw_media_preview.attr("src",b.sq_tw_media.val()),b.tw_image_close.show());b.tw_image_close.on("click",function(){b.sq_tw_media_preview.attr("src","");b.sq_tw_media.val("");c(this).hide()});b.refreshButton.on("click",function(){a.sq_loadSnippet()});a.keywordsListen();b.editButton.on("click",function(){b.previewTab.hide();b.editTab.show();b.cancelButton.on("click",function(){b.previewTab.show();b.editTab.hide()});
24
+ c.isFunction(c.fn.sq_patterns)&&a.find(".sq_pattern_field").each(function(){c(this).sq_patterns().init()})})};a.mediaListen=function(){a.find(".sq_get_og_media, .sq_get_tw_media").click(function(a){a.preventDefault();var d=c(this).parents(".sq-row:last").find(".sq_og_media_preview"),e=c(this).parents(".sq-row:last").find(".sq_og_image_close"),g=c(this).parents(".sq-row:last").find(".sq_tw_media_preview"),l=c(this).parents(".sq-row:last").find(".sq_tw_image_close");k&&k.open();var k=wp.media({title:"Select Media",
25
+ multiple:!1,library:{type:"image"}});k.on("close",function(){var a=null,c=0;k.state().get("selection").each(function(b){a=b.attributes.url;c++});0<d.length&&null!==a&&(b.sq_og_media.val(a),d.attr("src",a),e.show());0<g.length&&null!==a&&(b.sq_tw_media.val(a),g.attr("src",a),l.show())});k.on("open",function(){k.state().get("selection")});k.open()})};a.dropDownListen=function(){var a,d,f;b.sq_toggle.on("click",function(){f=c(this);f.css("height","auto");d=f.parents(".sq-input-group:last").find(".sq-actions");
26
+ if("small"==d.data("position"))d.css("top","35px"),d.css("height","36px");else{var b=f.height()+20;d.css("top",b+"px")}a=d.find(".sq-action");d.show();a.on("click",function(){var a=c(this).find(".sq-value");"undefined"!==typeof a&&""!==a&&(f.val(a.data("value")),f.trigger("change"),f.sq_checkMax())});f.on("keyup",function(){c(this).parents(".sq-input-group:last").find(".sq-actions").hide()});f.sq_bodyClick("click",function(){c(this).parents(".sq-input-group:last").find(".sq-actions").hide()})});b.sq_jsonld_code_type.on("change",
27
+ function(){"custom"===b.sq_jsonld_code_type.find("option:selected").val()?b.sq_jsonld_custom_code.show():b.sq_jsonld_custom_code.hide()});b.sq_fpixel_code_type.on("change",function(){"custom"===b.sq_fpixel_code_type.find("option:selected").val()?b.sq_fpixel_custom_code.show():b.sq_fpixel_custom_code.hide()})};a.keywordsListen=function(){b.sq_keywords.sqtagsinput("items")};a.escapeHtml=function(a){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return a.toString().replace(/[&<>"']/g,
28
+ function(a){return b[a]})};a.preventLeave=function(a){if(0==c("form#post").length)if(a)c(window).on("beforeunload",function(){return confirm("You have unsave changes in Squirrly Snippet. Are you sure you want to proceed?")});else c(window).off("beforeunload")};a.initNav();a.listenDoSeo();a.mediaListen();a.tabsListen();a.populateInputs();a.dropDownListen();a.find('input[type="text"], textarea').on("keyup paste",function(){a.preventLeave(!0);c(this).sq_checkMax()});b.saveButton.on("click",function(b){b.preventDefault();
29
+ SQ_DEBUG&&console.log("save");a.preventLeave(!1);a.saveSEO()});if("undefined"!==typeof c.sq_blockseo)c.sq_blockseo.on("sq_seo_refresh",function(){b.refreshButton.trigger("click")});c(document).on("after-autosave.update-post-slug",function(b,c){a.preventLeave(!1)});0<a.find(".sq_save_ajax").length&&(a.find(".sq_save_ajax").find("input").on("change",function(){c(this).sq_ajaxSnippetListen()}),a.find(".sq_save_ajax").find("button").on("click",function(){c(this).sq_ajaxSnippetListen()}));return a};c.fn.sq_checkMax=
30
+ function(){var d=c(this),a=d.parents(".sq-input-group:last"),b=0,e=300,h;if(!(0< !d.length)){var f=d.is("input, textarea")?h=d.val():h=d.html();var g=f.length;a.find(".sq_length").length&&(e=parseInt(a.find(".sq_length").data("maxlength")));if(a.hasClass("sq_pattern_field")){var l=a.find(".sq_pattern_list");var k=f.split(" ");if(0<k.length){for(g=0;g<k.length;g++)l.find('li[data-pattern="'+k[g].replace(/"/g,"")+'"]').length&&(f=f.replace(k[g],""),f=f.replace(" "," "),f=f.trim(),l.find('li[data-pattern="'+
31
+ k[g].replace(/"/g,"")+'"]').data("value")&&(b+=l.find('li[data-pattern="'+k[g].replace(/"/g,"")+'"]').data("value").length),h=h.replace(new RegExp(k[g],"g"),l.find('li[data-pattern="'+k[g].replace(/"/g,"")+'"]').data("value")));g=f.length+b}}d.attr("title",h);a.find(".sq_length").text(g+"/"+e);0===g||g>e?d.attr("style","border: solid 1px red !important"):d.attr("style","border: none !important")}};c.fn.sq_bodyClick=function(d,a){return this.each(function(){var b=c(this),e=this;c(document).on(d,function f(b){b.target===
32
+ e||c.contains(e,b.target)||(a.apply(e,[b]),c(document).off(d,f))});b.on("keydown blur",function g(c){9===c.which&&(a.apply(e,[c]),b.off("keydown",g))})})};c.fn.toggleSwitch=function(d){var a=c(this);(a.prop("checked")&&0==d||!a.prop("checked")&&1==d)&&a.trigger("click")};c.fn.sq_getSnippet=function(d,a,b,e){var h=this;h.addClass("sq_minloading");c.post(sqQuery.ajaxurl,{action:"sq_getsnippet",post_id:d,term_id:a,taxonomy:b,post_type:e,sq_nonce:sqQuery.nonce}).done(function(a){"undefined"!==typeof a?
33
+ ("undefined"!==typeof a.html?(c("div.tooltip").hide(),h.html(a.html),h.sq_editSnippet(),h.trigger("sq_snippet_loaded"),SQ_DEBUG&&console.log("sq_snippet_loaded")):c("#sq_blocksnippet").trigger("error.refresh"),"undefined"!==typeof a.error&&c.sq_showError(a.error,1E4)):(c("#sq_blocksnippet").trigger("error.refresh"),SQ_DEBUG&&console.log("no data received"));h.removeClass("sq_minloading")}).fail(function(){SQ_DEBUG&&console.log("no data received");c("#sq_blocksnippet").trigger("error.refresh");h.removeClass("sq_minloading")})};
34
+ c.fn.sq_previewSnippet=function(d,a){var b=this;"undefined"===typeof d&&(d="");"undefined"===typeof a&&(a="");b.find(".sq_snippet_ul").addClass("sq_minloading");b.find(".sq_snippet_title").html("");b.find(".sq_snippet_url").html("");b.find(".sq_snippet_description").html("");b.find(".sq_snippet_keywords").hide();b.find(".sq_snippet").show();b.find(".sq_snippet_update").hide();b.find(".sq_snippet_customize").hide();b.find(".ogimage_preview").hide();setTimeout(function(){c.post(sqQuery.ajaxurl,{action:"sq_previewsnippet",
35
+ url:d,sq_nonce:sqQuery.nonce}).done(function(c){b.find(".sq_snippet_ul").removeClass("sq_minloading");b.find(".sq_snippet_update").show();b.find(".sq_snippet_customize").show();b.find(".sq_snippet_keywords").show();b.find(".ogimage_preview").show();c&&(b.find(".sq_snippet_title").html(c.title),""!==a?b.find(".sq_snippet_url").html('<a href="'+d+'" target="_blank">'+a+"</a>"):b.find(".sq_snippet_url").html(c.url),b.find(".sq_snippet_description").html(c.description))}).fail(function(){b.find(".sq_snippet_ul").removeClass("sq_minloading");
36
+ b.find(".sq_snippet_update").show()},"json")},500)};c.fn.sq_ajaxSnippetListen=function(){var d=this,a=c("#"+d.data("input")),b=d.data("confirm"),e=d.data("action"),h=d.data("name"),f=0;a.length||(a=d);if("undefined"===typeof b||confirm(b))a.is("checkbox")&&a.is(":checked")?f=a.val():a.is("select")?f=a.find("option:selected").val():a.is("input")&&(f=a.val()),d.addClass("sq_minloading"),""!==e&&""!==f&&c.post(sqQuery.ajaxurl,{action:e,input:h,value:f,sq_nonce:sqQuery.nonce}).done(function(a){"undefined"!==
37
+ typeof a.data?(""===a.data?c("#wpbody-content").prepend("Saved"):c("#wpbody-content").prepend(a.data),setTimeout(function(){d.removeClass("sq_minloading");var a=d.closest("div.sq_save_ajax").parent("div");0<a.length?(a.find(".sq_deactivated_label").remove(),a.find(".sq_deactivated").removeClass("sq_deactivated")):location.reload()},1E3)):"undefined"!==typeof a.error&&(c("body").prepend(a.error),d.removeClass("sq_minloading"))}).fail(function(){d.removeClass("sq_minloading");location.reload()},"json")};
38
+ c.sq_isGutenberg||(c.sq_isGutenberg=function(d){return"undefined"!==typeof window.wp&&"undefined"!==typeof wp.data&&"undefined"!==typeof wp.data.select("core/editor")&&c.isFunction(wp.data.select("core/editor").getEditedPostAttribute)});c(document).ready(function(){var d=c("#wp-admin-bar-sq_bar_menu"),a=!1,b="metas";0<d.length&&(d.find('#sq_blocksnippet[data-snippet="topmenu"]').length?(a=d.find("#sq_blocksnippet"),a.sq_loadSnippet()):c('#sq_blocksnippet[data-snippet!="topmenu"]').length&&(a=c("#sq_blocksnippet"),
39
+ d.find("#wp-admin-bar-sq_bar_submenu").remove(),d.find(".ab-item").on("click",function(){0<c(".edit-post-layout__content").length?c(".edit-post-layout__content").scrollTop(c(".edit-post-layout__content").scrollTop()+a.offset().top-100):c("html,body").scrollTop(a.offset().top-50)}),a.addClass("sq_blocksnippet").addClass("sq-shadow-sm").addClass("sq-border-bottom"),a.find(".inside").show().sq_loadSnippet()),a&&(a.on("sq_snippet_loaded",function(){$snippet=c(this);$snippet.find(".sq-nav-item.sq-nav-link").on("click",
40
+ function(){b=c(this).data("category")});$snippet.find(".sq-nav-item").removeClass("active");$snippet.find(".sq-tab-pane").removeClass("active");var a=$snippet.find(".sq_snippet_menu").find("#sq-nav-item_"+b);a.addClass("active");$snippet.find(a.attr("href")).addClass("active")}),a.on("error.refresh",function(){c.sq_showError("Couldn't load the page. <span class='sq_snippet_refresh' style='color: #0F75BC; cursor:pointer;'>Please refresh</span>.",0);c(".sq_snippet_refresh").on("click",function(){a.sq_loadSnippet()})})))})})(jQuery);