SEO SQUIRRLY™ - Version 5.2.8

Version Description

  • Fixed the compatibility issue in Performance Analytics
  • Added twitter summary for large images
  • Compatible with WP 4.4
Download this release

Release Info

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

Code changes from version 5.1.2 to 5.2.8

classes/SQ_HookController.php CHANGED
@@ -19,7 +19,6 @@ class SQ_HookController {
19
  'frontinit' => 'init',
20
  'fronthead' => 'wp_head',
21
  'frontfooter' => 'wp_footer',
22
- 'frontcontent' => 'the_content',
23
  );
24
  $this->block_hooks = array('getContent' => 'getContent');
25
  }
19
  'frontinit' => 'init',
20
  'fronthead' => 'wp_head',
21
  'frontfooter' => 'wp_footer',
 
22
  );
23
  $this->block_hooks = array('getContent' => 'getContent');
24
  }
classes/SQ_Ranking.php CHANGED
@@ -120,8 +120,53 @@ class SQ_Ranking extends SQ_FrontController {
120
  return false;
121
  }
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  //Grab the remote informations from google
124
- $response = utf8_decode(SQ_Tools::sq_remote_get("https://www.google.$country/search", $arg));
125
 
126
  //Check the values for block IP
127
  if (strpos($response, "</h3>") === false) {
@@ -191,7 +236,7 @@ class SQ_Ranking extends SQ_FrontController {
191
  $rank = $this->processRanking($row->post_id, $json->keyword);
192
  if ($rank == -1) {
193
  $count++;
194
- sleep(mt_rand(20, 50));
195
  //if not indexed with the keyword then find the url
196
  if ($this->processRanking($row->post_id, get_permalink($row->post_id)) > 0) {
197
  $rank = 0; //for permalink index set 0
@@ -218,7 +263,7 @@ class SQ_Ranking extends SQ_FrontController {
218
  SQ_Action::apiCall('sq/user-analytics/saveserp', $args);
219
 
220
  $count++;
221
- sleep(mt_rand(20, 50));
222
  }
223
  }
224
  }
@@ -257,5 +302,3 @@ class SQ_Ranking extends SQ_FrontController {
257
  }
258
 
259
  }
260
-
261
- ?>
120
  return false;
121
  }
122
 
123
+ $user_agents = array(
124
+ 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
125
+ 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0',
126
+ 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',
127
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3',
128
+ 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
129
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
130
+ 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36',
131
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',
132
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12',
133
+ 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',
134
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0',
135
+ 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko ) Version/5.1 Mobile/9B176 Safari/7534.48.3',
136
+ 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1',
137
+ 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; da-dk) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1',
138
+ 'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27',
139
+ 'Mozilla/5.0 (Windows; U; Windows NT 6.1; fr-FR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27',
140
+ 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27',
141
+ 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27',
142
+ 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4',
143
+ 'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16',
144
+ 'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14',
145
+ 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14',
146
+ 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14',
147
+ 'Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02',
148
+ 'Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00',
149
+ 'Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168 Version/12.00',
150
+ 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0',
151
+ 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko',
152
+ 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0',
153
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
154
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36',
155
+ 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
156
+ 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
157
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36',
158
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
159
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0',
160
+ 'Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko',
161
+ 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
162
+ 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',
163
+ );
164
+
165
+ $option = array();
166
+ $option['User-Agent'] = $user_agents[mt_rand(0, count($user_agents) - 1)];
167
+ $option['followlocation'] = true;
168
  //Grab the remote informations from google
169
+ $response = utf8_decode(SQ_Tools::sq_remote_get("https://www.google.$country/search", $arg, $option));
170
 
171
  //Check the values for block IP
172
  if (strpos($response, "</h3>") === false) {
236
  $rank = $this->processRanking($row->post_id, $json->keyword);
237
  if ($rank == -1) {
238
  $count++;
239
+ sleep(mt_rand(20, 40));
240
  //if not indexed with the keyword then find the url
241
  if ($this->processRanking($row->post_id, get_permalink($row->post_id)) > 0) {
242
  $rank = 0; //for permalink index set 0
263
  SQ_Action::apiCall('sq/user-analytics/saveserp', $args);
264
 
265
  $count++;
266
+ sleep(mt_rand(20, 40));
267
  }
268
  }
269
  }
302
  }
303
 
304
  }
 
 
classes/SQ_Tools.php CHANGED
@@ -99,13 +99,13 @@ class SQ_Tools extends SQ_FrontController {
99
  'sq_sitemap_ping' => 1,
100
  'sq_sitemap_show' => array(
101
  'images' => 1,
102
- 'videos' => 1,
103
  ),
104
  'sq_sitemap_frequency' => 'weekly',
105
  'sq_sitemap' => array(
106
  'sitemap' => array('sitemap.xml', 1),
107
  'sitemap-home' => array('sitemap-home.xml', 1),
108
- 'sitemap-news' => array('sitemap-news.xml', 1),
109
  'sitemap-product' => array('sitemap-product.xml', 1),
110
  'sitemap-post' => array('sitemap-posts.xml', 1),
111
  'sitemap-page' => array('sitemap-pages.xml', 1),
@@ -131,6 +131,7 @@ class SQ_Tools extends SQ_FrontController {
131
  'favicon' => '',
132
  'sq_auto_twitter' => 0,
133
  'sq_auto_facebook' => 0,
 
134
  'sq_twitter_account' => '',
135
  'sq_facebook_account' => '',
136
  'sq_google_plus' => '',
@@ -154,6 +155,7 @@ class SQ_Tools extends SQ_FrontController {
154
  'ignore_warn' => 0,
155
  'sq_keyword_help' => 1,
156
  'sq_keyword_information' => 0,
 
157
  //
158
  'sq_google_country' => 'com',
159
  'sq_google_language' => 'en',
@@ -179,6 +181,13 @@ class SQ_Tools extends SQ_FrontController {
179
  }
180
 
181
  public static function getBriefOptions() {
 
 
 
 
 
 
 
182
  return array(
183
  'sq_version' => SQ_VERSION_ID,
184
  'sq_use' => SQ_Tools::$options['sq_use'],
@@ -194,8 +203,8 @@ class SQ_Tools extends SQ_FrontController {
194
  'sq_auto_twitter' => SQ_Tools::$options['sq_auto_twitter'],
195
  'sq_auto_facebook' => SQ_Tools::$options['sq_auto_facebook'],
196
  'sq_auto_seo' => SQ_Tools::$options['sq_auto_seo'],
197
- 'sq_auto_title' => (int) (SQ_Tools::$options['sq_auto_title'] == 1 && SQ_Tools::$options['sq_fp_title'] <> ''),
198
- 'sq_auto_description' => (int) (SQ_Tools::$options['sq_auto_description'] == 1 && SQ_Tools::$options['sq_fp_description'] <> ''),
199
  'sq_google_plus' => (int) (SQ_Tools::$options['sq_google_plus'] <> ''),
200
  'sq_google_wt' => (int) (SQ_Tools::$options['sq_google_wt'] <> ''),
201
  'sq_google_analytics' => (int) (SQ_Tools::$options['sq_google_analytics'] <> ''),
@@ -329,7 +338,7 @@ class SQ_Tools extends SQ_FrontController {
329
  //send the cookie for preview
330
  if ($url_domain == $_SERVER['HTTP_HOST'] && strpos($url, 'preview=true') !== false) {
331
  foreach ($_COOKIE as $name => $value) {
332
- if (strpos($name, 'wordpress') !== false || strpos($name, 'wpta') !== false) {
333
  $cookies[] = new WP_Http_Cookie(array('name' => $name, 'value' => $value));
334
  $cookie_string .= "$name=$value;";
335
  }
@@ -339,8 +348,6 @@ class SQ_Tools extends SQ_FrontController {
339
  $options['timeout'] = (isset($options['timeout'])) ? $options['timeout'] : 30;
340
  if (!isset($options['cookie_string'])) {
341
  $options['cookies'] = $cookies;
342
- }
343
- if (!isset($options['cookie_string'])) {
344
  $options['cookie_string'] = $cookie_string;
345
  }
346
  $options['sslverify'] = false;
@@ -379,13 +386,17 @@ class SQ_Tools extends SQ_FrontController {
379
  curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
380
  }
381
 
382
- if ($options['cookie_string'] <> '')
383
  curl_setopt($ch, CURLOPT_COOKIE, $options['cookie_string']);
 
384
 
 
 
 
385
  $response = curl_exec($ch);
386
  $response = self::cleanResponce($response);
387
 
388
- self::dump('CURL', $url, $options, $response); //output debug
389
 
390
  if (curl_errno($ch) == 1 || $response === false) { //if protocol not supported
391
  if (curl_errno($ch)) {
@@ -874,7 +885,16 @@ class SQ_Tools extends SQ_FrontController {
874
  * Show the debug dump
875
  */
876
  public static function showDebug() {
877
- echo "Debug result: <br />" . @implode('<br />', self::$debug);
 
 
 
 
 
 
 
 
 
878
  }
879
 
880
  public function sq_activate() {
99
  'sq_sitemap_ping' => 1,
100
  'sq_sitemap_show' => array(
101
  'images' => 1,
102
+ 'videos' => 0,
103
  ),
104
  'sq_sitemap_frequency' => 'weekly',
105
  'sq_sitemap' => array(
106
  'sitemap' => array('sitemap.xml', 1),
107
  'sitemap-home' => array('sitemap-home.xml', 1),
108
+ 'sitemap-news' => array('sitemap-news.xml', 0),
109
  'sitemap-product' => array('sitemap-product.xml', 1),
110
  'sitemap-post' => array('sitemap-posts.xml', 1),
111
  'sitemap-page' => array('sitemap-pages.xml', 1),
131
  'favicon' => '',
132
  'sq_auto_twitter' => 0,
133
  'sq_auto_facebook' => 0,
134
+ 'sq_og_locale' => 'en_US',
135
  'sq_twitter_account' => '',
136
  'sq_facebook_account' => '',
137
  'sq_google_plus' => '',
155
  'ignore_warn' => 0,
156
  'sq_keyword_help' => 1,
157
  'sq_keyword_information' => 0,
158
+ 'sq_url_fix' => 1,
159
  //
160
  'sq_google_country' => 'com',
161
  'sq_google_language' => 'en',
181
  }
182
 
183
  public static function getBriefOptions() {
184
+ if ($pageId = get_option('page_on_front')) {
185
+ $title = SQ_ObjController::getModel('SQ_Frontend')->getAdvancedMeta($pageId, 'title');
186
+ $description = SQ_ObjController::getModel('SQ_Frontend')->getAdvancedMeta($pageId, 'description');
187
+ } else {
188
+ $title = SQ_Tools::$options['sq_fp_title'];
189
+ $description = SQ_Tools::$options['sq_fp_description'];
190
+ }
191
  return array(
192
  'sq_version' => SQ_VERSION_ID,
193
  'sq_use' => SQ_Tools::$options['sq_use'],
203
  'sq_auto_twitter' => SQ_Tools::$options['sq_auto_twitter'],
204
  'sq_auto_facebook' => SQ_Tools::$options['sq_auto_facebook'],
205
  'sq_auto_seo' => SQ_Tools::$options['sq_auto_seo'],
206
+ 'sq_auto_title' => (int) (SQ_Tools::$options['sq_auto_title'] == 1 && $title <> ''),
207
+ 'sq_auto_description' => (int) (SQ_Tools::$options['sq_auto_description'] == 1 && $description <> ''),
208
  'sq_google_plus' => (int) (SQ_Tools::$options['sq_google_plus'] <> ''),
209
  'sq_google_wt' => (int) (SQ_Tools::$options['sq_google_wt'] <> ''),
210
  'sq_google_analytics' => (int) (SQ_Tools::$options['sq_google_analytics'] <> ''),
338
  //send the cookie for preview
339
  if ($url_domain == $_SERVER['HTTP_HOST'] && strpos($url, 'preview=true') !== false) {
340
  foreach ($_COOKIE as $name => $value) {
341
+ if (strpos($name, 'wordpress') !== false || strpos($name, 'wp') !== false || strpos($name, 'slimstat') !== false || strpos($name, 'sforum') !== false) {
342
  $cookies[] = new WP_Http_Cookie(array('name' => $name, 'value' => $value));
343
  $cookie_string .= "$name=$value;";
344
  }
348
  $options['timeout'] = (isset($options['timeout'])) ? $options['timeout'] : 30;
349
  if (!isset($options['cookie_string'])) {
350
  $options['cookies'] = $cookies;
 
 
351
  $options['cookie_string'] = $cookie_string;
352
  }
353
  $options['sslverify'] = false;
386
  curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
387
  }
388
 
389
+ if ($options['cookie_string'] <> '') {
390
  curl_setopt($ch, CURLOPT_COOKIE, $options['cookie_string']);
391
+ }
392
 
393
+ if (isset($options['User-Agent']) && $options['User-Agent'] <> '') {
394
+ curl_setopt($ch, CURLOPT_USERAGENT, $options['User-Agent']);
395
+ }
396
  $response = curl_exec($ch);
397
  $response = self::cleanResponce($response);
398
 
399
+ self::dump('CURL', $url, $options, $ch, $response); //output debug
400
 
401
  if (curl_errno($ch) == 1 || $response === false) { //if protocol not supported
402
  if (curl_errno($ch)) {
885
  * Show the debug dump
886
  */
887
  public static function showDebug() {
888
+ echo "Debug result: <br />" . '<div id="wpcontent">' . @implode('<br />', self::$debug) . '</div>';
889
+
890
+ $run_time = number_format(microtime(true) - REQUEST_TIME, 3);
891
+ $pps = number_format(1 / $run_time, 0);
892
+ $memory_avail = ini_get('memory_limit');
893
+ $memory_used = number_format(memory_get_usage(true) / ( 1024 * 1024 ), 2);
894
+ $memory_peak = number_format(memory_get_peak_usage(true) / ( 1024 * 1024 ), 2);
895
+
896
+ echo PHP_EOL . " Load: {$memory_avail} (avail) / {$memory_used}M (used) / {$memory_peak}M (peak)";
897
+ echo " | Time: {$run_time}s | {$pps} req/sec";
898
  }
899
 
900
  public function sq_activate() {
classes/SQ_Traffic.php CHANGED
@@ -6,5 +6,3 @@
6
  class SQ_Traffic extends SQ_FrontController {
7
 
8
  }
9
-
10
- ?>
6
  class SQ_Traffic extends SQ_FrontController {
7
 
8
  }
 
 
config/paths.php CHANGED
@@ -7,7 +7,7 @@ define('_SQ_PLUGIN_NAME_', 'squirrly-seo'); //THIS LINE WILL BE CHANGED WITH THE
7
  define('_THEME_NAME_', 'default'); //THIS LINE WILL BE CHANGED WITH THE USER SETTINGS
8
 
9
  define('_SQ_DASH_URL_', 'https://my.squirrly.co/');
10
- $scheme = ((strpos(get_bloginfo('wpurl'), 'https') !== false || (defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN)) ? 'https:' : 'http:'); //CHECK IF SCURE
11
 
12
  defined('SQ_URI') || define('SQ_URI', (WP_VERSION_ID >= 3000) ? 'wp350' : 'wp2');
13
  defined('_SQ_API_URL_') || define('_SQ_API_URL_', $scheme . '//api.squirrly.co/');
7
  define('_THEME_NAME_', 'default'); //THIS LINE WILL BE CHANGED WITH THE USER SETTINGS
8
 
9
  define('_SQ_DASH_URL_', 'https://my.squirrly.co/');
10
+ $scheme = (((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") || (defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN)) ? 'https:' : 'http:'); //CHECK IF SCURE
11
 
12
  defined('SQ_URI') || define('SQ_URI', (WP_VERSION_ID >= 3000) ? 'wp350' : 'wp2');
13
  defined('_SQ_API_URL_') || define('_SQ_API_URL_', $scheme . '//api.squirrly.co/');
controllers/SQ_Frontend.php CHANGED
@@ -12,15 +12,23 @@ class SQ_Frontend extends SQ_FrontController {
12
  parent::__construct();
13
  SQ_ObjController::getController('SQ_Tools', false);
14
 
15
- /* Check if sitemap is on */
16
- if (SQ_Tools::$options['sq_use'] == 1 && SQ_Tools::$options['sq_auto_sitemap'] == 1) {
17
- /* Load the Sitemap */
18
- SQ_ObjController::getController('SQ_Sitemaps');
19
- }
20
 
21
- //validate custom arguments for favicon and sitemap
22
- add_filter('query_vars', array($this, 'validateParams'), 1, 1);
23
- add_action('template_redirect', array($this, 'startBuffer'), 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
 
26
  private function _isAjax() {
@@ -47,12 +55,6 @@ class SQ_Frontend extends SQ_FrontController {
47
  * Called after plugins are loaded
48
  */
49
  public function hookPreload() {
50
- if (SQ_Tools::getValue('sq_use') == 'on') {
51
- SQ_Tools::$options['sq_use'] = 1;
52
- } elseif (SQ_Tools::getValue('sq_use') == 'off') {
53
- SQ_Tools::$options['sq_use'] = 0;
54
- }
55
-
56
  //Check for sitemap and robots
57
  if (SQ_Tools::$options['sq_use'] == 1) {
58
  if (isset($_SERVER['REQUEST_URI']) && SQ_Tools::$options['sq_auto_robots'] == 1) {
@@ -60,9 +62,10 @@ class SQ_Frontend extends SQ_FrontController {
60
  $this->model->robots();
61
  }
62
  }
 
 
 
63
  }
64
- //check the action call
65
- $this->action();
66
  }
67
 
68
  /**
@@ -74,10 +77,9 @@ class SQ_Frontend extends SQ_FrontController {
74
 
75
  echo $this->model->setStart();
76
 
77
- if (isset(SQ_Tools::$options['sq_use']) && (int) SQ_Tools::$options['sq_use'] == 1) {
78
  //flush the header with the title and removing duplicates
79
  $this->model->flushHeader();
80
-
81
  //show the Squirrly header
82
  echo $this->model->setHeader();
83
  }
@@ -89,9 +91,8 @@ class SQ_Frontend extends SQ_FrontController {
89
  /**
90
  * Change the image path to absolute when in feed
91
  */
92
- public function hookFrontcontent($content) {
93
-
94
- if (is_feed() && SQ_Tools::$options['sq_local_images'] == 1) {
95
  $find = $replace = $urls = array();
96
 
97
  @preg_match_all('/<img[^>]*src=[\'"]([^\'"]+)[\'"][^>]*>/i', $content, $out);
@@ -155,7 +156,7 @@ class SQ_Frontend extends SQ_FrontController {
155
  if (SQ_Tools::$options['favicon'] <> '') {
156
  //show the favico file
157
  SQ_Tools::setHeader('ico');
158
- echo readfile(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon']);
159
  exit();
160
  }
161
  break;
@@ -165,9 +166,9 @@ class SQ_Frontend extends SQ_FrontController {
165
  //show the favico file
166
  SQ_Tools::setHeader('png');
167
  if ($size <> '') {
168
- echo readfile(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon'] . get_query_var('sq_size'));
169
  } else {
170
- echo readfile(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon']);
171
  }
172
  exit();
173
  }
12
  parent::__construct();
13
  SQ_ObjController::getController('SQ_Tools', false);
14
 
 
 
 
 
 
15
 
16
+ if (SQ_Tools::$options['sq_use'] == 1) {
17
+ /* Check if sitemap is on */
18
+ if (SQ_Tools::$options['sq_auto_sitemap'] == 1) {
19
+ /* Load the Sitemap */
20
+ SQ_ObjController::getController('SQ_Sitemaps');
21
+ }
22
+
23
+ //validate custom arguments for favicon and sitemap
24
+ add_filter('query_vars', array($this, 'validateParams'), 1, 1);
25
+ add_action('template_redirect', array($this, 'startBuffer'), 10);
26
+
27
+
28
+ if (SQ_Tools::$options['sq_url_fix'] == 1) {
29
+ add_action('the_content', array($this, 'fixFeedLinks'), 11);
30
+ }
31
+ }
32
  }
33
 
34
  private function _isAjax() {
55
  * Called after plugins are loaded
56
  */
57
  public function hookPreload() {
 
 
 
 
 
 
58
  //Check for sitemap and robots
59
  if (SQ_Tools::$options['sq_use'] == 1) {
60
  if (isset($_SERVER['REQUEST_URI']) && SQ_Tools::$options['sq_auto_robots'] == 1) {
62
  $this->model->robots();
63
  }
64
  }
65
+
66
+ //check the action call
67
+ $this->action();
68
  }
 
 
69
  }
70
 
71
  /**
77
 
78
  echo $this->model->setStart();
79
 
80
+ if (SQ_Tools::$options['sq_use'] == 1) {
81
  //flush the header with the title and removing duplicates
82
  $this->model->flushHeader();
 
83
  //show the Squirrly header
84
  echo $this->model->setHeader();
85
  }
91
  /**
92
  * Change the image path to absolute when in feed
93
  */
94
+ public function fixFeedLinks($content) {
95
+ if (is_feed()) {
 
96
  $find = $replace = $urls = array();
97
 
98
  @preg_match_all('/<img[^>]*src=[\'"]([^\'"]+)[\'"][^>]*>/i', $content, $out);
156
  if (SQ_Tools::$options['favicon'] <> '') {
157
  //show the favico file
158
  SQ_Tools::setHeader('ico');
159
+ readfile(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon']);
160
  exit();
161
  }
162
  break;
166
  //show the favico file
167
  SQ_Tools::setHeader('png');
168
  if ($size <> '') {
169
+ readfile(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon'] . get_query_var('sq_size'));
170
  } else {
171
+ readfile(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon']);
172
  }
173
  exit();
174
  }
controllers/SQ_Menu.php CHANGED
@@ -11,6 +11,7 @@ class SQ_Menu extends SQ_FrontController {
11
  public function __construct() {
12
  parent::__construct();
13
  add_filter('rewrite_rules_array', array(SQ_ObjController::getBlock('SQ_BlockSettingsSeo'), 'rewrite_rules'), 999, 1);
 
14
  }
15
 
16
  /**
@@ -46,6 +47,20 @@ class SQ_Menu extends SQ_FrontController {
46
  }
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  /**
50
  * Creates the Setting menu in Wordpress
51
  */
@@ -105,6 +120,7 @@ class SQ_Menu extends SQ_FrontController {
105
  ));
106
 
107
 
 
108
  $this->model->addSubmenu(array('sq_dashboard',
109
  ucfirst(_SQ_NAME_) . __(' settings', _SQ_PLUGIN_NAME_),
110
  __('SEO', _SQ_PLUGIN_NAME_) . SQ_Tools::showNotices(SQ_Tools::$errors_count, 'errors_count'),
11
  public function __construct() {
12
  parent::__construct();
13
  add_filter('rewrite_rules_array', array(SQ_ObjController::getBlock('SQ_BlockSettingsSeo'), 'rewrite_rules'), 999, 1);
14
+ add_action('admin_bar_menu', array($this, 'hookTopmenu'), 999);
15
  }
16
 
17
  /**
47
  }
48
  }
49
 
50
+ /**
51
+ * Add a menu in Admin Bar
52
+ *
53
+ * @param WP_Admin_Bar $wp_admin_bar
54
+ */
55
+ public function hookTopmenu($wp_admin_bar) {
56
+ $wp_admin_bar->add_node(array(
57
+ 'id' => 'sq_posts',
58
+ 'title' => __('See Your Rank on Google', _SQ_PLUGIN_NAME_),
59
+ 'href' => admin_url('admin.php?page=sq_posts'),
60
+ 'parent' => false
61
+ ));
62
+ }
63
+
64
  /**
65
  * Creates the Setting menu in Wordpress
66
  */
120
  ));
121
 
122
 
123
+
124
  $this->model->addSubmenu(array('sq_dashboard',
125
  ucfirst(_SQ_NAME_) . __(' settings', _SQ_PLUGIN_NAME_),
126
  __('SEO', _SQ_PLUGIN_NAME_) . SQ_Tools::showNotices(SQ_Tools::$errors_count, 'errors_count'),
controllers/SQ_Post.php CHANGED
@@ -207,7 +207,8 @@ class SQ_Post extends SQ_FrontController {
207
  $process[] = $args;
208
  //save for later send to api
209
  set_transient('sq_seopost', json_encode($process));
210
- wp_schedule_single_event(time() + 60, 'sq_processApi');
 
211
  //Save the keyword for this post
212
  if ($json = $this->model->getKeyword($post_id)) {
213
  $json->keyword = addslashes(SQ_Tools::getValue('sq_keyword'));
@@ -287,7 +288,7 @@ class SQ_Post extends SQ_FrontController {
287
  private function _checkAdvMeta($post_id) {
288
 
289
  $meta = array();
290
- if (SQ_Tools::getIsset('sq_fp_title') || SQ_Tools::getIsset('sq_fp_description') || SQ_Tools::getIsset('sq_fp_keywords')) {
291
  if (SQ_Tools::getIsset('sq_fp_title'))
292
  $meta[] = array('key' => '_sq_fp_title',
293
  'value' => SQ_Tools::getValue('sq_fp_title'));
@@ -304,6 +305,10 @@ class SQ_Post extends SQ_FrontController {
304
  $meta[] = array('key' => '_sq_fp_ogimage',
305
  'value' => SQ_Tools::getValue('sq_fp_ogimage'));
306
 
 
 
 
 
307
 
308
  $this->model->saveAdvMeta($post_id, $meta);
309
 
@@ -313,7 +318,12 @@ class SQ_Post extends SQ_FrontController {
313
  }
314
 
315
  public function hookFooter() {
316
- $this->processCron();
 
 
 
 
 
317
  }
318
 
319
  public function processCron() {
207
  $process[] = $args;
208
  //save for later send to api
209
  set_transient('sq_seopost', json_encode($process));
210
+ wp_schedule_single_event(time(), 'sq_processApi');
211
+
212
  //Save the keyword for this post
213
  if ($json = $this->model->getKeyword($post_id)) {
214
  $json->keyword = addslashes(SQ_Tools::getValue('sq_keyword'));
288
  private function _checkAdvMeta($post_id) {
289
 
290
  $meta = array();
291
+ if (SQ_Tools::getIsset('sq_canonical') || SQ_Tools::getIsset('sq_fp_title') || SQ_Tools::getIsset('sq_fp_description') || SQ_Tools::getIsset('sq_fp_keywords')) {
292
  if (SQ_Tools::getIsset('sq_fp_title'))
293
  $meta[] = array('key' => '_sq_fp_title',
294
  'value' => SQ_Tools::getValue('sq_fp_title'));
305
  $meta[] = array('key' => '_sq_fp_ogimage',
306
  'value' => SQ_Tools::getValue('sq_fp_ogimage'));
307
 
308
+ if (SQ_Tools::getIsset('sq_canonical'))
309
+ $meta[] = array('key' => '_sq_canonical',
310
+ 'value' => SQ_Tools::getValue('sq_canonical'));
311
+
312
 
313
  $this->model->saveAdvMeta($post_id, $meta);
314
 
318
  }
319
 
320
  public function hookFooter() {
321
+ if (!defined('DISABLE_WP_CRON') || DISABLE_WP_CRON == true) {
322
+ global $pagenow;
323
+ if (in_array($pagenow, array('post.php', 'post-new.php'))) {
324
+ $this->processCron();
325
+ }
326
+ }
327
  }
328
 
329
  public function processCron() {
controllers/SQ_PostsList.php CHANGED
@@ -19,10 +19,11 @@ class SQ_PostsList extends SQ_FrontController {
19
  * Called in SQ_Menu > hookMenu
20
  */
21
  public function init() {
22
- $this->types = array('post_posts',
23
- 'page_posts',
24
- 'edit-product',
25
- 'product_posts');
 
26
  }
27
 
28
  public function setPosts($posts) {
@@ -244,6 +245,7 @@ class SQ_PostsList extends SQ_FrontController {
244
  parent::action();
245
  switch (SQ_Tools::getValue('action')) {
246
  case 'sq_posts_rank':
 
247
  $args = array();
248
  $posts = SQ_Tools::getValue('posts');
249
  if (is_array($posts) && !empty($posts)) {
@@ -254,12 +256,12 @@ class SQ_PostsList extends SQ_FrontController {
254
  }
255
  if (isset($response) && is_object($response)) {
256
  $response = $this->model->getTotal($response);
257
- SQ_Tools::setHeader('json');
258
  exit(json_encode($response));
259
  }
260
  exit(json_encode(array('posts' => array())));
261
  break;
262
  case 'sq_post_rank':
 
263
  $args = array();
264
  $rank = null;
265
  $this->model->post_id = (int) SQ_Tools::getValue('post');
@@ -294,11 +296,12 @@ class SQ_PostsList extends SQ_FrontController {
294
  $analytics->audit = $this->model->getAnalytics($response, $this->model->post_id);
295
  $response = $analytics->init();
296
 
297
- SQ_Tools::setHeader('json');
298
  exit(json_encode($response));
299
  }
300
  break;
301
  case 'sq_recheck':
 
302
  if (get_transient('google_blocked') === false) {
303
  $this->model->post_id = (int) SQ_Tools::getValue('post_id');
304
  if ($json = SQ_ObjController::getModel('SQ_Post')->getKeyword($this->model->post_id)) {
@@ -348,20 +351,20 @@ class SQ_PostsList extends SQ_FrontController {
348
  $ranking = SQ_ObjController::getController('SQ_Ranking', false);
349
  if (is_object($ranking)) {
350
  $rank = get_transient('sq_rank' . $this->model->post_id);
351
- //if the rank is not in transient
352
  if ($rank === false) {
353
- //get the keyword from database
354
  $json = SQ_ObjController::getModel('SQ_Post')->getKeyword($this->model->post_id);
355
  if ($force === false && isset($json->rank)) {
356
  $rank = $json->rank;
357
- //add it to transient
358
  set_transient('sq_rank' . $this->model->post_id, $rank, (60 * 60 * 24 * 1));
359
  } else {
360
  $rank = $ranking->processRanking($this->model->post_id, $keyword);
361
 
362
  if ($rank == -1) {
363
  sleep(mt_rand(5, 10));
364
- //if not indexed with the keyword then find the url
365
  if ($ranking->processRanking($this->model->post_id, get_permalink($this->model->post_id)) > 0) { //for permalink index set 0
366
  $rank = 0;
367
  }
@@ -374,12 +377,12 @@ class SQ_PostsList extends SQ_FrontController {
374
  $args['language'] = $ranking->getLanguage();
375
  SQ_ObjController::getModel('SQ_Post')->saveKeyword($this->model->post_id, json_decode(json_encode($args)));
376
  }
377
- //add it to transient
378
  set_transient('sq_rank' . $this->model->post_id, $rank, (60 * 60 * 24 * 1));
379
  }
380
  }
381
 
382
- //save the rank if there is no error
383
  if ($rank !== false && $rank >= -1) {
384
  $args = array();
385
  $args['post_id'] = $this->model->post_id;
19
  * Called in SQ_Menu > hookMenu
20
  */
21
  public function init() {
22
+ $this->types = array_map(array($this, '_addPostsType'), SQ_Tools::$options['sq_post_types']);
23
+ }
24
+
25
+ protected function _addPostsType($type) {
26
+ return $type . '_posts';
27
  }
28
 
29
  public function setPosts($posts) {
245
  parent::action();
246
  switch (SQ_Tools::getValue('action')) {
247
  case 'sq_posts_rank':
248
+ SQ_Tools::setHeader('json');
249
  $args = array();
250
  $posts = SQ_Tools::getValue('posts');
251
  if (is_array($posts) && !empty($posts)) {
256
  }
257
  if (isset($response) && is_object($response)) {
258
  $response = $this->model->getTotal($response);
 
259
  exit(json_encode($response));
260
  }
261
  exit(json_encode(array('posts' => array())));
262
  break;
263
  case 'sq_post_rank':
264
+ SQ_Tools::setHeader('json');
265
  $args = array();
266
  $rank = null;
267
  $this->model->post_id = (int) SQ_Tools::getValue('post');
296
  $analytics->audit = $this->model->getAnalytics($response, $this->model->post_id);
297
  $response = $analytics->init();
298
 
299
+
300
  exit(json_encode($response));
301
  }
302
  break;
303
  case 'sq_recheck':
304
+ SQ_Tools::setHeader('json');
305
  if (get_transient('google_blocked') === false) {
306
  $this->model->post_id = (int) SQ_Tools::getValue('post_id');
307
  if ($json = SQ_ObjController::getModel('SQ_Post')->getKeyword($this->model->post_id)) {
351
  $ranking = SQ_ObjController::getController('SQ_Ranking', false);
352
  if (is_object($ranking)) {
353
  $rank = get_transient('sq_rank' . $this->model->post_id);
354
+ //if the rank is not in transient
355
  if ($rank === false) {
356
+ //get the keyword from database
357
  $json = SQ_ObjController::getModel('SQ_Post')->getKeyword($this->model->post_id);
358
  if ($force === false && isset($json->rank)) {
359
  $rank = $json->rank;
360
+ //add it to transient
361
  set_transient('sq_rank' . $this->model->post_id, $rank, (60 * 60 * 24 * 1));
362
  } else {
363
  $rank = $ranking->processRanking($this->model->post_id, $keyword);
364
 
365
  if ($rank == -1) {
366
  sleep(mt_rand(5, 10));
367
+ //if not indexed with the keyword then find the url
368
  if ($ranking->processRanking($this->model->post_id, get_permalink($this->model->post_id)) > 0) { //for permalink index set 0
369
  $rank = 0;
370
  }
377
  $args['language'] = $ranking->getLanguage();
378
  SQ_ObjController::getModel('SQ_Post')->saveKeyword($this->model->post_id, json_decode(json_encode($args)));
379
  }
380
+ //add it to transient
381
  set_transient('sq_rank' . $this->model->post_id, $rank, (60 * 60 * 24 * 1));
382
  }
383
  }
384
 
385
+ //save the rank if there is no error
386
  if ($rank !== false && $rank >= -1) {
387
  $args = array();
388
  $args['post_id'] = $this->model->post_id;
controllers/SQ_Sitemaps.php CHANGED
@@ -17,12 +17,7 @@ class SQ_Sitemaps extends SQ_FrontController {
17
  add_filter('request', array($this, 'feedRequest'));
18
  add_filter('user_trailingslashit', array($this, 'untrailingslashit'));
19
  add_action('sq_processPing', array($this, 'processCron'));
20
- //add_action('rss_tag_pre', array($this, 'rssStyle'));
21
- // add_filter('feed_content_type', array($this, 'feedHeader'), 10, 2);
22
- }
23
 
24
- public function rssStyle() {
25
- echo '<?xml-stylesheet type="text/xml" href="' . _SQ_THEME_URL_ . 'css/sq_feed.xsl' . '" media="screen" ?>';
26
  }
27
 
28
  public function feedHeader($content_type, $type) {
@@ -54,6 +49,8 @@ class SQ_Sitemaps extends SQ_FrontController {
54
  public function feedRequest($request) {
55
 
56
  if (isset($request['feed']) && strpos($request['feed'], 'sitemap') !== false) {
 
 
57
  $this->model->type = $request['feed'];
58
 
59
  //show products
@@ -80,16 +77,16 @@ class SQ_Sitemaps extends SQ_FrontController {
80
  add_filter("get_terms_fields", array($this, 'customTaxFilter'), 5, 2);
81
  break;
82
  case 'sitemap-page':
83
- add_filter('pre_get_posts', array($this, 'pageFilter'), 5);
84
  break;
85
  case 'sitemap-author':
86
  add_filter('sq-sitemap-authors', array($this, 'authorFilter'), 5);
87
  break;
88
  case 'sitemap-custom-post':
89
- add_filter('pre_get_posts', array($this, 'customPostFilter'), 5);
90
  break;
91
  case 'sitemap-product':
92
- add_filter('pre_get_posts', array($this, 'productFilter'), 5);
93
  break;
94
  case 'sitemap-archive':
95
  add_filter('sq-sitemap-archive', array($this, 'archiveFilter'), 5);
@@ -115,7 +112,7 @@ class SQ_Sitemaps extends SQ_FrontController {
115
  header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
116
  //Generate header
117
  echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>' . "\n";
118
- echo '<?xml-stylesheet type="text/xsl" href="' . _SQ_THEME_URL_ . 'css/sq_sitemap' . ($this->model->type == 'sitemap' ? 'index' : '') . '.xsl"?>' . "\n";
119
  echo '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . "\n";
120
  echo '<!-- generator="Squirrly SEO Sitemap" -->' . "\n";
121
  echo '<!-- generator-url="https://wordpress.org/plugins/squirrly-seo/" -->' . "\n";
@@ -416,9 +413,10 @@ class SQ_Sitemaps extends SQ_FrontController {
416
 
417
  foreach ($types as $type) {
418
  $type_data = get_post_type_object($type);
419
- if (!isset($type_data->rewrite['feeds']) || $type_data->rewrite['feeds'] != 1) {
420
- unset($types[$type]);
421
  }
 
422
  }
423
 
424
  if (empty($types)) {
17
  add_filter('request', array($this, 'feedRequest'));
18
  add_filter('user_trailingslashit', array($this, 'untrailingslashit'));
19
  add_action('sq_processPing', array($this, 'processCron'));
 
 
 
20
 
 
 
21
  }
22
 
23
  public function feedHeader($content_type, $type) {
49
  public function feedRequest($request) {
50
 
51
  if (isset($request['feed']) && strpos($request['feed'], 'sitemap') !== false) {
52
+ @ini_set('memory_limit','512M');
53
+
54
  $this->model->type = $request['feed'];
55
 
56
  //show products
77
  add_filter("get_terms_fields", array($this, 'customTaxFilter'), 5, 2);
78
  break;
79
  case 'sitemap-page':
80
+ add_filter('pre_get_posts', array($this, 'pageFilter'), 5, 1);
81
  break;
82
  case 'sitemap-author':
83
  add_filter('sq-sitemap-authors', array($this, 'authorFilter'), 5);
84
  break;
85
  case 'sitemap-custom-post':
86
+ add_filter('pre_get_posts', array($this, 'customPostFilter'), 5, 1);
87
  break;
88
  case 'sitemap-product':
89
+ add_filter('pre_get_posts', array($this, 'productFilter'), 5, 1);
90
  break;
91
  case 'sitemap-archive':
92
  add_filter('sq-sitemap-archive', array($this, 'archiveFilter'), 5);
112
  header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
113
  //Generate header
114
  echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>' . "\n";
115
+ echo '<?xml-stylesheet type="text/xsl" href="' . wp_make_link_relative(_SQ_THEME_URL_) . 'css/sq_sitemap' . ($this->model->type == 'sitemap' ? 'index' : '') . '.xsl"?>' . "\n";
116
  echo '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . "\n";
117
  echo '<!-- generator="Squirrly SEO Sitemap" -->' . "\n";
118
  echo '<!-- generator-url="https://wordpress.org/plugins/squirrly-seo/" -->' . "\n";
413
 
414
  foreach ($types as $type) {
415
  $type_data = get_post_type_object($type);
416
+ if ((isset($type_data->rewrite['feeds']) && $type_data->rewrite['feeds'] == 1) || (isset($type_data->feeds) && $type_data->feeds == 1)) {
417
+ continue;
418
  }
419
+ unset($types[$type]);
420
  }
421
 
422
  if (empty($types)) {
core/SQ_BlockSettingsSeo/SQ_BlockSettingsSeo.php CHANGED
@@ -12,11 +12,16 @@ class SQ_BlockSettingsSeo extends SQ_BlockController {
12
  echo '<script type="text/javascript">
13
  var __snippetshort = "' . __('Too short', _SQ_PLUGIN_NAME_) . '";
14
  var __snippetlong = "' . __('Too long', _SQ_PLUGIN_NAME_) . '";
 
 
 
15
  </script>';
16
  }
17
 
18
  function hookHead() {
19
- wp_enqueue_media();
 
 
20
  parent::hookHead();
21
  }
22
 
@@ -47,6 +52,7 @@ class SQ_BlockSettingsSeo extends SQ_BlockController {
47
  /////////////////////////////SOCIAL OPTION
48
  SQ_Tools::saveOptions('sq_auto_facebook', (int) SQ_Tools::getValue('sq_auto_facebook'));
49
  SQ_Tools::saveOptions('sq_auto_twitter', (int) SQ_Tools::getValue('sq_auto_twitter'));
 
50
 
51
  SQ_Tools::saveOptions('sq_twitter_account', $this->model->checkTwitterAccount(SQ_Tools::getValue('sq_twitter_account')));
52
  SQ_Tools::saveOptions('sq_facebook_account', $this->model->checkFacebookAccount(SQ_Tools::getValue('sq_facebook_account')));
@@ -247,7 +253,10 @@ class SQ_BlockSettingsSeo extends SQ_BlockController {
247
  $options = base64_decode($options);
248
  }
249
  $options = json_decode($options, true);
250
- if (is_array($options)) {
 
 
 
251
  SQ_Tools::$options = $options;
252
  SQ_Tools::saveOptions();
253
  SQ_Error::setError(__('Great! The backup is restored.', _SQ_PLUGIN_NAME_) . " <br /> ", 'success');
12
  echo '<script type="text/javascript">
13
  var __snippetshort = "' . __('Too short', _SQ_PLUGIN_NAME_) . '";
14
  var __snippetlong = "' . __('Too long', _SQ_PLUGIN_NAME_) . '";
15
+ jQuery(document).ready(function () {
16
+ jQuery("#sq_settings").find("select[name=sq_og_locale]").val("' . SQ_Tools::$options['sq_og_locale'] . '");
17
+ });
18
  </script>';
19
  }
20
 
21
  function hookHead() {
22
+ if (function_exists('wp_enqueue_media')) {
23
+ wp_enqueue_media();
24
+ }
25
  parent::hookHead();
26
  }
27
 
52
  /////////////////////////////SOCIAL OPTION
53
  SQ_Tools::saveOptions('sq_auto_facebook', (int) SQ_Tools::getValue('sq_auto_facebook'));
54
  SQ_Tools::saveOptions('sq_auto_twitter', (int) SQ_Tools::getValue('sq_auto_twitter'));
55
+ SQ_Tools::saveOptions('sq_og_locale', SQ_Tools::getValue('sq_og_locale'));
56
 
57
  SQ_Tools::saveOptions('sq_twitter_account', $this->model->checkTwitterAccount(SQ_Tools::getValue('sq_twitter_account')));
58
  SQ_Tools::saveOptions('sq_facebook_account', $this->model->checkFacebookAccount(SQ_Tools::getValue('sq_facebook_account')));
253
  $options = base64_decode($options);
254
  }
255
  $options = json_decode($options, true);
256
+ if (is_array($options) && isset($options['sq_api'])) {
257
+ if (SQ_Tools::$options['sq_api'] <> '') {
258
+ $options['sq_api'] = SQ_Tools::$options['sq_api'];
259
+ }
260
  SQ_Tools::$options = $options;
261
  SQ_Tools::saveOptions();
262
  SQ_Error::setError(__('Great! The backup is restored.', _SQ_PLUGIN_NAME_) . " <br /> ", 'success');
core/SQ_Blockresearch/SQ_Blockresearch.php CHANGED
@@ -11,6 +11,7 @@ class SQ_Blockresearch extends SQ_BlockController {
11
 
12
  echo '<script type="text/javascript">
13
  var __infotext = ["' . __('Recent discussions:', _SQ_PLUGIN_NAME_) . '", "' . __('Exact search:', _SQ_PLUGIN_NAME_) . '", "' . __('Competition:', _SQ_PLUGIN_NAME_) . '", "' . __('Trend:', _SQ_PLUGIN_NAME_) . '"];
 
14
  </script>';
15
  }
16
 
11
 
12
  echo '<script type="text/javascript">
13
  var __infotext = ["' . __('Recent discussions:', _SQ_PLUGIN_NAME_) . '", "' . __('Exact search:', _SQ_PLUGIN_NAME_) . '", "' . __('Competition:', _SQ_PLUGIN_NAME_) . '", "' . __('Trend:', _SQ_PLUGIN_NAME_) . '"];
14
+
15
  </script>';
16
  }
17
 
core/SQ_Blocksearch/SQ_Blocksearch.php CHANGED
@@ -47,7 +47,7 @@ class SQ_Blocksearch extends SQ_BlockController {
47
  public function hookHead() {
48
  parent::hookHead();
49
  echo '<script type="text/javascript">
50
- var __date = "' . __('date', _SQ_PLUGIN_NAME_) . '"; var __readit = "' . __('Read it!', _SQ_PLUGIN_NAME_) . '"; var __insertit = "' . __('Insert it!', _SQ_PLUGIN_NAME_) . '"; var __reference = "' . __('Reference', _SQ_PLUGIN_NAME_) . '"; var __insertasbox = "' . __('Insert as box', _SQ_PLUGIN_NAME_) . '"; var __notrelevant = "' . __('Not relevant?', _SQ_PLUGIN_NAME_) . '"; var __insertparagraph = "' . __('Insert in your article', _SQ_PLUGIN_NAME_) . '"; var __tinymceerror = "' . __('For Squirrly to work, you have to have tinymce editor installed!', _SQ_PLUGIN_NAME_) . '"; var __ajaxerror = "' . __(':( I lost my squirrel. Please reload the page.', _SQ_PLUGIN_NAME_) . '"; var __nofound = "' . __('No results found!', _SQ_PLUGIN_NAME_) . '"; var __tinymceinactive = "' . __('Switch to Visual editor!', _SQ_PLUGIN_NAME_) . '"; var __morewords = "' . __('Use more words in one keyword', _SQ_PLUGIN_NAME_) . '"; var __toolong = "' . __('Takes too long to check this keyword ...', _SQ_PLUGIN_NAME_) . '"; var __doresearch = "' . __('Do a research!', _SQ_PLUGIN_NAME_) . '"; var __morekeywords = "' . __('Do more research!', _SQ_PLUGIN_NAME_) . '"; var __sq_photo_copyright = "' . __('[ ATTRIBUTE: Please check: %s to find out how to attribute this image ]', _SQ_PLUGIN_NAME_) . '"; var __has_attributes = "' . __('Has creative commons attributes', _SQ_PLUGIN_NAME_) . '"; var __no_attributes = "' . __('No known copyright restrictions', _SQ_PLUGIN_NAME_) . '";
51
  </script>';
52
  }
53
 
47
  public function hookHead() {
48
  parent::hookHead();
49
  echo '<script type="text/javascript">
50
+ var __date = "' . __('date', _SQ_PLUGIN_NAME_) . '"; var __readit = "' . __('Read it!', _SQ_PLUGIN_NAME_) . '"; var __insertit = "' . __('Insert it!', _SQ_PLUGIN_NAME_) . '"; var __reference = "' . __('Reference', _SQ_PLUGIN_NAME_) . '"; var __insertasbox = "' . __('Insert as box', _SQ_PLUGIN_NAME_) . '"; var __notrelevant = "' . __('Not relevant?', _SQ_PLUGIN_NAME_) . '"; var __insertparagraph = "' . __('Insert in your article', _SQ_PLUGIN_NAME_) . '"; var __tinymceerror = "' . __('For Squirrly to work, you have to have tinymce editor installed!', _SQ_PLUGIN_NAME_) . '"; var __ajaxerror = "' . __(':( I lost my squirrel. Please reload the page.', _SQ_PLUGIN_NAME_) . '"; var __nofound = "' . __('No results found!', _SQ_PLUGIN_NAME_) . '"; var __tinymceinactive = "' . __('Switch to Visual editor!', _SQ_PLUGIN_NAME_) . '"; var __morewords = "' . __('Enter one more word to find relevant results', _SQ_PLUGIN_NAME_) . '"; var __toolong = "' . __('Takes too long to check this keyword ...', _SQ_PLUGIN_NAME_) . '"; var __doresearch = "' . __('Do a research!', _SQ_PLUGIN_NAME_) . '"; var __morekeywords = "' . __('Do more research!', _SQ_PLUGIN_NAME_) . '"; var __sq_photo_copyright = "' . __('[ ATTRIBUTE: Please check: %s to find out how to attribute this image ]', _SQ_PLUGIN_NAME_) . '"; var __has_attributes = "' . __('Has creative commons attributes', _SQ_PLUGIN_NAME_) . '"; var __no_attributes = "' . __('No known copyright restrictions', _SQ_PLUGIN_NAME_) . '";
51
  </script>';
52
  }
53
 
core/SQ_Loading/SQ_Loading.php CHANGED
@@ -25,8 +25,16 @@ class SQ_Loading extends SQ_BlockController {
25
  } else {
26
  $keyword = SQ_ObjController::getModel('SQ_Post')->getKeywordsFromPost($sq_postID);
27
  echo '<script type="text/javascript">
28
- var sq_use = "' . SQ_Tools::$options['sq_use'] . '"; var sq_beginner_user = "0"; var sq_baseurl = "' . _SQ_STATIC_API_URL_ . '"; var sq_uri = "' . SQ_URI . '"; var sq_language = "' . get_bloginfo('language') . '"; var sq_version = "' . SQ_VERSION_ID . '"; var sq_wpversion = "' . WP_VERSION_ID . '"; var sq_phpversion = "' . PHP_VERSION_ID . '"; var sq_seoversion = "' . (SQ_Tools::$options['sq_sla'] + 1) . '"; var __postID = "' . $sq_postID . '"; var __prevNonce = "' . wp_create_nonce('post_preview_' . $sq_postID) . '"; var __token = "' . SQ_Tools::$options['sq_api'] . '";
29
- var sq_keyword_information = "' . ((isset(SQ_Tools::$options['sq_keyword_information'])) ? SQ_Tools::$options['sq_keyword_information'] : '0') . '"; var __noopt = "' . __('You haven`t used Squirrly SEO to optimize your article. Do you want to optimize for a keyword before publishing?', _SQ_PLUGIN_NAME_) . '";
 
 
 
 
 
 
 
 
30
  var sq_frontend_css = "' . _SQ_THEME_URL_ . 'css/sq_frontend.css";
31
  ' . (($keyword <> '') ? 'var sq_keyword_from_post = "' . $keyword . '";' : '') . '
32
  if (typeof sq_script === "undefined"){
25
  } else {
26
  $keyword = SQ_ObjController::getModel('SQ_Post')->getKeywordsFromPost($sq_postID);
27
  echo '<script type="text/javascript">
28
+ var sq_use = "' . SQ_Tools::$options['sq_use'] . '";
29
+ var sq_baseurl = "' . _SQ_STATIC_API_URL_ . '";
30
+ var sq_uri = "' . SQ_URI . '"; var sq_language = "' . get_bloginfo('language') . '";
31
+ var sq_version = "' . SQ_VERSION_ID . '"; var sq_wpversion = "' . WP_VERSION_ID . '"; var sq_phpversion = "' . PHP_VERSION_ID . '"; var sq_seoversion = "' . (SQ_Tools::$options['sq_sla'] + 1) . '";
32
+ var __postID = "' . $sq_postID . '";
33
+ var __prevNonce = "' . wp_create_nonce('post_preview_' . $sq_postID) . '";
34
+ var __token = "' . SQ_Tools::$options['sq_api'] . '";
35
+ var sq_keyword_information = "' . ((isset(SQ_Tools::$options['sq_keyword_information'])) ? SQ_Tools::$options['sq_keyword_information'] : '0') . '";
36
+ var __noopt = "' . __('You haven`t used Squirrly SEO to optimize your article. Do you want to optimize for a keyword before publishing?', _SQ_PLUGIN_NAME_) . '";
37
+ var sq_keywordtag = "' . SQ_Tools::$options['sq_keywordtag'] . '";
38
  var sq_frontend_css = "' . _SQ_THEME_URL_ . 'css/sq_frontend.css";
39
  ' . (($keyword <> '') ? 'var sq_keyword_from_post = "' . $keyword . '";' : '') . '
40
  if (typeof sq_script === "undefined"){
models/SQ_BlockPostsAnalytics.php CHANGED
@@ -7,6 +7,7 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
7
  private $order_posts;
8
 
9
  function __construct() {
 
10
  $this->posts = array();
11
  $this->order_posts = array();
12
  }
@@ -57,6 +58,10 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
57
  $post_status = 'publish';
58
  $perm = 'readable';
59
  }
 
 
 
 
60
 
61
  if (isset($q['orderby']))
62
  $orderby = $q['orderby'];
@@ -74,6 +79,7 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
74
  }
75
 
76
  $meta_key = '';
 
77
  $posts = SQ_ObjController::getModel('SQ_Post')->getPostWithKeywords();
78
  if ($posts !== false && !empty($posts)) {
79
  //sort descending
@@ -84,6 +90,7 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
84
 
85
  //if rank filter
86
  if (isset($q['rank'])) {
 
87
  if (!isset($post->meta_value->rank) || $q['rank'] <> $post->meta_value->rank) {
88
  continue;
89
  }
@@ -97,7 +104,6 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
97
 
98
  //if rank order
99
  if (isset($q['orderby']) && $q['orderby'] == 'rank') {
100
- $count_p = 999;
101
  if (isset($post->meta_value->rank)) {
102
  if ($post->meta_value->rank > 0) {
103
  $this->order_posts[$post->meta_value->rank . '_' . $post->post_id] = $post->post_id;
@@ -105,12 +111,14 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
105
  $this->order_posts[$count_p . '_' . $post->post_id] = $post->post_id;
106
  $count_p++;
107
  }
 
 
 
108
  }
109
  }
110
 
111
  $post__in[] = $post->post_id;
112
  }
113
-
114
  if (isset($q['orderby']) && $q['orderby'] === 'rank') {
115
  ksort($this->order_posts, SORT_NUMERIC);
116
  // $meta_key = 'sq_post_keyword_rank';
@@ -233,6 +241,7 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
233
  $class[] = 'check-column';
234
  $style = ' style="margin:0;padding:0;width:0px;"';
235
  }
 
236
  if (isset($sortable[$column_key])) {
237
  list( $orderby, $desc_first ) = $sortable[$column_key];
238
 
@@ -276,7 +285,7 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
276
  $posts_columns['keywords'] = __('Keywords');
277
 
278
  $posts_columns['rank'] = sprintf(__('Google.%s Position'), SQ_Tools::$options['sq_google_country']);
279
- $posts_columns['traffic'] = __('Monthly Traffic');
280
  $posts_columns['date'] = __('Date');
281
  return $posts_columns;
282
  }
@@ -398,7 +407,7 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table {
398
  }
399
  $value = sprintf('<a id="sq_rank_value' . $post->ID . '" href="%s" style="display:block; width: 120px; margin: 0 auto; text-align:right;">%s</a><span class="sq_rank_column_button_recheck sq_rank_column_button" onclick="sq_recheckRank(' . $post->ID . ')">%s</span>', esc_url(add_query_arg(array('page' => 'sq_posts', 'rank' => $json->rank), 'admin.php')), $value, __('Force recheck', _SQ_PLUGIN_NAME_));
400
  } else {
401
- $value = __('Not yet verified');
402
  }
403
 
404
  break;
7
  private $order_posts;
8
 
9
  function __construct() {
10
+ parent::__construct();
11
  $this->posts = array();
12
  $this->order_posts = array();
13
  }
58
  $post_status = 'publish';
59
  $perm = 'readable';
60
  }
61
+ if (!isset($q['orderby'])) {
62
+ $_GET['orderby'] = $q['orderby'] = 'rank';
63
+ $_GET['order'] = $q['order'] = 'asc';
64
+ }
65
 
66
  if (isset($q['orderby']))
67
  $orderby = $q['orderby'];
79
  }
80
 
81
  $meta_key = '';
82
+ $count_p = 99999;
83
  $posts = SQ_ObjController::getModel('SQ_Post')->getPostWithKeywords();
84
  if ($posts !== false && !empty($posts)) {
85
  //sort descending
90
 
91
  //if rank filter
92
  if (isset($q['rank'])) {
93
+
94
  if (!isset($post->meta_value->rank) || $q['rank'] <> $post->meta_value->rank) {
95
  continue;
96
  }
104
 
105
  //if rank order
106
  if (isset($q['orderby']) && $q['orderby'] == 'rank') {
 
107
  if (isset($post->meta_value->rank)) {
108
  if ($post->meta_value->rank > 0) {
109
  $this->order_posts[$post->meta_value->rank . '_' . $post->post_id] = $post->post_id;
111
  $this->order_posts[$count_p . '_' . $post->post_id] = $post->post_id;
112
  $count_p++;
113
  }
114
+ } else {
115
+ $this->order_posts[$count_p . '_' . $post->post_id] = $post->post_id;
116
+ $count_p++;
117
  }
118
  }
119
 
120
  $post__in[] = $post->post_id;
121
  }
 
122
  if (isset($q['orderby']) && $q['orderby'] === 'rank') {
123
  ksort($this->order_posts, SORT_NUMERIC);
124
  // $meta_key = 'sq_post_keyword_rank';
241
  $class[] = 'check-column';
242
  $style = ' style="margin:0;padding:0;width:0px;"';
243
  }
244
+
245
  if (isset($sortable[$column_key])) {
246
  list( $orderby, $desc_first ) = $sortable[$column_key];
247
 
285
  $posts_columns['keywords'] = __('Keywords');
286
 
287
  $posts_columns['rank'] = sprintf(__('Google.%s Position'), SQ_Tools::$options['sq_google_country']);
288
+ $posts_columns['traffic'] = '';
289
  $posts_columns['date'] = __('Date');
290
  return $posts_columns;
291
  }
407
  }
408
  $value = sprintf('<a id="sq_rank_value' . $post->ID . '" href="%s" style="display:block; width: 120px; margin: 0 auto; text-align:right;">%s</a><span class="sq_rank_column_button_recheck sq_rank_column_button" onclick="sq_recheckRank(' . $post->ID . ')">%s</span>', esc_url(add_query_arg(array('page' => 'sq_posts', 'rank' => $json->rank), 'admin.php')), $value, __('Force recheck', _SQ_PLUGIN_NAME_));
409
  } else {
410
+ $value = sprintf('<a id="sq_rank_value' . $post->ID . '" href="%s" style="display:block; width: 120px; margin: 0 auto; text-align:right;">%s</a><span class="sq_rank_column_button_recheck sq_rank_column_button" onclick="sq_recheckRank(' . $post->ID . ')">%s</span>', esc_url(add_query_arg(array('page' => 'sq_posts', 'rank' => false), 'admin.php')), __('Not yet verified'), __('Check now', _SQ_PLUGIN_NAME_));
411
  }
412
 
413
  break;
models/SQ_BlockSettingsSeo.php CHANGED
@@ -299,6 +299,9 @@ class Model_SQ_BlockSettingsSeo {
299
  if (file_exists($path . "/" . 'favicon.ico')) {
300
  $ico->remove_ico($path . "/" . 'favicon.ico');
301
  }
 
 
 
302
  }
303
  foreach ($this->appleSizes as $size) {
304
  $ico->set_image($out['tmp'], array($size, $size));
@@ -318,6 +321,9 @@ class Model_SQ_BlockSettingsSeo {
318
  $ico = SQ_ObjController::getModel('SQ_Ico');
319
  $ico->remove_ico($path . "/" . 'favicon.ico');
320
  }
 
 
 
321
  }
322
  unset($out['tmp']);
323
  $out['message'] = __("The favicon has been updated.", _SQ_PLUGIN_NAME_);
299
  if (file_exists($path . "/" . 'favicon.ico')) {
300
  $ico->remove_ico($path . "/" . 'favicon.ico');
301
  }
302
+ if (!is_multisite()) {
303
+ $ico->save_ico($path . "/" . 'favicon.ico');
304
+ }
305
  }
306
  foreach ($this->appleSizes as $size) {
307
  $ico->set_image($out['tmp'], array($size, $size));
321
  $ico = SQ_ObjController::getModel('SQ_Ico');
322
  $ico->remove_ico($path . "/" . 'favicon.ico');
323
  }
324
+ if (!is_multisite()) {
325
+ $ico->save_ico($path . "/" . 'favicon.ico');
326
+ }
327
  }
328
  unset($out['tmp']);
329
  $out['message'] = __("The favicon has been updated.", _SQ_PLUGIN_NAME_);
models/SQ_Frontend.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  class Model_SQ_Frontend {
4
 
 
 
5
  /** @var object Current post */
6
  private $post;
7
  private $post_type;
@@ -80,8 +82,12 @@ class Model_SQ_Frontend {
80
  * @return buffer
81
  */
82
  public function getBuffer($buffer) {
83
- $buffer = $this->setMetaInBuffer($buffer);
84
- return $buffer;
 
 
 
 
85
  }
86
 
87
  /**
@@ -96,8 +102,16 @@ class Model_SQ_Frontend {
96
  $buffers = @ob_list_handlers();
97
  }
98
 
99
- if (sizeof($buffers) > 0 && strtolower($buffers[sizeof($buffers) - 1]) == strtolower('Model_SQ_Frontend::getBuffer')) {
100
  @ob_end_flush();
 
 
 
 
 
 
 
 
101
  }
102
  }
103
 
@@ -108,7 +122,6 @@ class Model_SQ_Frontend {
108
  */
109
  private function setMetaInBuffer($buffer) {
110
  global $post;
111
-
112
  //if the title is already shown
113
  if (isset($this->title)) {
114
  return $buffer;
@@ -219,6 +232,7 @@ class Model_SQ_Frontend {
219
  $ret .= $this->getDublinCore();
220
  }
221
  if (SQ_Tools::$options['sq_auto_facebook'] == 1) {
 
222
  $ret .= $this->getOpenGraph() . "\n";
223
  }
224
 
@@ -253,8 +267,11 @@ class Model_SQ_Frontend {
253
  $sq_twitter_creator = SQ_Tools::$options['sq_twitter_account'];
254
  $sq_twitter_site = SQ_Tools::$options['sq_twitter_account'];
255
 
256
-
257
- $meta .= '<meta name="twitter:card" content="summary" />' . "\n";
 
 
 
258
 
259
  $meta .= (($sq_twitter_creator <> '') ? sprintf('<meta name="twitter:creator" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
260
  $meta .= (($sq_twitter_site <> '') ? sprintf('<meta name="twitter:site" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
@@ -315,9 +332,9 @@ class Model_SQ_Frontend {
315
  if (!empty($this->thumb_images)) {
316
  foreach ($this->thumb_images as $image) {
317
  $meta .= sprintf('<meta property="og:image" content="%s" />', $image['src']) . "\n";
318
- $meta .= sprintf('<meta property="og:image:width" content="%s" />', (isset($image['width']) ? $image['width'] : 500)) . "\n";
319
- if (isset($image['height']))
320
- $meta .= sprintf('<meta property="og:image:height" content="%s" />', $image['height']) . "\n";
321
  }
322
  }
323
 
@@ -332,8 +349,8 @@ class Model_SQ_Frontend {
332
  $meta .= sprintf('<meta property="og:description" content="%s" />', $this->description) . "\n";
333
  $meta .= (($this->meta['blogname'] <> '') ? sprintf('<meta property="og:site_name" content="%s" />', apply_filters('sq_open_graph_site', $this->meta['blogname'])) . "\n" : '');
334
 
335
- $language = get_bloginfo('language');
336
- $meta .= sprintf('<meta property="og:locale" content="%s" />', str_replace("-", "_", $language)) . "\n";
337
 
338
  if (is_author()) {
339
  $author = get_queried_object();
@@ -346,6 +363,7 @@ class Model_SQ_Frontend {
346
 
347
  $meta .= sprintf('<meta property="og:type" content="%s" />', 'article') . "\n";
348
  $meta .= sprintf('<meta property="article:published_time" content="%s" />', get_the_time('c', $this->post->ID)) . "\n";
 
349
  $category = get_the_category($this->post->ID);
350
  if (!empty($category) && $category[0]->cat_name <> 'Uncategorized') {
351
  $meta .= sprintf('<meta property="article:section" content="%s" />', $category[0]->cat_name) . "\n";
@@ -512,7 +530,7 @@ class Model_SQ_Frontend {
512
  * @param integer $id Post ID
513
  * @return type
514
  */
515
- public function getImagesFromContent($id = null) {
516
  $images = array();
517
  if (isset($id)) {
518
  $post = get_post($id);
@@ -530,34 +548,38 @@ class Model_SQ_Frontend {
530
  'height' => null,
531
  );
532
  }
533
- if (has_post_thumbnail($post->ID)) {
534
- $attachment = get_post(get_post_thumbnail_id($post->ID));
535
- $url = wp_get_attachment_image_src($attachment->ID, 'full');
536
- $images[] = array(
537
- 'src' => esc_url($url[0]),
538
- 'title' => $this->clearTitle($attachment->post_title),
539
- 'description' => $this->clearDescription($attachment->post_excerpt),
540
- 'width' => $url[1],
541
- 'height' => $url[2],
542
- );
 
 
543
  }
544
- if (isset($post->post_content)) {
545
- preg_match('/<img[^>]*src="([^"]*)"[^>]*>/i', $post->post_content, $match);
 
546
 
547
- if (!empty($match)) {
548
- preg_match('/alt="([^"]*)"/i', $match[0], $alt);
549
 
550
- if (strpos($match[1], '//') === false) {
551
- $match[1] = get_bloginfo('url') . $match[1];
552
- }
553
 
554
- $images[] = array(
555
- 'src' => esc_url($match[1]),
556
- 'title' => $this->clearTitle(!empty($alt[1]) ? $alt[1] : ''),
557
- 'description' => '',
558
- 'width' => null,
559
- 'height' => null,
560
- );
 
561
  }
562
  }
563
  }
@@ -581,7 +603,7 @@ class Model_SQ_Frontend {
581
 
582
  if ($post && isset($post->ID)) {
583
  if (isset($post->post_content)) {
584
- preg_match('/(?:http(?:s)?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed)\/)([^\?&\"\'>\s]+)/si', apply_filters('the_content', $post->post_content), $match);
585
 
586
  if (isset($match[0])) {
587
  if (strpos($match[0], '//') !== false && strpos($match[0], 'http') === false) {
@@ -589,6 +611,23 @@ class Model_SQ_Frontend {
589
  }
590
  $videos[] = esc_url($match[0]);
591
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
 
593
  preg_match('/src=["|\']([^"\']*(.mpg|.mpeg|.mp4|.mov|.wmv|.asf|.avi|.ra|.ram|.rm|.flv)["|\'])/i', $post->post_content, $match);
594
 
@@ -819,13 +858,23 @@ class Model_SQ_Frontend {
819
  if (SQ_Tools::$options['favicon'] <> '' && file_exists(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon'])) {
820
  $meta .= "\n";
821
 
822
- $favicon = get_bloginfo('wpurl') . '/favicon.icon' . $rnd;
 
 
 
 
 
 
823
  $meta .= sprintf("<link rel=\"shortcut icon\" href=\"%s\" />" . "\n", $favicon);
824
- $meta .= sprintf("<link rel=\"apple-touch-icon\" href=\"%s\" />" . "\n", get_bloginfo('wpurl') . '/touch-icon.png' . $rnd);
825
 
826
  $appleSizes = preg_split('/[,]+/', _SQ_MOBILE_ICON_SIZES);
827
  foreach ($appleSizes as $size) {
828
- $favicon = get_bloginfo('wpurl') . '/touch-icon' . $size . '.png' . $rnd;
 
 
 
 
829
  $meta .= sprintf("<link rel=\"apple-touch-icon\" sizes=\"" . $size . "x" . $size . "\" href=\"%s\" />" . "\n", $favicon);
830
  }
831
  } else {
@@ -850,7 +899,8 @@ class Model_SQ_Frontend {
850
  if (strpos($language, '-') !== false) {
851
  $hreflang = substr($language, 0, strpos($language, '-'));
852
  }
853
- $meta .= sprintf("<link rel=\"alternate\" hreflang=\"%s\" href=\"%s\" />", $hreflang, $url) . "\n";
 
854
  $meta .= sprintf("<meta name=\"dc.language\" content=\"%s\" />", $language) . "\n";
855
  }
856
 
@@ -1012,14 +1062,13 @@ class Model_SQ_Frontend {
1012
  private function getJsonLD() {
1013
  $meta = '';
1014
  $sep = ",\n";
1015
-
1016
  if ($this->isHomePage()) {
1017
  if (isset(SQ_Tools::$options['sq_jsonld'][SQ_Tools::$options['sq_jsonld_type']])) {
1018
  $meta .= '"@type":"' . SQ_Tools::$options['sq_jsonld_type'] . '"' . $sep;
1019
  $meta .= '"url": "' . $this->url . '"';
1020
  foreach (SQ_Tools::$options['sq_jsonld'][SQ_Tools::$options['sq_jsonld_type']] as $key => $value) {
1021
  if ($value <> '') {
1022
- if (SQ_Tools::$options['sq_jsonld_type'] == 'Person' && $key == 'logo') {
1023
  $key = 'image';
1024
  }
1025
  if (SQ_Tools::$options['sq_jsonld_type'] == 'Organization' && $key == 'contactType') {
@@ -1048,7 +1097,11 @@ class Model_SQ_Frontend {
1048
  $social .= ($social <> '' ? "," : '') . '"' . SQ_Tools::$options['sq_linkedin_account'] . '"';
1049
  }
1050
 
1051
- $search = $sep . '"potentialAction": {"@type": "SearchAction","target": "' . get_bloginfo('url') . '?s={search_string}", "query-input": "required name=search_string"}';
 
 
 
 
1052
 
1053
  if ($social <> '') {
1054
  $social = $sep . '"sameAs": [' . $social . ']';
@@ -1066,12 +1119,18 @@ class Model_SQ_Frontend {
1066
  if (!empty($this->thumb_images))
1067
  $meta .= '"thumbnailUrl": "' . $this->thumb_images[0]['src'] . '"' . $sep;
1068
  if (isset($this->post->post_date))
1069
- $meta .= '"dateCreated": "' . date('c', strtotime($this->post->post_date)) . '"' . $sep;
 
 
 
 
 
 
1070
  $meta .= '"author": {"@type": "Person", "url": "' . $this->getAuthor('user_url') . '", "name": "' . $this->getAuthor('display_name') . '"}' . $sep;
1071
  $meta .= '"keywords": ["' . str_replace(',', '","', $this->grabKeywordsFromPost()) . '"]';
1072
 
1073
  $meta = '{ "@context": "http://schema.org"' . $sep . $meta . '}';
1074
- }elseif (is_author()) {
1075
  $meta .= '"@type": "Person"' . $sep;
1076
  $meta .= '"name": "' . $this->getAuthor('display_name') . '"' . $sep;
1077
  $meta .= '"url": "' . $this->getAuthor('user_url') . '"';
@@ -1292,6 +1351,12 @@ class Model_SQ_Frontend {
1292
  return false;
1293
  }
1294
 
 
 
 
 
 
 
1295
  $haspost = (count($wp_query->posts) > 0);
1296
  $has_ut = function_exists('user_trailingslashit');
1297
 
@@ -1499,6 +1564,9 @@ class Model_SQ_Frontend {
1499
  case 'ogimage':
1500
  $field = '_sq_fp_ogimage';
1501
  break;
 
 
 
1502
  default:
1503
  $field = '_sq_fp_title';
1504
  }
@@ -1509,7 +1577,7 @@ class Model_SQ_Frontend {
1509
 
1510
  // Get the custom Squirrly meta
1511
  //////////////////////////////////////////
1512
- $fields = array('_sq_fp_title' => '', '_sq_fp_description' => '', '_sq_fp_keywords' => '', '_sq_fp_ogimage' => '');
1513
 
1514
  $sql = "SELECT `meta_key`, `meta_value`
1515
  FROM `" . $wpdb->postmeta . "`
2
 
3
  class Model_SQ_Frontend {
4
 
5
+ public $buffer;
6
+
7
  /** @var object Current post */
8
  private $post;
9
  private $post_type;
82
  * @return buffer
83
  */
84
  public function getBuffer($buffer) {
85
+ if (isset($this->buffer)) {
86
+ return $this->buffer;
87
+ }
88
+
89
+ $this->buffer = $this->setMetaInBuffer($buffer);
90
+ return $this->buffer;
91
  }
92
 
93
  /**
102
  $buffers = @ob_list_handlers();
103
  }
104
 
105
+ if (sizeof($buffers) > 0 && strtolower($buffers[sizeof($buffers) - 1]) == strtolower(get_class($this) . '::getBuffer')) {
106
  @ob_end_flush();
107
+ $buffers = @ob_list_handlers();
108
+ }
109
+
110
+ if (sizeof($buffers) > 0 && strtolower($buffers[sizeof($buffers) - 1]) == strtolower('All_in_One_SEO_Pack::output_callback_for_title')) {
111
+ if (isset($this->buffer)) {
112
+ @ob_end_clean();
113
+ echo $this->buffer;
114
+ }
115
  }
116
  }
117
 
122
  */
123
  private function setMetaInBuffer($buffer) {
124
  global $post;
 
125
  //if the title is already shown
126
  if (isset($this->title)) {
127
  return $buffer;
232
  $ret .= $this->getDublinCore();
233
  }
234
  if (SQ_Tools::$options['sq_auto_facebook'] == 1) {
235
+ add_filter('jetpack_enable_opengraph', '__return_false', 99);
236
  $ret .= $this->getOpenGraph() . "\n";
237
  }
238
 
267
  $sq_twitter_creator = SQ_Tools::$options['sq_twitter_account'];
268
  $sq_twitter_site = SQ_Tools::$options['sq_twitter_account'];
269
 
270
+ if (!empty($this->thumb_images)) {
271
+ $meta .= '<meta name="twitter:card" content="summary_large_image" />' . "\n";
272
+ } else {
273
+ $meta .= '<meta name="twitter:card" content="summary" />' . "\n";
274
+ }
275
 
276
  $meta .= (($sq_twitter_creator <> '') ? sprintf('<meta name="twitter:creator" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
277
  $meta .= (($sq_twitter_site <> '') ? sprintf('<meta name="twitter:site" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
332
  if (!empty($this->thumb_images)) {
333
  foreach ($this->thumb_images as $image) {
334
  $meta .= sprintf('<meta property="og:image" content="%s" />', $image['src']) . "\n";
335
+ $meta .= sprintf('<meta property="og:image:width" content="%s" />', ((isset($image['width']) && $image['width'] <> '' ) ? (int) $image['width'] : 500)) . "\n";
336
+ if (isset($image['height']) && $image['height'] <> '')
337
+ $meta .= sprintf('<meta property="og:image:height" content="%s" />', (int) $image['height']) . "\n";
338
  }
339
  }
340
 
349
  $meta .= sprintf('<meta property="og:description" content="%s" />', $this->description) . "\n";
350
  $meta .= (($this->meta['blogname'] <> '') ? sprintf('<meta property="og:site_name" content="%s" />', apply_filters('sq_open_graph_site', $this->meta['blogname'])) . "\n" : '');
351
 
352
+
353
+ $meta .= sprintf('<meta property="og:locale" content="%s" />', SQ_Tools::$options['sq_og_locale']) . "\n";
354
 
355
  if (is_author()) {
356
  $author = get_queried_object();
363
 
364
  $meta .= sprintf('<meta property="og:type" content="%s" />', 'article') . "\n";
365
  $meta .= sprintf('<meta property="article:published_time" content="%s" />', get_the_time('c', $this->post->ID)) . "\n";
366
+
367
  $category = get_the_category($this->post->ID);
368
  if (!empty($category) && $category[0]->cat_name <> 'Uncategorized') {
369
  $meta .= sprintf('<meta property="article:section" content="%s" />', $category[0]->cat_name) . "\n";
530
  * @param integer $id Post ID
531
  * @return type
532
  */
533
+ public function getImagesFromContent($id = null, $all = false) {
534
  $images = array();
535
  if (isset($id)) {
536
  $post = get_post($id);
548
  'height' => null,
549
  );
550
  }
551
+ if ($all || empty($images)) {
552
+ if (has_post_thumbnail($post->ID)) {
553
+ $attachment = get_post(get_post_thumbnail_id($post->ID));
554
+ $url = wp_get_attachment_image_src($attachment->ID, 'full');
555
+ $images[] = array(
556
+ 'src' => esc_url($url[0]),
557
+ 'title' => $this->clearTitle($attachment->post_title),
558
+ 'description' => $this->clearDescription($attachment->post_excerpt),
559
+ 'width' => $url[1],
560
+ 'height' => $url[2],
561
+ );
562
+ }
563
  }
564
+ if ($all || empty($images)) {
565
+ if (isset($post->post_content)) {
566
+ preg_match('/<img[^>]*src="([^"]*)"[^>]*>/i', $post->post_content, $match);
567
 
568
+ if (!empty($match)) {
569
+ preg_match('/alt="([^"]*)"/i', $match[0], $alt);
570
 
571
+ if (strpos($match[1], '//') === false) {
572
+ $match[1] = get_bloginfo('url') . $match[1];
573
+ }
574
 
575
+ $images[] = array(
576
+ 'src' => esc_url($match[1]),
577
+ 'title' => $this->clearTitle(!empty($alt[1]) ? $alt[1] : ''),
578
+ 'description' => '',
579
+ 'width' => null,
580
+ 'height' => null,
581
+ );
582
+ }
583
  }
584
  }
585
  }
603
 
604
  if ($post && isset($post->ID)) {
605
  if (isset($post->post_content)) {
606
+ preg_match('/(?:http(?:s)?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed)\/)([^\?&\"\'>\s]+)/si', $post->post_content, $match);
607
 
608
  if (isset($match[0])) {
609
  if (strpos($match[0], '//') !== false && strpos($match[0], 'http') === false) {
611
  }
612
  $videos[] = esc_url($match[0]);
613
  }
614
+ //fast.wistia.net/embed/iframe/{code}
615
+ //http://fwd4.wistia.com/medias/84ddsijns7
616
+ preg_match('/(?:http(?:s)?:\/\/)?(?:fast\.wistia\.net\/(?:embed)\/(?:iframe)\/)([^\?&\"\'>\s]+)/si', $post->post_content, $match);
617
+
618
+ if (isset($match[0])) {
619
+ if (strpos($match[0], '//') !== false && strpos($match[0], 'http') === false) {
620
+ $match[0] = 'http:' . $match[0];
621
+ }
622
+ $videos[] = esc_url($match[0]);
623
+ }
624
+
625
+ preg_match('/(?:http(?:s)?:\/\/)?(?:fwd4\.wistia\.com\/(?:medias)\/)([^\?&\"\'>\s]+)/si', $post->post_content, $match);
626
+
627
+ if (isset($match[0])) {
628
+ $videos[] = esc_url('http://fast.wistia.net/embed/iframe/' . $match[1]);
629
+ }
630
+
631
 
632
  preg_match('/src=["|\']([^"\']*(.mpg|.mpeg|.mp4|.mov|.wmv|.asf|.avi|.ra|.ram|.rm|.flv)["|\'])/i', $post->post_content, $match);
633
 
858
  if (SQ_Tools::$options['favicon'] <> '' && file_exists(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon'])) {
859
  $meta .= "\n";
860
 
861
+ if (!get_option('permalink_structure')) {
862
+ $favicon = get_bloginfo('wpurl') . '/index.php?sq_get=favicon';
863
+ $touchicon = get_bloginfo('wpurl') . '/index.php?sq_get=touchicon';
864
+ } else {
865
+ $favicon = get_bloginfo('wpurl') . '/favicon.icon' . $rnd;
866
+ $touchicon = get_bloginfo('wpurl') . '/touch-icon.png' . $rnd;
867
+ }
868
  $meta .= sprintf("<link rel=\"shortcut icon\" href=\"%s\" />" . "\n", $favicon);
869
+ $meta .= sprintf("<link rel=\"apple-touch-icon\" href=\"%s\" />" . "\n", $touchicon);
870
 
871
  $appleSizes = preg_split('/[,]+/', _SQ_MOBILE_ICON_SIZES);
872
  foreach ($appleSizes as $size) {
873
+ if (!get_option('permalink_structure')) {
874
+ $favicon = get_bloginfo('wpurl') . '/index.php?sq_get=touchicon&sq_size=' . $size;
875
+ } else {
876
+ $favicon = get_bloginfo('wpurl') . '/touch-icon' . $size . '.png' . $rnd;
877
+ }
878
  $meta .= sprintf("<link rel=\"apple-touch-icon\" sizes=\"" . $size . "x" . $size . "\" href=\"%s\" />" . "\n", $favicon);
879
  }
880
  } else {
899
  if (strpos($language, '-') !== false) {
900
  $hreflang = substr($language, 0, strpos($language, '-'));
901
  }
902
+
903
+
904
  $meta .= sprintf("<meta name=\"dc.language\" content=\"%s\" />", $language) . "\n";
905
  }
906
 
1062
  private function getJsonLD() {
1063
  $meta = '';
1064
  $sep = ",\n";
 
1065
  if ($this->isHomePage()) {
1066
  if (isset(SQ_Tools::$options['sq_jsonld'][SQ_Tools::$options['sq_jsonld_type']])) {
1067
  $meta .= '"@type":"' . SQ_Tools::$options['sq_jsonld_type'] . '"' . $sep;
1068
  $meta .= '"url": "' . $this->url . '"';
1069
  foreach (SQ_Tools::$options['sq_jsonld'][SQ_Tools::$options['sq_jsonld_type']] as $key => $value) {
1070
  if ($value <> '') {
1071
+ if ($key == 'logo') {
1072
  $key = 'image';
1073
  }
1074
  if (SQ_Tools::$options['sq_jsonld_type'] == 'Organization' && $key == 'contactType') {
1097
  $social .= ($social <> '' ? "," : '') . '"' . SQ_Tools::$options['sq_linkedin_account'] . '"';
1098
  }
1099
 
1100
+ $search = $sep . '"potentialAction": {
1101
+ "@type": "SearchAction",
1102
+ "target": "' . get_bloginfo('url') . '?s={search_string}",
1103
+ "query-input": "required name=search_string"
1104
+ }';
1105
 
1106
  if ($social <> '') {
1107
  $social = $sep . '"sameAs": [' . $social . ']';
1119
  if (!empty($this->thumb_images))
1120
  $meta .= '"thumbnailUrl": "' . $this->thumb_images[0]['src'] . '"' . $sep;
1121
  if (isset($this->post->post_date))
1122
+ $meta .= '"datePublished": "' . date('c', strtotime($this->post->post_date)) . '"' . $sep;
1123
+ if (!empty($this->thumb_images)) {
1124
+ foreach ($this->thumb_images as $image) {
1125
+ $meta .= '"image": "' . $image['src'] . '"' . $sep;
1126
+ break;
1127
+ }
1128
+ }
1129
  $meta .= '"author": {"@type": "Person", "url": "' . $this->getAuthor('user_url') . '", "name": "' . $this->getAuthor('display_name') . '"}' . $sep;
1130
  $meta .= '"keywords": ["' . str_replace(',', '","', $this->grabKeywordsFromPost()) . '"]';
1131
 
1132
  $meta = '{ "@context": "http://schema.org"' . $sep . $meta . '}';
1133
+ } elseif (is_author()) {
1134
  $meta .= '"@type": "Person"' . $sep;
1135
  $meta .= '"name": "' . $this->getAuthor('display_name') . '"' . $sep;
1136
  $meta .= '"url": "' . $this->getAuthor('user_url') . '"';
1351
  return false;
1352
  }
1353
 
1354
+ if (isset($this->post->ID) && $link = $this->getAdvancedMeta($this->post->ID, 'canonical')) {
1355
+ if ($link <> '') {
1356
+ return apply_filters('sq_canonical', $link);
1357
+ }
1358
+ }
1359
+
1360
  $haspost = (count($wp_query->posts) > 0);
1361
  $has_ut = function_exists('user_trailingslashit');
1362
 
1564
  case 'ogimage':
1565
  $field = '_sq_fp_ogimage';
1566
  break;
1567
+ case 'canonical':
1568
+ $field = '_sq_canonical';
1569
+ break;
1570
  default:
1571
  $field = '_sq_fp_title';
1572
  }
1577
 
1578
  // Get the custom Squirrly meta
1579
  //////////////////////////////////////////
1580
+ $fields = array('_sq_fp_title' => '', '_sq_fp_description' => '', '_sq_fp_keywords' => '', '_sq_fp_ogimage' => '', '_sq_canonical' => '');
1581
 
1582
  $sql = "SELECT `meta_key`, `meta_value`
1583
  FROM `" . $wpdb->postmeta . "`
models/SQ_PostsList.php CHANGED
@@ -23,18 +23,9 @@ class Model_SQ_PostsList {
23
  }
24
 
25
  $graph = ''; //reset the graph
26
- if (isset($values->visits)) {
27
-
28
- if (!empty($values->visits)) {
29
- $data = array();
30
- $data[] = array('', __('Visits', _SQ_PLUGIN_NAME_));
31
- foreach ($values->visits as $key => $visit) {
32
- $data[] = array($key, (int) number_format_i18n($visit));
33
- }
34
- $graph = '<div class="sq_chart_title">' . __('monthly traffic', _SQ_PLUGIN_NAME_) . '</div><div id="sq_chart_' . $post_id . '" style="margin:0 auto; width:100px; height:40px;"></div><script>jQuery( document ).ready(function() {drawChart("sq_chart_' . $post_id . '", ' . json_encode($data) . ',false);});</script>';
35
- }
36
-
37
- $values = $graph . '<span class="sq_rank_column_button sq_show_more" ref="' . $post_id . '">' . __('See Analytics', _SQ_PLUGIN_NAME_) . '</span>';
38
  } else {
39
  $values = '<span class="sq_optimize" ref="' . $post_id . '">' . __('Optimize it with Squirrly to see the Analytics', _SQ_PLUGIN_NAME_) . '</span>';
40
  }
23
  }
24
 
25
  $graph = ''; //reset the graph
26
+ if (isset($values->optimized)) {
27
+ $progress = '<progress class="sq_post_progress" max="100" value="' . $values->optimized . '" title="' . __('Optimized:', _SQ_PLUGIN_NAME_) . ' ' . $values->optimized . '% ' . '" ></progress>';
28
+ $values = $progress . '<span class="sq_rank_column_button sq_show_more" ref="' . $post_id . '">' . __('See Analytics', _SQ_PLUGIN_NAME_) . '</span>';
 
 
 
 
 
 
 
 
 
29
  } else {
30
  $values = '<span class="sq_optimize" ref="' . $post_id . '">' . __('Optimize it with Squirrly to see the Analytics', _SQ_PLUGIN_NAME_) . '</span>';
31
  }
models/SQ_Sitemaps.php CHANGED
@@ -51,12 +51,13 @@ class Model_SQ_Sitemaps {
51
  $xml['priority'] = $this->frequency[SQ_Tools::$options['sq_sitemap_frequency']]['sitemap-home'][0];
52
  if ($post_id = get_option('page_on_front')) {
53
  if (SQ_Tools::$options['sq_sitemap_show']['images'] == 1) {
54
- if ($images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post_id)) {
55
  array_push($homes['contains'], 'image');
56
  $xml['image:image'] = array();
57
  foreach ($images as $image) {
58
- if (empty($image['src']))
59
  continue;
 
60
 
61
 
62
  $xml['image:image'][] = array(
@@ -80,6 +81,7 @@ class Model_SQ_Sitemaps {
80
  * @return type
81
  */
82
  public function getListPosts() {
 
83
  $posts = array();
84
  $posts['contains'] = array();
85
  if (have_posts()) {
@@ -100,12 +102,13 @@ class Model_SQ_Sitemaps {
100
  $xml['priority'] = $this->frequency[SQ_Tools::$options['sq_sitemap_frequency']][$this->type][0];
101
 
102
  if (SQ_Tools::$options['sq_sitemap_show']['images'] == 1) {
103
- if ($images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID)) {
104
  array_push($posts['contains'], 'image');
105
  $xml['image:image'] = array();
106
  foreach ($images as $image) {
107
- if (empty($image['src']))
108
  continue;
 
109
 
110
  $xml['image:image'][] = array(
111
  'image:loc' => $image['src'],
@@ -117,18 +120,19 @@ class Model_SQ_Sitemaps {
117
  }
118
 
119
  if (SQ_Tools::$options['sq_sitemap_show']['videos'] == 1) {
120
- $images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID);
121
  if (isset($images[0]['src']) && $videos = SQ_ObjController::getModel('SQ_Frontend')->getVideosFromContent($post->ID)) {
122
  array_push($posts['contains'], 'video');
123
  $xml['video:video'] = array();
124
 
125
  foreach ($videos as $video) {
126
- if ($video == '')
127
  continue;
 
128
 
129
  $xml['video:video'][$post->ID] = array(
130
- 'video:player_loc' => htmlentities($video),
131
- 'video:thumbnail_loc' => htmlentities($images[0]['src']),
132
  'video:title' => SQ_ObjController::getModel('SQ_Frontend')->clearTitle(SQ_ObjController::getModel('SQ_Frontend')->grabTitleFromPost($post->ID)),
133
  'video:description' => SQ_ObjController::getModel('SQ_Frontend')->clearDescription(SQ_ObjController::getModel('SQ_Frontend')->grabDescriptionFromPost($post->ID)),
134
  );
@@ -184,12 +188,13 @@ class Model_SQ_Sitemaps {
184
 
185
 
186
  if (SQ_Tools::$options['sq_sitemap_show']['images'] == 1) {
187
- if ($images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID)) {
188
  array_push($posts['contains'], 'image');
189
  $xml['image:image'] = array();
190
  foreach ($images as $image) {
191
- if (empty($image['src']))
192
  continue;
 
193
 
194
  $xml['image:image'][] = array(
195
  'image:loc' => $image['src'],
@@ -201,13 +206,14 @@ class Model_SQ_Sitemaps {
201
  }
202
 
203
  if (SQ_Tools::$options['sq_sitemap_show']['videos'] == 1) {
204
- $images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID);
205
  if (isset($images[0]['src']) && $videos = SQ_ObjController::getModel('SQ_Frontend')->getVideosFromContent($post->ID)) {
206
  array_push($posts['contains'], 'video');
207
  $xml['video:video'] = array();
208
  foreach ($videos as $video) {
209
- if ($video == '')
210
  continue;
 
211
 
212
  $xml['video:video'][$post->ID] = array(
213
  'video:player_loc' => $video,
@@ -343,10 +349,6 @@ class Model_SQ_Sitemaps {
343
  global $post;
344
 
345
  if (isset($post->ID)) {
346
- // if blog page look for last post date
347
- if ($post->post_type == 'page' && $this->is_home($post->ID))
348
- return get_lastmodified('GMT', 'post');
349
-
350
  if (empty($this->postmodified[$post->ID])) {
351
  $postmodified = get_post_modified_time('Y-m-d H:i:s', true, $post->ID);
352
  $options = get_option('post_types');
51
  $xml['priority'] = $this->frequency[SQ_Tools::$options['sq_sitemap_frequency']]['sitemap-home'][0];
52
  if ($post_id = get_option('page_on_front')) {
53
  if (SQ_Tools::$options['sq_sitemap_show']['images'] == 1) {
54
+ if ($images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post_id, true)) {
55
  array_push($homes['contains'], 'image');
56
  $xml['image:image'] = array();
57
  foreach ($images as $image) {
58
+ if (empty($image['src'])) {
59
  continue;
60
+ }
61
 
62
 
63
  $xml['image:image'][] = array(
81
  * @return type
82
  */
83
  public function getListPosts() {
84
+
85
  $posts = array();
86
  $posts['contains'] = array();
87
  if (have_posts()) {
102
  $xml['priority'] = $this->frequency[SQ_Tools::$options['sq_sitemap_frequency']][$this->type][0];
103
 
104
  if (SQ_Tools::$options['sq_sitemap_show']['images'] == 1) {
105
+ if ($images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID, true)) {
106
  array_push($posts['contains'], 'image');
107
  $xml['image:image'] = array();
108
  foreach ($images as $image) {
109
+ if (empty($image['src'])) {
110
  continue;
111
+ }
112
 
113
  $xml['image:image'][] = array(
114
  'image:loc' => $image['src'],
120
  }
121
 
122
  if (SQ_Tools::$options['sq_sitemap_show']['videos'] == 1) {
123
+ $images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID, true);
124
  if (isset($images[0]['src']) && $videos = SQ_ObjController::getModel('SQ_Frontend')->getVideosFromContent($post->ID)) {
125
  array_push($posts['contains'], 'video');
126
  $xml['video:video'] = array();
127
 
128
  foreach ($videos as $video) {
129
+ if ($video == '') {
130
  continue;
131
+ }
132
 
133
  $xml['video:video'][$post->ID] = array(
134
+ 'video:player_loc' => $video,
135
+ 'video:thumbnail_loc' => $images[0]['src'],
136
  'video:title' => SQ_ObjController::getModel('SQ_Frontend')->clearTitle(SQ_ObjController::getModel('SQ_Frontend')->grabTitleFromPost($post->ID)),
137
  'video:description' => SQ_ObjController::getModel('SQ_Frontend')->clearDescription(SQ_ObjController::getModel('SQ_Frontend')->grabDescriptionFromPost($post->ID)),
138
  );
188
 
189
 
190
  if (SQ_Tools::$options['sq_sitemap_show']['images'] == 1) {
191
+ if ($images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID, true)) {
192
  array_push($posts['contains'], 'image');
193
  $xml['image:image'] = array();
194
  foreach ($images as $image) {
195
+ if (empty($image['src'])) {
196
  continue;
197
+ }
198
 
199
  $xml['image:image'][] = array(
200
  'image:loc' => $image['src'],
206
  }
207
 
208
  if (SQ_Tools::$options['sq_sitemap_show']['videos'] == 1) {
209
+ $images = SQ_ObjController::getModel('SQ_Frontend')->getImagesFromContent($post->ID, true);
210
  if (isset($images[0]['src']) && $videos = SQ_ObjController::getModel('SQ_Frontend')->getVideosFromContent($post->ID)) {
211
  array_push($posts['contains'], 'video');
212
  $xml['video:video'] = array();
213
  foreach ($videos as $video) {
214
+ if ($video == '') {
215
  continue;
216
+ }
217
 
218
  $xml['video:video'][$post->ID] = array(
219
  'video:player_loc' => $video,
349
  global $post;
350
 
351
  if (isset($post->ID)) {
 
 
 
 
352
  if (empty($this->postmodified[$post->ID])) {
353
  $postmodified = get_post_modified_time('Y-m-d H:i:s', true, $post->ID);
354
  $options = get_option('post_types');
readme.txt CHANGED
@@ -2,20 +2,22 @@
2
  Contributors: cifi, calinvingan, florinmuresan
3
  Tags: seo,seo plugin,wordpress seo,seo optimization,seo content,plugin,content seo,search engine optimization,xml,sitemap,keyword,keyword research,post,posts,page,multisite,squirrly,wordpress,tag,image,images,photos,flickr,statistics,stats,google,content,title,description,favicon,mobile,canonical,author,google plus,analytics,admin,seo correction,seo title,seo meta,meta,google,twitter,news,blog,e-commerce,ecommerce,woocommerce,feed,feeds,marketing,buddypress,social,social media,url,automatic,iphone
4
  Requires at least: 3.5
5
- Tested up to: 4.2
6
  Stable tag: trunk
7
  Donate link: https://www.squirrly.co/wordpress-seo-by-squirrly
8
 
9
  SEO Plugin By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.
10
 
11
  == Description ==
12
- Squirrly SEO helps you write content that is SEO friendly and ALSO Human friendly. You'll get to improve your rankings, while providing your readers with great content. See Your SEO Stats, get a weekly SEO Audit and find some great keywords. It works well with wordpress sites that already have Yoast or All In One SEO. You can opt-in to keep those settings, so no need to start over again :-)
13
 
14
- Recommended by <a href="http://www.quicksprout.com/university/how-to-maximize-your-seo-traffic-with-these-must-have-wordpress-plugins/" >Neil Patel</a>, the co-founder of Kissmetrics and Crazy Egg. Also by Brian Dean and over 100 content marketing experts
 
 
15
 
16
  [youtube https://www.youtube.com/watch?v=mEjrE7TuDDc]
17
 
18
- See all the Squirrly SEO features at: http://howto.squirrly.co
19
 
20
  Based on the topic you're writing about, the interface will light up green while you're editing your text, so that you know you've done something right. When all the lights are green, you can publish it, because your text has excellent SEO and it's 100% optimized.
21
 
@@ -23,13 +25,13 @@ Different customers, from areas such as e-commerce, law firms, digital agencies,
23
 
24
  All-In-All: Squirrly SEO will help you get a tool that acts like an Expert Consultant, sitting right next to you, advising on SEO, and telling you where you need to improve.
25
 
26
- The best things is: YOU DON'T have to be an SEO expert to use it. Wait, you don't even need to know about all that. Squirrly will help you write great content, will show you where your wordpress needs improvements and it will even help you learn all about content marketing and seo strategies through email trainings.
27
 
28
- Squirrly is a Freemium software, like MailChimp.
29
 
30
  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 audit report. When you'll require more, you can pay for the PRO Plan.
31
 
32
- - <strong>Gives You SEO Advice as you're typing your articles.</strong> Squirrly helps you in real time to optimize your articles to 100%, while you are writing or editing them.
33
 
34
  - <strong>Green lights turn on everytime you do something right.</strong> When all the lights turn green, you can publish or schedule the article because it has excellent seo.
35
 
@@ -55,7 +57,7 @@ You’ll start with the free version of Squirrly SEO. It will help you if you ha
55
 
56
  - <strong>Write Better Content.</strong> We help you build up seo content that is also great-to-read for Human readers and helps you build up some valuable and subtle SEO.
57
 
58
- - <strong>Stay up to date with your SEO and Social Signals, with our Email Alerts</strong>. We send out email alerts if something on your wordpress site needs immediate attention, so that you can act upon it and save your business the trouble.
59
 
60
  - <strong>Copyright-Free Images That You Can Use.</strong>
61
 
@@ -63,13 +65,14 @@ You’ll start with the free version of Squirrly SEO. It will help you if you ha
63
 
64
  - <strong>Social Intelligence through the Inspiration Box, to help you write better content. Shows you recent tweets about your subject, how other journalists and bloggers have approached your topic. All of this in your "Add New Post" interface.</strong>
65
 
66
- You can use Squirrly SEO for free and 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.
67
 
68
  Once you start having bigger content marketing and SEO needs (more than one article posted per week), you can go PRO. Read more about it in the FAQ section.
69
 
70
- <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>
71
-
72
  <h3>Reviews</h3>
 
 
 
73
  * <em>"You can be confident that without ever leaving your Add New Blog page you have a strong keyword, good and current content, and your post will be 100% optimized for the search engines."</em> - <strong>Jason Fox Marketing</strong>
74
 
75
  * <em>"Features that exceed the stereotypical plugin"</em> - <strong>Robert, Yieldkit</strong>
@@ -78,23 +81,21 @@ Once you start having bigger content marketing and SEO needs (more than one arti
78
 
79
  * <em>"Great SEO info at a click"</em>
80
 
81
- <strong>You can read reviews from Internet Marketing experts on http://www.squirrly.co/reviews</strong>
82
-
83
- Over 820,000 Downloads. Our startup consists of 7 content marketing professionals dedicated to making Squirrly an amazing piece of software and writing great training materials to help you be successful and stay successful.
84
 
85
- Over 120 Content Marketing Experts have reviewed our wordpress SEO plugin and loved it.
86
 
87
- Over 650 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.
88
 
89
- over +285% increase in traffic to over 36,500 survey participants.
90
 
91
- Recently our team grew to 7 people
92
 
93
- More than helping you with your internet marketing efforts, we strive to offer Excellence in Customer Service.
94
 
95
- - 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)
96
 
97
- - you'll be able to get support from us from the plugin, from our Facebook, our Twitter, email and we can even schedule a Skype call, if fixes are needed
98
 
99
  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.
100
 
@@ -104,11 +105,10 @@ We're glad to have you,
104
  Florin Muresan
105
  CEO of Squirrly
106
 
107
-
108
- See all the Features of our product on the <a href="/extend/plugins/squirrly-seo/faq/" title="Squirrly WordPress SEO"> FAQ Section </a>.
109
 
110
  <a href="/extend/plugins/squirrly-seo/screenshots/" title="Squirrly SEO Plugin">Check our screenshots</a>
111
- | <a href="http://www.squirrly.co/wordpress-seo-by-squirrly" title="Squirrly SEO" target="_blank">Go to our official site</a> | Free Version (if you install from the WP directory) OR <a href="http://www.squirrly.co/pricing" title="See Pricing" target="_blank">Pricing Plans</a>
112
 
113
  == Installation ==
114
  1. Log In as an Admin on your WordPress blog.
@@ -119,7 +119,7 @@ See all the Features of our product on the <a href="/extend/plugins/squirrly-seo
119
  6. After the upload is finished, click Activate Plugin.
120
  7. Good. Now enter your email to connect with Squirrly.co
121
  8. Then click "Write a New Post with Squirrly Seo".
122
- 9. Done. Start getting Excellent SEO on wordpress
123
  10. The Email Lessons will help you become a great content marketer. Our content Marketing Class on Udemy has over 600 students and the price is $147. You're getting all that for free, by email.
124
 
125
  Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
@@ -135,8 +135,73 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
135
 
136
 
137
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  = 5.1.2 =
139
- * Added new features in Open Graph for the posts/pages
140
  * Added the SEO Settings Backup and Restore
141
  * Improved the SEO Live Assistant to recognize more languages and chars
142
  * Improved the communication with the API Server
@@ -170,7 +235,7 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
170
  * Compatible with WP 4.2.1
171
 
172
  = 5.0.0 =
173
- * Changed Squirrly look
174
  * Compatible with WP eCommerce plugin
175
  * Made SEO improvements for Woocommerce plugin
176
  * Interactive learning for the entire Squirrly SEO plugin
@@ -207,9 +272,6 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
207
  * Fixed Open Graph for Home Page
208
  * Fixed empty description for the Woocommerce shop page
209
 
210
- = 3.4.1 =
211
- * Compatible with WP 4.0.1
212
-
213
  = 3.3.9 =
214
  * Fixed SEO snippet preview compatibility with the WP 4.0
215
 
@@ -270,16 +332,9 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
270
  * Fixed Audit broken link
271
  * Fixed Rank check issues for some situations
272
 
273
- = 3.2.2 =
274
- * Added the Custom Open Graph Image upload in Squirrly Snippet
275
- * Speed improvements
276
-
277
  = 3.2.1 =
278
  * Improved SEO Stats for Google Rankings by Country
279
- * SEO Settings out-of-the-box, but also works awesome if you have the settings already done with All In One SEO or Yoast (wordpress seo)
280
-
281
- = 3.2 =
282
- * Fixed serp check rate to prevent IP block
283
 
284
  = 3.1.9 =
285
  * Fixed css issues for some cases
@@ -290,13 +345,6 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
290
  * Changed the cron rate for serp search
291
  * Added force recheck for google rank in SEO Analytics
292
 
293
- = 3.1.6 =
294
- * Compatible with WP 3.9.1
295
-
296
- = 3.1.5 =
297
- * Fixed cache issues
298
- * Fixed login/sign-up jQuery conflicts
299
-
300
  = 3.1.4 =
301
  * Removed the traffic monitor (to increase the site speed and analytics)
302
 
@@ -318,22 +366,18 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
318
  * Added Google SEO Rank Column in Squirrly SEO > Performance Analytics
319
  * Added Google Country Select in Squirrly SEO > Settings
320
 
321
- = 3.0.0 =
322
- * Added a new look in Squirrly SEO Settings
323
- * Added the new dashboard tab in Squirrly Menu
324
- * Added the traffic date information in Squirrly SEO Analytics
325
- * Fixed the Favicon issue for PNG images
326
-
327
-
328
  == Credits ==
329
  Florin Muresan - CEO at Squirrly
330
  Calin Vingan - CTO at Squirrly
331
  Andreea Leau - VP Marketing
332
  Cristina Leau - Squirrly mascot designer
333
  Alexandra Nicola - Content Writer, future COO
 
 
334
  Teodora Vingan - SEO Analyser
335
  Ana Darstaru - Chief of Customer Service
336
- Teo - SEO Consultant
 
337
 
338
  Investors:
339
  Ibrahim Evsan, serial entrepreneur, one of the best known bloggers in Germany
@@ -348,11 +392,10 @@ You'll be able to use this seo software once you install the plugin and use your
348
 
349
  For higher content marketing and SEO needs, you can check our Official Site and see what the PRO Plan offers.
350
 
351
-
352
- == Frequently Asked Questions ==
353
- = I can't log into the wordpress with my user. Get the message 'An error occured.' What can I do? =
354
  I see that your host server is not letting you to access our remote API.
355
- Please tell your web master to add the IP 144.76.66.106 in the white-list for remote access and it should work.
356
 
357
  = How does Squirrly WordPress SEO Plugin work? =
358
  Neil Patel, the Co-Founder of Kissmetrics and Crazy Egg made a great video on how to use Squirrly's Live Assistant:
@@ -361,19 +404,21 @@ http://www.quicksprout.com/university/how-to-maximize-your-seo-traffic-with-thes
361
  = How does the META Description work in Squirrly SEO Optimization? =
362
  Based on your article, Squirrly will find the most relevant text and add it in the META Description.
363
 
364
- You can opt-in to use the Advanced SEO Settings, which will allow you to customize how the META Title and Description will be. All while writing or editing your article.
365
 
366
  = Is Squirrly SEO Plugin free? =
367
  Yes, you just have to install the plugin from the WP directory into your site. Then connect with your email to Squirrly. The Free Version will automatically start. Read below for more. Once you have bigger content marketing needs, you can opt-in to upgrade to the PRO Plan.
368
 
369
  = Does the Free Plan offer all the features? =
370
- As of January 2015 the free plan will include the Lite version of our features. The paid version will open the Full version of our features. The free version has all a small wordpress site or blog needs to get started with SEO and Content Marketing. These are the blogs on which owners want to publish about 5 articles / month. Also includes a general Audit of their whole site and want to see the SEO analytics for their last posts.
371
 
372
  = What about the PRO Plan? =
373
- The PRO Plan is for those with bigger content marketing and SEO needs. For anything regarding the paid plans, go to our website: squirrly.co | The wordpress directory listing is only to be used for concerns regarding the Free version. You can get the PRO Plan after you've installed the plugin from this directory.
 
 
374
 
375
  = Can I use squirrly seo on mobile? =
376
- Yes, on IOS and ANDROID, it works both through the browser and wordpress app
377
 
378
  = Can I use the images, tweets and articles given by the Inspiration Box? Are there any legal concerns? =
379
  Yes, you can use the tweets and the paragraphs in your articles. They contain a link to the source and are perfectly legal to use. Of course, for the
@@ -389,13 +434,13 @@ All of the features that we offer have been built having the customer's best int
389
  and we've proven time and again that we are a great team that knows all there is to know about good *SEO automation*. We had a community of 20,000 blogs that all
390
  used our SEO techniques, and they have gotten lots of hits from search engines due to our optimization. Now we offer the same quality for you:
391
 
392
- [UPDATE] Squirrly now has over 500,000 downloads, so we've been offering great software for over a year now.
393
 
394
  - SEO Advice as you're typing your articles
395
  - Advice in real time from the SEO Live Assistant on how to write better content for your Human readers
396
  - Weekly SEO Audit report, that shows you how well you did on: Blogging, Traffic, Links, SEO, Social Media and Authority
397
  - Lots of advice in the reports for how you can fix each section
398
- - Keyword Research and Analysis (that takes data from both SEMrush AND social media)
399
  - Monitors your Site's Progress
400
  - SEO Analytics for each post or page
401
  - Shows you rank in Google
@@ -414,7 +459,7 @@ used our SEO techniques, and they have gotten lots of hits from search engines d
414
  - Adds the icon for Apple Devices
415
  - Google Analytics setup support
416
  - Google Webmaster Tools setup support
417
- - Google Authorship
418
  - Google+ URL
419
  - Bing META Code support
420
  - Facebook META Code support
@@ -422,8 +467,8 @@ used our SEO techniques, and they have gotten lots of hits from search engines d
422
  - adds the correct seo description and seo keywords in all pages
423
  - adds canonical link in all pages
424
  - adds the XML Sitemap for search engines: /sitemap.xml
425
- - PING the XML Sitemap in google blogs
426
- - adds the required METAs for home page (icon, author, language, dc publisher, etc.)
427
  - adds the favicon and the icon for Apple devices.
428
  - Support for Custom Post Types
429
  - Fine tune Page Navigational Links
@@ -434,25 +479,21 @@ used our SEO techniques, and they have gotten lots of hits from search engines d
434
  - For beginners, all these settings are made automatically to get the best SEO possible.
435
  - For advanced users, you can fine-tune everything.
436
  - You can override any title and set any META description and any META keywords you want.
437
- - Real Time Snippet Preview
438
- - Integrated with other Ecommerce Plugins like WooCommerce, MarketPress, Ready!, Shopp
439
  - Compatibility with all the other plugins, like Auto Meta, Ultimate Tag Warrior and others.
 
 
440
 
441
  And the best ones that we have (and the others don't):
442
-
443
- - *Keyword research and Analysis*: find the keywords that are easier to rank for
444
- - *SEO Live Assistant*: Your WordPress gives you SEO adivce as you type or Edit your article
445
  - *Inspiration box*: get images you can use for free, tweets you can quote and get up to date with latest news about your subject
446
  - *SEO Rank*: Measure and Monitor the impact of SEO and Social Signals for each of your articles
447
 
448
  = Where can I enter the title and page description? =
449
- If you click the Squirrly tab in your dashboard, go to the "First Page Optimization" section and switch to Custom. You can enter custom Title, Description and Keywords.
450
- If you are an advanced user then in each post/page edit you can customize the title and description from snippet section
451
 
452
- = Is this wordpress seo plugin the only seo plugin I will need to install? =
453
- It all depends on how you have setup your wordpress until now. Some people use Squirrly seo plugin only for the Content Optimization with the Live Assistant part, some use use it to check their SEO stats and see where they need to improve their wordpress seo, but most of our users and customer use Squirrly for everything related to SEO: from keyword analysis, to seo settings on wordpress, to analytics and to weekly monitoring and audit reports.
454
 
455
- == Upgrade Notice ==
456
-
457
- = 5.0.0 =
458
- 5.1.0 is an important update. Different Squirrly look. Compatible with eCommerce plugins. Added interactive learning features. Added robots.txt and sitemap.xml for multisites. Added the JSON-LD. Option to show Squirrly for selected Post Types and more.
2
  Contributors: cifi, calinvingan, florinmuresan
3
  Tags: seo,seo plugin,wordpress seo,seo optimization,seo content,plugin,content seo,search engine optimization,xml,sitemap,keyword,keyword research,post,posts,page,multisite,squirrly,wordpress,tag,image,images,photos,flickr,statistics,stats,google,content,title,description,favicon,mobile,canonical,author,google plus,analytics,admin,seo correction,seo title,seo meta,meta,google,twitter,news,blog,e-commerce,ecommerce,woocommerce,feed,feeds,marketing,buddypress,social,social media,url,automatic,iphone
4
  Requires at least: 3.5
5
+ Tested up to: 4.4
6
  Stable tag: trunk
7
  Donate link: https://www.squirrly.co/wordpress-seo-by-squirrly
8
 
9
  SEO Plugin By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.
10
 
11
  == Description ==
12
+ Squirrly SEO helps you write content that is SEO friendly and ALSO Human friendly. You'll get to improve your rankings, while providing your readers with great content. See Your SEO Stats, get a weekly SEO Audit and find the best keywords.
13
 
14
+ It works well with Wordpress sites that already have <strong>Yoast</strong> or <strong>All In One SEO</strong>. You can opt-in to keep those settings, so no need to start over again :-)
15
+
16
+ Recommended by <strong><a href="http://www.quicksprout.com/university/how-to-maximize-your-seo-traffic-with-these-must-have-wordpress-plugins/" >Neil Patel</a></strong>, the co-founder of Kissmetrics and Crazy Egg. Also by <strong>Brian Dean</strong> and over 100 content marketing experts
17
 
18
  [youtube https://www.youtube.com/watch?v=mEjrE7TuDDc]
19
 
20
+ See all the Squirrly SEO 2016 features at: http://howto.squirrly.co/category/sides/
21
 
22
  Based on the topic you're writing about, the interface will light up green while you're editing your text, so that you know you've done something right. When all the lights are green, you can publish it, because your text has excellent SEO and it's 100% optimized.
23
 
25
 
26
  All-In-All: Squirrly SEO will help you get a tool that acts like an Expert Consultant, sitting right next to you, advising on SEO, and telling you where you need to improve.
27
 
28
+ The best things is: YOU DON'T have to be an SEO expert to use it. Wait, you don't even need to know about all that. Squirrly will help you write great content, will show you where your Wordpress needs improvements and it will even help you learn all about content marketing and seo strategies through email trainings.
29
 
30
+ Squirrly SEO is a Freemium software, like MailChimp.
31
 
32
  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 audit report. When you'll require more, you can pay for the PRO Plan.
33
 
34
+ -<strong>Gives You SEO Advice as you're typing your articles.</strong> Squirrly helps you in real time to optimize your articles to 100%, while you are writing or editing them.
35
 
36
  - <strong>Green lights turn on everytime you do something right.</strong> When all the lights turn green, you can publish or schedule the article because it has excellent seo.
37
 
57
 
58
  - <strong>Write Better Content.</strong> We help you build up seo content that is also great-to-read for Human readers and helps you build up some valuable and subtle SEO.
59
 
60
+ - <strong>Stay up to date with your SEO and Social Signals, with our Email Alerts</strong>. We send out email alerts if something on your Wordpress site needs immediate attention, so that you can act upon it and save your business the trouble.
61
 
62
  - <strong>Copyright-Free Images That You Can Use.</strong>
63
 
65
 
66
  - <strong>Social Intelligence through the Inspiration Box, to help you write better content. Shows you recent tweets about your subject, how other journalists and bloggers have approached your topic. All of this in your "Add New Post" interface.</strong>
67
 
68
+ You can use Squirrly SEO for FREE and 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.
69
 
70
  Once you start having bigger content marketing and SEO needs (more than one article posted per week), you can go PRO. Read more about it in the FAQ section.
71
 
 
 
72
  <h3>Reviews</h3>
73
+
74
+ * <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>
75
+
76
  * <em>"You can be confident that without ever leaving your Add New Blog page you have a strong keyword, good and current content, and your post will be 100% optimized for the search engines."</em> - <strong>Jason Fox Marketing</strong>
77
 
78
  * <em>"Features that exceed the stereotypical plugin"</em> - <strong>Robert, Yieldkit</strong>
81
 
82
  * <em>"Great SEO info at a click"</em>
83
 
84
+ <strong>You can read reviews from Internet Marketing experts on http://howto.squirrly.co/testimonials/</strong>
 
 
85
 
86
+ Over 1,000,000 Downloads. Our startup consists of 10 content marketing professionals dedicated to making Squirrly an amazing piece of software and writing great training materials to help you be successful and stay successful.
87
 
88
+ Over 550 Content Marketing Experts have reviewed our Wordpress SEO plugin and loved it.
89
 
90
+ Over 2500 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.
91
 
92
+ over +285% increase in traffic to over 49,000 survey participants.
93
 
94
+ Recently our team grew to 10 people. More than helping you with your internet marketing efforts, we strive to offer Excellence in Customer Service.
95
 
96
+ * 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)
97
 
98
+ * you'll be able to get support from us from the plugin, from our Facebook, our Twitter, email and we can even schedule a Skype call, if fixes are needed
99
 
100
  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.
101
 
105
  Florin Muresan
106
  CEO of Squirrly
107
 
108
+ See all the Features of our product on the <a href="http://howto.squirrly.co/category/sides/" title="Squirrly WordPress SEO"> All Squirrly SEO Features </a>.
 
109
 
110
  <a href="/extend/plugins/squirrly-seo/screenshots/" title="Squirrly SEO Plugin">Check our screenshots</a>
111
+ | <a href="http://howto.squirrly.co/" title="Squirrly SEO" target="_blank">Go to our official site</a> | Free Version (if you install from the WP directory) OR <a href="http://howto.squirrly.co/squirrly-pricing-plans/" title="See Pricing" target="_blank">Pricing Plans</a>
112
 
113
  == Installation ==
114
  1. Log In as an Admin on your WordPress blog.
119
  6. After the upload is finished, click Activate Plugin.
120
  7. Good. Now enter your email to connect with Squirrly.co
121
  8. Then click "Write a New Post with Squirrly Seo".
122
+ 9. Done. Start getting Excellent SEO on Wordpress
123
  10. The Email Lessons will help you become a great content marketer. Our content Marketing Class on Udemy has over 600 students and the price is $147. You're getting all that for free, by email.
124
 
125
  Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
135
 
136
 
137
  == Changelog ==
138
+ = 5.2.8 =
139
+ * Fixed the compatibility issue in Performance Analytics
140
+ * Added twitter summary for large images
141
+ * Compatible with WP 4.4
142
+
143
+ = 5.2.7 =
144
+ * Added Squirrly SEO Canonical Link in Post Edit page
145
+ * Added Norway country in Google Rank Option
146
+ * Set the Squirrly SEO Snippet OG image as shared image
147
+ * Set Squirrly SEO Live Assistant to work with more multilanguage plugins
148
+ * Fixed the images in Squirrly Inspiration Box
149
+
150
+
151
+ = 5.2.6 =
152
+ * Compatible with Smart Security Tools plugin
153
+ * Added the google.ee in Squirrly Rank Option
154
+ * Fixed the Squirrly SEO Keyword not to be added in Tags if is switched off in Squirrly > Settings
155
+
156
+ = 5.2.5 =
157
+ * Improved the Squirrly SEO Keyword Research
158
+ * Fixed the sitemap.xml with videos included
159
+ * Changed to relative url in sitemap.xml for multisites
160
+
161
+ = 5.2.3 =
162
+ * Compatible with Wordpress 4.3.1
163
+ * Fixed the Seo Live Assistant to verify keywords with commas
164
+ * Fixed the Seo Live Assistant to work with HTTPS dashboard for Wikis and Keyword suggestion
165
+ * Fixed the OG:image:width issue when the width is null
166
+ * Fixed the HTTPS connection when the general settings are not set correctly
167
+ * Fixed minor bug
168
+ * Updated to the last on-page SEO requirements
169
+ * Increased the Squirrly speed in post editor
170
+
171
+
172
+ = 5.2.2 =
173
+ * Add the last google updates for JSON-LD Structured Data
174
+ * Make sitemap.xml work for a large number of articles
175
+
176
+ = 5.2.1 =
177
+ * Compatible with Wordpress 4.3
178
+ * Fixed the Head Buffer for some themes
179
+
180
+ = 5.2.0 =
181
+ * Compatible with Wordpress 4.2.4
182
+ * Added 17 more languages in Squirrly SEO Keyword Research
183
+ * Added the focused language for Social Media in Squirrly > SEO
184
+ * Added Squirrly SEO Performance Analytics in custom post types selected from Squirrly SEO > Settings
185
+ * Add top menu link for Rank check
186
+
187
+ = 5.1.6 =
188
+ * Compatible with WP 4.2.3
189
+ * Improved the rank check to prevent Google temporary IP block
190
+ * Improved the plugin speed in backend
191
+ * Fixed the Incorrect Hreflang META implementation
192
+ * Add the optimization progress bar in the post/page list
193
+ * Fixed the restore the settings from backup validator
194
+
195
+ = 5.1.4 =
196
+ * Fixed the Google Rank check cron
197
+
198
+ = 5.1.3 =
199
+ * Fixed the Open Graph META for Locale en_CA
200
+ * Fixed the sitemap_pages.xml for loading slow when looking over videos
201
+ * Fixed the favicon.ico rewrite for non multisite wordpress
202
+
203
  = 5.1.2 =
204
+ * Added new features in Open Graph for the Posts/Pages
205
  * Added the SEO Settings Backup and Restore
206
  * Improved the SEO Live Assistant to recognize more languages and chars
207
  * Improved the communication with the API Server
235
  * Compatible with WP 4.2.1
236
 
237
  = 5.0.0 =
238
+ * Changed Squirrly SEO look
239
  * Compatible with WP eCommerce plugin
240
  * Made SEO improvements for Woocommerce plugin
241
  * Interactive learning for the entire Squirrly SEO plugin
272
  * Fixed Open Graph for Home Page
273
  * Fixed empty description for the Woocommerce shop page
274
 
 
 
 
275
  = 3.3.9 =
276
  * Fixed SEO snippet preview compatibility with the WP 4.0
277
 
332
  * Fixed Audit broken link
333
  * Fixed Rank check issues for some situations
334
 
 
 
 
 
335
  = 3.2.1 =
336
  * Improved SEO Stats for Google Rankings by Country
337
+ * SEO Settings out-of-the-box, but also works awesome if you have the settings already done with All In One SEO or Yoast (Wordpress seo)
 
 
 
338
 
339
  = 3.1.9 =
340
  * Fixed css issues for some cases
345
  * Changed the cron rate for serp search
346
  * Added force recheck for google rank in SEO Analytics
347
 
 
 
 
 
 
 
 
348
  = 3.1.4 =
349
  * Removed the traffic monitor (to increase the site speed and analytics)
350
 
366
  * Added Google SEO Rank Column in Squirrly SEO > Performance Analytics
367
  * Added Google Country Select in Squirrly SEO > Settings
368
 
 
 
 
 
 
 
 
369
  == Credits ==
370
  Florin Muresan - CEO at Squirrly
371
  Calin Vingan - CTO at Squirrly
372
  Andreea Leau - VP Marketing
373
  Cristina Leau - Squirrly mascot designer
374
  Alexandra Nicola - Content Writer, future COO
375
+ Tim - Content Writer
376
+ Lynn Silva - Content Writer
377
  Teodora Vingan - SEO Analyser
378
  Ana Darstaru - Chief of Customer Service
379
+ Lucian Nertan - VP of Agency
380
+ Sorel Nagy- Developer
381
 
382
  Investors:
383
  Ibrahim Evsan, serial entrepreneur, one of the best known bloggers in Germany
392
 
393
  For higher content marketing and SEO needs, you can check our Official Site and see what the PRO Plan offers.
394
 
395
+ == Frequently Asked Questions ==
396
+ = I can't log into the Wordpress with my user. Get the message 'An error occured.' What can I do? =
 
397
  I see that your host server is not letting you to access our remote API.
398
+ Please tell your web master to add the IPs 144.76.66.106 and 176.9.112.210 in the white-list for remote access and it should work.
399
 
400
  = How does Squirrly WordPress SEO Plugin work? =
401
  Neil Patel, the Co-Founder of Kissmetrics and Crazy Egg made a great video on how to use Squirrly's Live Assistant:
404
  = How does the META Description work in Squirrly SEO Optimization? =
405
  Based on your article, Squirrly will find the most relevant text and add it in the META Description.
406
 
407
+ You can opt-in to use the Squirrly Snippet in the Post/Page editor, which will allow you to customize how the META Title and Description will be. All while writing or editing your article.
408
 
409
  = Is Squirrly SEO Plugin free? =
410
  Yes, you just have to install the plugin from the WP directory into your site. Then connect with your email to Squirrly. The Free Version will automatically start. Read below for more. Once you have bigger content marketing needs, you can opt-in to upgrade to the PRO Plan.
411
 
412
  = Does the Free Plan offer all the features? =
413
+ As of January 2015 the free plan will include the Lite version of our features. The paid version will open the PRO features. The free version has all a small Wordpress site or blog needs to get started with SEO and Content Marketing. These are the blogs on which owners want to publish about 5 articles / month. Also includes a general Audit of their whole site and want to see the SEO analytics for their last posts.
414
 
415
  = What about the PRO Plan? =
416
+ The PRO Plan is for those with bigger content marketing and SEO needs. For anything regarding the paid plans, go to our website: http://howto.squirrly.co/squirrly-pricing-plans/
417
+
418
+ The Wordpress directory listing is only to be used for concerns regarding the Free version. You can get the PRO Plan after you've installed the plugin from this directory.
419
 
420
  = Can I use squirrly seo on mobile? =
421
+ Yes, on IOS and ANDROID, it works both through the browser and Wordpress app
422
 
423
  = Can I use the images, tweets and articles given by the Inspiration Box? Are there any legal concerns? =
424
  Yes, you can use the tweets and the paragraphs in your articles. They contain a link to the source and are perfectly legal to use. Of course, for the
434
  and we've proven time and again that we are a great team that knows all there is to know about good *SEO automation*. We had a community of 20,000 blogs that all
435
  used our SEO techniques, and they have gotten lots of hits from search engines due to our optimization. Now we offer the same quality for you:
436
 
437
+ [UPDATE] Squirrly now has over 1,000,000 downloads, so we've been offering great software for over two years now.
438
 
439
  - SEO Advice as you're typing your articles
440
  - Advice in real time from the SEO Live Assistant on how to write better content for your Human readers
441
  - Weekly SEO Audit report, that shows you how well you did on: Blogging, Traffic, Links, SEO, Social Media and Authority
442
  - Lots of advice in the reports for how you can fix each section
443
+ - Keyword Research and Analysis (that takes data from both SEMrush AND Social Media)
444
  - Monitors your Site's Progress
445
  - SEO Analytics for each post or page
446
  - Shows you rank in Google
459
  - Adds the icon for Apple Devices
460
  - Google Analytics setup support
461
  - Google Webmaster Tools setup support
462
+ - Google Json-LD Structured data
463
  - Google+ URL
464
  - Bing META Code support
465
  - Facebook META Code support
467
  - adds the correct seo description and seo keywords in all pages
468
  - adds canonical link in all pages
469
  - adds the XML Sitemap for search engines: /sitemap.xml
470
+ - PING the XML Sitemap in google and bing
471
+ - adds the required METAs for home page (icon, author, language, dc publisher, hreflang, etc.)
472
  - adds the favicon and the icon for Apple devices.
473
  - Support for Custom Post Types
474
  - Fine tune Page Navigational Links
479
  - For beginners, all these settings are made automatically to get the best SEO possible.
480
  - For advanced users, you can fine-tune everything.
481
  - You can override any title and set any META description and any META keywords you want.
482
+ - Real Time Snippet Preview (checks the frontend of each article, not just a preview)
483
+ - Integrated with other Ecommerce Plugins like WooCommerce, WP Ecommerce, MarketPress, Ready!, Shopp
484
  - Compatibility with all the other plugins, like Auto Meta, Ultimate Tag Warrior and others.
485
+ - Works best with multisites
486
+ - SEO error check and fix the META duplicates
487
 
488
  And the best ones that we have (and the others don't):
489
+ - *Keyword research and SEO Analysis*: find the keywords that are easier to rank for
490
+ - *SEO Live Assistant*: Your WordPress gives you SEO advice as you type or Edit your article
 
491
  - *Inspiration box*: get images you can use for free, tweets you can quote and get up to date with latest news about your subject
492
  - *SEO Rank*: Measure and Monitor the impact of SEO and Social Signals for each of your articles
493
 
494
  = Where can I enter the title and page description? =
495
+ If you click the Squirrly tab in your dashboard, go to the "First Page Optimization" section and switch the Title and Description option on. You can enter custom Title, Description and Keywords.
 
496
 
497
+ = Is this Wordpress SEO plugin the only SEO plugin I will need to install? =
498
+ It all depends on how you have setup your Wordpress until now. Some people use Squirrly seo plugin only for the Content Optimization with the Live Assistant part, some use use it to check their SEO stats and see where they need to improve their Wordpress seo, but most of our users and customer use Squirrly for everything related to SEO: from keyword analysis, to seo settings on Wordpress, to analytics and to weekly monitoring and audit reports.
499
 
 
 
 
 
squirrly.php CHANGED
@@ -8,12 +8,12 @@
8
  Plugin URI: http://www.squirrly.co
9
  Description: SEO Plugin 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>
10
  Author: cifi, calinvingan, florinmuresan
11
- Version: 5.1.2
12
  Author URI: http://www.squirrly.co
13
  */
14
 
15
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
16
- define('SQ_VERSION', '5.1.2');
17
  /* Call config files */
18
  if (file_exists(dirname(__FILE__) . '/config/config.php')) {
19
  require(dirname(__FILE__) . '/config/config.php');
@@ -26,9 +26,6 @@ if (file_exists(dirname(__FILE__) . '/config/config.php')) {
26
  if (is_admin()) {
27
  require_once(_SQ_CLASSES_DIR_ . 'SQ_BlockController.php');
28
  SQ_ObjController::getController('SQ_FrontController', false)->run();
29
- add_action('sq_processCron', array(SQ_ObjController::getController('SQ_Ranking', false), 'processCron'));
30
- add_action('sq_processPing', array(SQ_ObjController::getController('SQ_Sitemaps'), 'processCron'));
31
- add_action('sq_processApi', array(SQ_ObjController::getController('SQ_Post'), 'processCron'));
32
 
33
  /**
34
  * Upgrade Squirrly call.
@@ -38,7 +35,11 @@ if (file_exists(dirname(__FILE__) . '/config/config.php')) {
38
  } else {
39
  SQ_ObjController::getController('SQ_FrontController', false);
40
  SQ_ObjController::getController('SQ_Frontend');
 
41
  }
 
 
 
42
  } else {
43
  /* Main class call */
44
  add_action('admin_init', 'sq_phpError');
8
  Plugin URI: http://www.squirrly.co
9
  Description: SEO Plugin 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>
10
  Author: cifi, calinvingan, florinmuresan
11
+ Version: 5.2.8
12
  Author URI: http://www.squirrly.co
13
  */
14
 
15
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
16
+ define('SQ_VERSION', '5.2.8');
17
  /* Call config files */
18
  if (file_exists(dirname(__FILE__) . '/config/config.php')) {
19
  require(dirname(__FILE__) . '/config/config.php');
26
  if (is_admin()) {
27
  require_once(_SQ_CLASSES_DIR_ . 'SQ_BlockController.php');
28
  SQ_ObjController::getController('SQ_FrontController', false)->run();
 
 
 
29
 
30
  /**
31
  * Upgrade Squirrly call.
35
  } else {
36
  SQ_ObjController::getController('SQ_FrontController', false);
37
  SQ_ObjController::getController('SQ_Frontend');
38
+
39
  }
40
+
41
+ add_action('sq_processCron', array(SQ_ObjController::getController('SQ_Ranking', false), 'processCron'));
42
+ add_action('sq_processApi', array(SQ_ObjController::getController('SQ_Post'), 'processCron'));
43
  } else {
44
  /* Main class call */
45
  add_action('admin_init', 'sq_phpError');
themes/default/SQ_BlockSettings.php CHANGED
@@ -112,6 +112,16 @@
112
  </div>
113
 
114
 
 
 
 
 
 
 
 
 
 
 
115
  </div>
116
  </fieldset>
117
 
@@ -153,6 +163,7 @@
153
  <option value="com.do"><?php _e('Dominican Republic', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.do/)</option>
154
  <option value="com.ec"><?php _e('Ecuador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ec/)</option>
155
  <option value="com.sv"><?php _e('El Salvador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.sv/)</option>
 
156
  <option value="fm"><?php _e('Federated States of Micronesia', _SQ_PLUGIN_NAME_); ?> (http://www.google.fm/)</option>
157
  <option value="com.fj"><?php _e('Fiji', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.fj/)</option>
158
  <option value="fi"><?php _e('Finland', _SQ_PLUGIN_NAME_); ?> (http://www.google.fi/)</option>
@@ -194,6 +205,7 @@
194
  <option value="co.nz"><?php _e('New Zealand', _SQ_PLUGIN_NAME_); ?> (http://www.google.co.nz/)</option>
195
  <option value="com.ni"><?php _e('Nicaragua', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ni/)</option>
196
  <option value="com.nf"><?php _e('Norfolk Island', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.nf/)</option>
 
197
  <option value="com.pk"><?php _e('Pakistan', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.pk/)</option>
198
  <option value="com.pa"><?php _e('Panamá', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.pa/)</option>
199
  <option value="com.py"><?php _e('Paraguay', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.py/)</option>
112
  </div>
113
 
114
 
115
+ <div class="sq_option_content">
116
+ <div class="sq_switch">
117
+ <input id="sq_url_fix1" type="radio" class="sq_switch-input" name="sq_url_fix" value="1" <?php echo ((SQ_Tools::$options['sq_url_fix'] == 1) ? "checked" : '') ?> />
118
+ <label for="sq_url_fix1" class="sq_switch-label sq_switch-label-off"><?php _e('Yes', _SQ_PLUGIN_NAME_); ?></label>
119
+ <input id="sq_url_fix0" type="radio" class="sq_switch-input" name="sq_url_fix" value="0" <?php echo ((SQ_Tools::$options['sq_url_fix'] == 0) ? "checked" : '') ?> />
120
+ <label for="sq_url_fix0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
121
+ <span class="sq_switch-selection"></span>
122
+ </div>
123
+ <span><?php _e('Correct my <strong>feed links</strong> and <strong>images</strong> (convert from relative to absolute).', _SQ_PLUGIN_NAME_); ?></span>
124
+ </div>
125
  </div>
126
  </fieldset>
127
 
163
  <option value="com.do"><?php _e('Dominican Republic', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.do/)</option>
164
  <option value="com.ec"><?php _e('Ecuador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ec/)</option>
165
  <option value="com.sv"><?php _e('El Salvador', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.sv/)</option>
166
+ <option value="ee"><?php _e('Estonia', _SQ_PLUGIN_NAME_); ?> (http://www.google.ee/)</option>
167
  <option value="fm"><?php _e('Federated States of Micronesia', _SQ_PLUGIN_NAME_); ?> (http://www.google.fm/)</option>
168
  <option value="com.fj"><?php _e('Fiji', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.fj/)</option>
169
  <option value="fi"><?php _e('Finland', _SQ_PLUGIN_NAME_); ?> (http://www.google.fi/)</option>
205
  <option value="co.nz"><?php _e('New Zealand', _SQ_PLUGIN_NAME_); ?> (http://www.google.co.nz/)</option>
206
  <option value="com.ni"><?php _e('Nicaragua', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ni/)</option>
207
  <option value="com.nf"><?php _e('Norfolk Island', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.nf/)</option>
208
+ <option value="no"><?php _e('Norway', _SQ_PLUGIN_NAME_); ?> (http://www.google.no/)</option>
209
  <option value="com.pk"><?php _e('Pakistan', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.pk/)</option>
210
  <option value="com.pa"><?php _e('Panamá', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.pa/)</option>
211
  <option value="com.py"><?php _e('Paraguay', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.py/)</option>
themes/default/SQ_BlockSettingsSeo.php CHANGED
@@ -225,6 +225,153 @@
225
  <fieldset id="sq_social_media" style="<?php echo ((SQ_Tools::$options['sq_use'] == 0) ? 'display:none;' : ''); ?>">
226
  <legend class="sq_legend_medium">
227
  <span class="sq_legend_title"><?php _e('Social Media Options', _SQ_PLUGIN_NAME_); ?></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  <span><?php echo sprintf(__('%sHow to pop out in Social Media with your links%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/how-to-pop-out-in-social-media-with-your-links." target="_blank">', '</a>'); ?></span>
229
  <span><?php echo sprintf(__('%sGet busy with Facebook’s new Search Engine functions%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/get-busy-with-facebooks-new-search-engine-functions" target="_blank">', '</a>'); ?></span>
230
  <span><?php echo sprintf(__('%sHow I Added Twitter Cards in My WordPress for Better Inbound Marketing%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/inbound_marketing_twitter_cards-pagblog-article_id62232.html" target="_blank">', '</a>'); ?></span>
@@ -252,6 +399,7 @@
252
  <span><?php echo __('Add the <strong>Social Open Graph objects</strong> for a good looking share. ', _SQ_PLUGIN_NAME_) . ' <a href="https://developers.facebook.com/tools/debug/og/object?q=' . urlencode(get_bloginfo('wpurl')) . '" target="_blank" title="Facebook Object Validator">Check here</a>'; ?></span>
253
  </div>
254
  </li>
 
255
  <span class="withborder" style="min-height: 0;"></span>
256
  <li id="sq_option_twitter">
257
  <?php
@@ -282,8 +430,9 @@
282
  <fieldset id="sq_social_media_accounts" style="<?php echo ((SQ_Tools::$options['sq_use'] == 0) ? 'display:none;' : ''); ?>">
283
  <legend class="sq_legend_medium">
284
  <span class="sq_legend_title"><?php _e('Social Media Accounts', _SQ_PLUGIN_NAME_); ?></span>
285
- <span><?php echo sprintf(__('Twitter account is mandatory for <strong>Twitter Card Validation</strong>', _SQ_PLUGIN_NAME_)); ?></span>
286
- <span><?php echo sprintf(__('Add all your social accounts for <strong>JSON-LD Semantic SEO</strong>', _SQ_PLUGIN_NAME_)); ?></span>
 
287
  <span><?php echo sprintf(__('%sSpecify your social profiles to Google%s', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/structured-data/customize/social-profiles" target="_blank">', '</a>'); ?></span>
288
  </legend>
289
 
@@ -388,7 +537,15 @@
388
  <?php echo ((defined('SQ_MESSAGE_FAVICON')) ? '<span class="sq_message sq_error" style="display: block; padding: 11px 0;">' . SQ_MESSAGE_FAVICON . '</span>' : '') ?>
389
  <p>
390
  <?php _e('Upload file:', _SQ_PLUGIN_NAME_); ?><br /><br />
391
- <?php if (SQ_Tools::$options['favicon'] <> '' && file_exists(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon'])) { ?> <img src="<?php echo get_bloginfo('url') . '/favicon.icon' . '?' . time() ?>" style="float: left; margin-top: 1px;width: 32px;height: 32px;" /><?php } ?>
 
 
 
 
 
 
 
 
392
  <input type="file" name="favicon" id="favicon" style="float: left;" />
393
  <input type="submit" name="sq_update" value="<?php _e('Upload', _SQ_PLUGIN_NAME_) ?>" style="float: left; margin-top: 0;" />
394
  <br />
@@ -473,8 +630,6 @@
473
  <fieldset id="sq_tracking" >
474
  <legend style="height: 310px ;">
475
  <span class="sq_legend_title"><?php _e('Tracking Tools', _SQ_PLUGIN_NAME_); ?></span>
476
- <span><?php echo sprintf(__('%sLink your Google+ profile to the content you create%s', _SQ_PLUGIN_NAME_), '<a href="https://plus.google.com/authorship" target="_blank">', '</a>'); ?></span>
477
- <span><?php echo sprintf(__('%sStarBox, the author box that’s pushing content marketing to the stars%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/starbox-the-author-box-thats-pushing-content-marketing-to-the-stars" target="_blank">', '</a>'); ?></span>
478
  <span><?php echo sprintf(__('%sHow to Get the Most Out of Google Analytics%s', _SQ_PLUGIN_NAME_), '<a href="http://mashable.com/2012/01/04/google-analytics-guide/" target="_blank">', '</a>'); ?></span>
479
  <span><?php echo sprintf(__('%sA Beginner’s Guide to Facebook Insights%s', _SQ_PLUGIN_NAME_), '<a href="http://mashable.com/2010/09/03/facebook-insights-guide/" target="_blank">', '</a>'); ?></span>
480
 
225
  <fieldset id="sq_social_media" style="<?php echo ((SQ_Tools::$options['sq_use'] == 0) ? 'display:none;' : ''); ?>">
226
  <legend class="sq_legend_medium">
227
  <span class="sq_legend_title"><?php _e('Social Media Options', _SQ_PLUGIN_NAME_); ?></span>
228
+ <p>
229
+ <span><?php _e('Select the language you\'re using on Social Media', _SQ_PLUGIN_NAME_); ?></span>
230
+ </p>
231
+ <div class="abh_select withborder">
232
+ <select id="sq_og_locale" name="sq_og_locale">
233
+ <option value="en_US">English (US)</option>
234
+ <option value="af_ZA">Afrikaans</option>
235
+ <option value="ak_GH">Akan</option>
236
+ <option value="am_ET">Amharic</option>
237
+ <option value="ar_AR">Arabic</option>
238
+ <option value="as_IN">Assamese</option>
239
+ <option value="ay_BO">Aymara</option>
240
+ <option value="az_AZ">Azerbaijani</option>
241
+ <option value="be_BY">Belarusian</option>
242
+ <option value="bg_BG">Bulgarian</option>
243
+ <option value="bn_IN">Bengali</option>
244
+ <option value="br_FR">Breton</option>
245
+ <option value="bs_BA">Bosnian</option>
246
+ <option value="ca_ES">Catalan</option>
247
+ <option value="cb_IQ">Sorani Kurdish</option>
248
+ <option value="ck_US">Cherokee</option>
249
+ <option value="co_FR">Corsican</option>
250
+ <option value="cs_CZ">Czech</option>
251
+ <option value="cx_PH">Cebuano</option>
252
+ <option value="cy_GB">Welsh</option>
253
+ <option value="da_DK">Danish</option>
254
+ <option value="de_DE">German</option>
255
+ <option value="el_GR">Greek</option>
256
+ <option value="en_GB">English (UK)</option>
257
+ <option value="en_IN">English (India)</option>
258
+ <option value="en_PI">English (Pirate)</option>
259
+ <option value="en_UD">English (Upside Down)</option>
260
+ <option value="eo_EO">Esperanto</option>
261
+ <option value="es_CL">Spanish (Chile)</option>
262
+ <option value="es_CO">Spanish (Colombia)</option>
263
+ <option value="es_ES">Spanish (Spain)</option>
264
+ <option value="es_LA">Spanish</option>
265
+ <option value="es_MX">Spanish (Mexico)</option>
266
+ <option value="es_VE">Spanish (Venezuela)</option>
267
+ <option value="et_EE">Estonian</option>
268
+ <option value="eu_ES">Basque</option>
269
+ <option value="fa_IR">Persian</option>
270
+ <option value="fb_LT">Leet Speak</option>
271
+ <option value="ff_NG">Fulah</option>
272
+ <option value="fi_FI">Finnish</option>
273
+ <option value="fo_FO">Faroese</option>
274
+ <option value="fr_CA">French (Canada)</option>
275
+ <option value="fr_FR">French (France)</option>
276
+ <option value="fy_NL">Frisian</option>
277
+ <option value="ga_IE">Irish</option>
278
+ <option value="gl_ES">Galician</option>
279
+ <option value="gn_PY">Guarani</option>
280
+ <option value="gu_IN">Gujarati</option>
281
+ <option value="gx_GR">Classical Greek</option>
282
+ <option value="ha_NG">Hausa</option>
283
+ <option value="he_IL">Hebrew</option>
284
+ <option value="hi_IN">Hindi</option>
285
+ <option value="hr_HR">Croatian</option>
286
+ <option value="hu_HU">Hungarian</option>
287
+ <option value="hy_AM">Armenian</option>
288
+ <option value="id_ID">Indonesian</option>
289
+ <option value="ig_NG">Igbo</option>
290
+ <option value="is_IS">Icelandic</option>
291
+ <option value="it_IT">Italian</option>
292
+ <option value="ja_JP">Japanese</option>
293
+ <option value="ja_KS">Japanese (Kansai)</option>
294
+ <option value="jv_ID">Javanese</option>
295
+ <option value="ka_GE">Georgian</option>
296
+ <option value="kk_KZ">Kazakh</option>
297
+ <option value="km_KH">Khmer</option>
298
+ <option value="kn_IN">Kannada</option>
299
+ <option value="ko_KR">Korean</option>
300
+ <option value="ku_TR">Kurdish (Kurmanji)</option>
301
+ <option value="la_VA">Latin</option>
302
+ <option value="lg_UG">Ganda</option>
303
+ <option value="li_NL">Limburgish</option>
304
+ <option value="ln_CD">Lingala</option>
305
+ <option value="lo_LA">Lao</option>
306
+ <option value="lt_LT">Lithuanian</option>
307
+ <option value="lv_LV">Latvian</option>
308
+ <option value="mg_MG">Malagasy</option>
309
+ <option value="mk_MK">Macedonian</option>
310
+ <option value="ml_IN">Malayalam</option>
311
+ <option value="mn_MN">Mongolian</option>
312
+ <option value="mr_IN">Marathi</option>
313
+ <option value="ms_MY">Malay</option>
314
+ <option value="mt_MT">Maltese</option>
315
+ <option value="my_MM">Burmese</option>
316
+ <option value="nb_NO">Norwegian (bokmal)</option>
317
+ <option value="nd_ZW">Ndebele</option>
318
+ <option value="ne_NP">Nepali</option>
319
+ <option value="nl_BE">Dutch (België)</option>
320
+ <option value="nl_NL">Dutch</option>
321
+ <option value="nn_NO">Norwegian (nynorsk)</option>
322
+ <option value="ny_MW">Chewa</option>
323
+ <option value="or_IN">Oriya</option>
324
+ <option value="pa_IN">Punjabi</option>
325
+ <option value="pl_PL">Polish</option>
326
+ <option value="ps_AF">Pashto</option>
327
+ <option value="pt_BR">Portuguese (Brazil)</option>
328
+ <option value="pt_PT">Portuguese (Portugal)</option>
329
+ <option value="qu_PE">Quechua</option>
330
+ <option value="rm_CH">Romansh</option>
331
+ <option value="ro_RO">Romanian</option>
332
+ <option value="ru_RU">Russian</option>
333
+ <option value="rw_RW">Kinyarwanda</option>
334
+ <option value="sa_IN">Sanskrit</option>
335
+ <option value="sc_IT">Sardinian</option>
336
+ <option value="se_NO">Northern Sámi</option>
337
+ <option value="si_LK">Sinhala</option>
338
+ <option value="sk_SK">Slovak</option>
339
+ <option value="sl_SI">Slovenian</option>
340
+ <option value="sn_ZW">Shona</option>
341
+ <option value="so_SO">Somali</option>
342
+ <option value="sq_AL">Albanian</option>
343
+ <option value="sr_RS">Serbian</option>
344
+ <option value="sv_SE">Swedish</option>
345
+ <option value="sw_KE">Swahili</option>
346
+ <option value="sy_SY">Syriac</option>
347
+ <option value="sz_PL">Silesian</option>
348
+ <option value="ta_IN">Tamil</option>
349
+ <option value="te_IN">Telugu</option>
350
+ <option value="tg_TJ">Tajik</option>
351
+ <option value="th_TH">Thai</option>
352
+ <option value="tk_TM">Turkmen</option>
353
+ <option value="tl_PH">Filipino</option>
354
+ <option value="tl_ST">Klingon</option>
355
+ <option value="tr_TR">Turkish</option>
356
+ <option value="tt_RU">Tatar</option>
357
+ <option value="tz_MA">Tamazight</option>
358
+ <option value="uk_UA">Ukrainian</option>
359
+ <option value="ur_PK">Urdu</option>
360
+ <option value="uz_UZ">Uzbek</option>
361
+ <option value="vi_VN">Vietnamese</option>
362
+ <option value="wo_SN">Wolof</option>
363
+ <option value="xh_ZA">Xhosa</option>
364
+ <option value="yi_DE">Yiddish</option>
365
+ <option value="yo_NG">Yoruba</option>
366
+ <option value="zh_CN">Simplified Chinese (China)</option>
367
+ <option value="zh_HK">Traditional Chinese (Hong Kong)</option>
368
+ <option value="zh_TW">Traditional Chinese (Taiwan)</option>
369
+ <option value="zu_ZA">Zulu</option>
370
+ <option value="zz_TR">Zazaki</option>
371
+ </select>
372
+
373
+ </div>
374
+ <br />
375
  <span><?php echo sprintf(__('%sHow to pop out in Social Media with your links%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/how-to-pop-out-in-social-media-with-your-links." target="_blank">', '</a>'); ?></span>
376
  <span><?php echo sprintf(__('%sGet busy with Facebook’s new Search Engine functions%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/get-busy-with-facebooks-new-search-engine-functions" target="_blank">', '</a>'); ?></span>
377
  <span><?php echo sprintf(__('%sHow I Added Twitter Cards in My WordPress for Better Inbound Marketing%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/inbound_marketing_twitter_cards-pagblog-article_id62232.html" target="_blank">', '</a>'); ?></span>
399
  <span><?php echo __('Add the <strong>Social Open Graph objects</strong> for a good looking share. ', _SQ_PLUGIN_NAME_) . ' <a href="https://developers.facebook.com/tools/debug/og/object?q=' . urlencode(get_bloginfo('wpurl')) . '" target="_blank" title="Facebook Object Validator">Check here</a>'; ?></span>
400
  </div>
401
  </li>
402
+
403
  <span class="withborder" style="min-height: 0;"></span>
404
  <li id="sq_option_twitter">
405
  <?php
430
  <fieldset id="sq_social_media_accounts" style="<?php echo ((SQ_Tools::$options['sq_use'] == 0) ? 'display:none;' : ''); ?>">
431
  <legend class="sq_legend_medium">
432
  <span class="sq_legend_title"><?php _e('Social Media Accounts', _SQ_PLUGIN_NAME_); ?></span>
433
+ <span><?php echo sprintf(__('%sLink your Google+ profile to the content you create%s', _SQ_PLUGIN_NAME_), '<a href="https://plus.google.com/authorship" target="_blank">', '</a>'); ?></span>
434
+ <span><?php echo sprintf(__('%sTwitter account is mandatory for <strong>Twitter Card Validation</strong>%s', _SQ_PLUGIN_NAME_), '<a href="https://dev.twitter.com/docs/cards/validation/validator" target="_blank">', '</a>'); ?></span>
435
+ <span><?php echo sprintf(__('%sAdd all your social accounts for <strong>JSON-LD Semantic SEO</strong>%s', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.c%so/sides/squirrly-json-ld-structured-data/" target="_blank">', '</a>'); ?></span>
436
  <span><?php echo sprintf(__('%sSpecify your social profiles to Google%s', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/structured-data/customize/social-profiles" target="_blank">', '</a>'); ?></span>
437
  </legend>
438
 
537
  <?php echo ((defined('SQ_MESSAGE_FAVICON')) ? '<span class="sq_message sq_error" style="display: block; padding: 11px 0;">' . SQ_MESSAGE_FAVICON . '</span>' : '') ?>
538
  <p>
539
  <?php _e('Upload file:', _SQ_PLUGIN_NAME_); ?><br /><br />
540
+ <?php
541
+ if (SQ_Tools::$options['favicon'] <> '' && file_exists(_SQ_CACHE_DIR_ . SQ_Tools::$options['favicon'])) {
542
+ if (!get_option('permalink_structure')) {
543
+ $favicon = get_bloginfo('wpurl') . '/index.php?sq_get=favicon';
544
+ } else {
545
+ $favicon = get_bloginfo('wpurl') . '/favicon.icon' . '?' . time();
546
+ }
547
+ ?> <img src="<?php echo $favicon ?>" style="float: left; margin-top: 1px;width: 32px;height: 32px;" />
548
+ <?php } ?>
549
  <input type="file" name="favicon" id="favicon" style="float: left;" />
550
  <input type="submit" name="sq_update" value="<?php _e('Upload', _SQ_PLUGIN_NAME_) ?>" style="float: left; margin-top: 0;" />
551
  <br />
630
  <fieldset id="sq_tracking" >
631
  <legend style="height: 310px ;">
632
  <span class="sq_legend_title"><?php _e('Tracking Tools', _SQ_PLUGIN_NAME_); ?></span>
 
 
633
  <span><?php echo sprintf(__('%sHow to Get the Most Out of Google Analytics%s', _SQ_PLUGIN_NAME_), '<a href="http://mashable.com/2012/01/04/google-analytics-guide/" target="_blank">', '</a>'); ?></span>
634
  <span><?php echo sprintf(__('%sA Beginner’s Guide to Facebook Insights%s', _SQ_PLUGIN_NAME_), '<a href="http://mashable.com/2010/09/03/facebook-insights-guide/" target="_blank">', '</a>'); ?></span>
635
 
themes/default/SQ_Blockresearch.php CHANGED
@@ -2,6 +2,36 @@
2
  <div id="sq_research_title" ><?php _e('Squirrly Keyword Research', _SQ_PLUGIN_NAME_); ?>
3
  <input class="sq_keywords_research_clear" type="button" value="<?php _e('Clear', _SQ_PLUGIN_NAME_); ?>" />
4
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  <div id="sq_research_body">
6
 
7
  <ul id="sq_keywords_research">
2
  <div id="sq_research_title" ><?php _e('Squirrly Keyword Research', _SQ_PLUGIN_NAME_); ?>
3
  <input class="sq_keywords_research_clear" type="button" value="<?php _e('Clear', _SQ_PLUGIN_NAME_); ?>" />
4
  </div>
5
+ <ul class="sq_research_lang">
6
+ <li class="sq_research_lang sq_research_first" title="Google.com">Google.com</li>
7
+ <li id="sq_research_lang_us" class="sq_research_lang" title="Google.com">Google.com</li>
8
+ <li id="sq_research_lang_ca" class="sq_research_lang" title="Google.ca">Google.ca</li>
9
+ <li id="sq_research_lang_uk" class="sq_research_lang" title="Google.co.uk">Google.co.uk</li>
10
+ <li id="sq_research_lang_ar" class="sq_research_lang" title="Google.com.ar">Google.com.ar</li>
11
+ <li id="sq_research_lang_au" class="sq_research_lang" title="Google.com.au">Google.com.au</li>
12
+ <li id="sq_research_lang_be" class="sq_research_lang" title="Google.be">Google.be</li>
13
+ <li id="sq_research_lang_br" class="sq_research_lang" title="Google.com.br">Google.com.br</li>
14
+ <li id="sq_research_lang_ch" class="sq_research_lang" title="Google.ch">Google.ch</li>
15
+ <li id="sq_research_lang_de" class="sq_research_lang" title="Google.de">Google.de</li>
16
+ <li id="sq_research_lang_dk" class="sq_research_lang" title="Google.dk">Google.dk</li>
17
+ <li id="sq_research_lang_es" class="sq_research_lang" title="Google.es">Google.es</li>
18
+ <li id="sq_research_lang_fi" class="sq_research_lang" title="Google.fi">Google.fi</li>
19
+ <li id="sq_research_lang_fr" class="sq_research_lang" title="Google.fr">Google.fr</li>
20
+ <li id="sq_research_lang_hk" class="sq_research_lang" title="Google.com.hk">Google.com.hk</li>
21
+ <li id="sq_research_lang_ie" class="sq_research_lang" title="Google.ie">Google.ie</li>
22
+ <li id="sq_research_lang_il" class="sq_research_lang" title="Google.il">Google.il</li>
23
+ <li id="sq_research_lang_in" class="sq_research_lang" title="Google.co.in">Google.co.in</li>
24
+ <li id="sq_research_lang_it" class="sq_research_lang" title="Google.it">Google.it</li>
25
+ <li id="sq_research_lang_jp" class="sq_research_lang" title="Google.co.jp">Google.co.jp</li>
26
+ <li id="sq_research_lang_mx" class="sq_research_lang" title="Google.com.mx">Google.com.mx</li>
27
+ <li id="sq_research_lang_nl" class="sq_research_lang" title="Google.nl">Google.nl</li>
28
+ <li id="sq_research_lang_no" class="sq_research_lang" title="Google.no">Google.no</li>
29
+ <li id="sq_research_lang_pl" class="sq_research_lang" title="Google.pl">Google.pl</li>
30
+ <li id="sq_research_lang_ru" class="sq_research_lang" title="Google.ru">Google.ru</li>
31
+ <li id="sq_research_lang_se" class="sq_research_lang" title="Google.se">Google.se</li>
32
+ <li id="sq_research_lang_sg" class="sq_research_lang" title="Google.com.sg">Google.com.sg</li>
33
+ </ul>
34
+
35
  <div id="sq_research_body">
36
 
37
  <ul id="sq_keywords_research">
themes/default/SQ_Blockseo.php CHANGED
@@ -3,4 +3,9 @@
3
  <div class="sq_header"><?php _e('Squirrly SEO Live Assistant', _SQ_PLUGIN_NAME_); ?></div>
4
  <div class="sq_tasks"></div>
5
  </div>
 
 
 
 
 
6
  </div>
3
  <div class="sq_header"><?php _e('Squirrly SEO Live Assistant', _SQ_PLUGIN_NAME_); ?></div>
4
  <div class="sq_tasks"></div>
5
  </div>
6
+ </div>
7
+ <div id="sq_canonical" style="display: none">
8
+ <div class="sq_header"><?php _e('Canonical link: ', _SQ_PLUGIN_NAME_); ?></div>
9
+ <div class="sq_canonical_input"><input type="text" name="sq_canonical" size="30" value="<?php global $sq_postID; echo SQ_ObjController::getModel('SQ_Frontend')->getAdvancedMeta($sq_postID, 'canonical') ?>" /></div>
10
+ <div class="sq_information"><em><?php _e('(only for external sources)', _SQ_PLUGIN_NAME_); ?></em></div>
11
  </div>
themes/default/css/sq_blockresearch.css CHANGED
@@ -382,62 +382,137 @@
382
  }
383
 
384
  /******************Multilanguage *********************/
 
385
  ul.sq_research_lang{
386
  position: absolute;
 
 
 
387
  display: block;
388
- top: 4px;
389
  right: 100px;
390
- width: 117px;
391
- height: 30px;
392
- margin-top: 9px;
393
- padding: 0;
 
 
 
 
 
 
 
394
  }
395
 
 
 
 
 
 
 
 
 
 
 
 
 
396
  ul.sq_research_lang li.sq_research_lang{
397
- float: left;
398
- background: transparent url('../img/sprite.png') no-repeat;
399
- background-position: 0px -48px;
400
-
401
- margin-right: 5px;
402
- width: 18px;
403
- height: 13px;
404
  cursor: pointer;
405
  }
406
 
 
 
 
 
 
407
  ul.sq_research_lang li.selected{
408
- border: 1px solid darkgreen;
409
- border-radius: 2px;
410
- margin-top: -2px;
411
- margin-left: -2px;
412
  }
413
 
414
- li#sq_research_lang_us{
415
- background-position: -10px -234px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  }
417
- li#sq_research_lang_uk{
418
- background-position: -32px -234px;
419
  }
420
- li#sq_research_lang_ca{
421
- background-position: -54px -234px;
422
  }
423
- li#sq_research_lang_de{
424
- background-position: -76px -234px;
425
  }
426
- li#sq_research_lang_fr{
427
- background-position: -99px -234px;
428
  }
429
- li#sq_research_lang_it{
430
- background-position: -121px -234px;
431
  }
432
- li#sq_research_lang_es{
433
- background-position: -143px -234px;
434
  }
435
- li#sq_research_lang_ru{
436
- background-position: -209px -234px;
437
  }
438
- li#sq_research_lang_br{
439
- background-position: -165px -234px;
440
  }
441
- li#sq_research_lang_au{
442
- background-position: -187px -234px;
443
  }
382
  }
383
 
384
  /******************Multilanguage *********************/
385
+
386
  ul.sq_research_lang{
387
  position: absolute;
388
+ background-color: #fcfcfc;
389
+ border: none;
390
+ font-size: 13px;
391
  display: block;
392
+ top: 17px;
393
  right: 100px;
394
+ width: 135px;
395
+ height: 27px;
396
+ margin: 0px;
397
+ padding: 0px;
398
+ overflow: hidden;
399
+ }
400
+ ul.sq_research_lang:hover{
401
+ box-shadow: 0 0 10px 0 #333;
402
+ height: auto;
403
+ overflow-y: visible;
404
+ z-index: 9999;
405
  }
406
 
407
+ ul.sq_research_lang li.sq_research_lang:before{
408
+ display: inline-block;
409
+ content: " ";
410
+ background: transparent url('../img/flags.png') no-repeat;
411
+ background-position: 0 -2541px;
412
+ border: 1px solid white;
413
+ width: 16px;
414
+ height: 11px;
415
+ cursor: pointer;
416
+ margin: 0px 5px -2px 0;
417
+ padding: 0px 0 0 0;
418
+ }
419
  ul.sq_research_lang li.sq_research_lang{
420
+ margin: 0px 0px 5px 0px;
421
+ padding: 0 2px;
422
+ line-height: 24px;
 
 
 
 
423
  cursor: pointer;
424
  }
425
 
426
+ ul.sq_research_lang li.sq_research_first{
427
+ border: 1px solid #20bc49;
428
+ color: #20bc49;
429
+ }
430
+
431
  ul.sq_research_lang li.selected{
432
+ background-color: lightgray;
 
 
 
433
  }
434
 
435
+ li#sq_research_lang_us:before{
436
+ background-position: 0 -2541px;
437
+ }
438
+ li#sq_research_lang_uk:before{
439
+ background-position: 0 -836px;
440
+ }
441
+ li#sq_research_lang_ca:before{
442
+ background-position: 0 -407px;
443
+ }
444
+ li#sq_research_lang_de:before{
445
+ background-position: 0 -616px;
446
+ }
447
+ li#sq_research_lang_fr:before{
448
+ background-position: 0 -814px;
449
+ }
450
+ li#sq_research_lang_it:before{
451
+ background-position: 0 -1199px;
452
+ }
453
+ li#sq_research_lang_es:before{
454
+ background-position: 0 -737px;
455
+ }
456
+ li#sq_research_lang_ru:before{
457
+ background-position: 0 -2090px;
458
+ }
459
+ li#sq_research_lang_br:before{
460
+ background-position: 0 -330px;
461
+ }
462
+ li#sq_research_lang_au:before{
463
+ background-position: 0 -132px;
464
+ }
465
+ /**
466
+ 'ar', 'be', 'ch', 'dk', 'fi', 'hk', 'ie', 'il', 'mx', 'nl', 'no', 'pl', 'se', 'sg', 'tr', 'jp', 'in
467
+ **/
468
+ li#sq_research_lang_ar:before{
469
+ background-position: 0 -99px;
470
+ }
471
+ li#sq_research_lang_be:before{
472
+ background-position: 0 -209px;
473
+ }
474
+ li#sq_research_lang_ch:before{
475
+ background-position: 0 -462px;
476
+ }
477
+ li#sq_research_lang_dk:before{
478
+ background-position: 0 -638px;
479
+ }
480
+ li#sq_research_lang_fi:before{
481
+ background-position: 0 -759px;
482
+ }
483
+ li#sq_research_lang_hk:before{
484
+ background-position: 0 -1034px;
485
+ }
486
+ li#sq_research_lang_ie:before{
487
+ background-position: 0 -1111px;
488
+ }
489
+ li#sq_research_lang_il:before{
490
+ background-position: 0 -1122px;
491
  }
492
+ li#sq_research_lang_mx:before{
493
+ background-position: 0 -1716px;
494
  }
495
+ li#sq_research_lang_nl:before{
496
+ background-position: 0 -1815px;
497
  }
498
+ li#sq_research_lang_no:before{
499
+ background-position: 0 -1826px;
500
  }
501
+ li#sq_research_lang_pl:before{
502
+ background-position: 0 -1958px;
503
  }
504
+ li#sq_research_lang_se:before{
505
+ background-position: 0 -2156px;
506
  }
507
+ li#sq_research_lang_sg:before{
508
+ background-position: 0 -2167px;
509
  }
510
+ li#sq_research_lang_tr:before{
511
+ background-position: 0 -2453px;
512
  }
513
+ li#sq_research_lang_jp:before{
514
+ background-position: 0 -1243px;
515
  }
516
+ li#sq_research_lang_in:before{
517
+ background-position: 0 -1144px;
518
  }
themes/default/css/sq_blockseo.css CHANGED
@@ -49,7 +49,7 @@ progress.sq_blockseo_progress::-webkit-progress-value {
49
  background-size: 276px;
50
  -webkit-animation: move 5s linear 0 infinite;
51
  animation: move 5s linear 0 infinite;
52
- background-image: linear-gradient(90deg, red 0%, orange 30%, orange 50%, #20bc49 100%);
53
  }
54
  progress.sq_blockseo_topprogress::-webkit-progress-value {
55
  background-color: #5ba4cf;
@@ -497,4 +497,30 @@ body ul.sq_complete li span{
497
  border: 1px solid darkOliveGreen;
498
  cursor: pointer;
499
  z-index: 2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  }
49
  background-size: 276px;
50
  -webkit-animation: move 5s linear 0 infinite;
51
  animation: move 5s linear 0 infinite;
52
+ background-image: linear-gradient(90deg, red 0%, orange 30%, orange 60%, #20bc49 100%);
53
  }
54
  progress.sq_blockseo_topprogress::-webkit-progress-value {
55
  background-color: #5ba4cf;
497
  border: 1px solid darkOliveGreen;
498
  cursor: pointer;
499
  z-index: 2;
500
+ }
501
+
502
+ #titlediv #sq_canonical{
503
+ font-weight: bold;
504
+ clear: both;
505
+ height: 35px;
506
+ margin-left: 10px;
507
+ }
508
+
509
+ #titlediv #sq_canonical div{
510
+ float: left;
511
+ line-height: 29px;
512
+ margin-right: 5px;
513
+ opacity: 0.5;
514
+ }
515
+
516
+ #titlediv #sq_canonical div.sq_canonical_input{
517
+ width: 50%;
518
+ }
519
+
520
+ #titlediv #sq_canonical div.sq_canonical_input input{
521
+ color: darkblue;
522
+ font-size: 13px;
523
+ font-style: italic;
524
+ padding: 5px;
525
+ width: 100%;
526
  }
themes/default/css/sq_global.css CHANGED
@@ -287,11 +287,10 @@ noscript{
287
  min-height: 65px;
288
  }
289
  #sq_snippet{
290
- position: relative;
291
- margin: 20px 0;
 
292
 
293
- position: relative;
294
- margin: 20px 1px;
295
  box-shadow: 0px 1px 2px -1px #444;
296
  -moz-box-shadow: 0px 1px 2px -1px #444;
297
  -webkit-box-shadow: 0px 1px 2px -1px #444;
287
  min-height: 65px;
288
  }
289
  #sq_snippet{
290
+ position: relative !important;
291
+ margin: 20px 1px !important;
292
+ clear: both;
293
 
 
 
294
  box-shadow: 0px 1px 2px -1px #444;
295
  -moz-box-shadow: 0px 1px 2px -1px #444;
296
  -webkit-box-shadow: 0px 1px 2px -1px #444;
themes/default/css/sq_menu.css CHANGED
@@ -397,6 +397,16 @@
397
  text-decoration: none;
398
  text-shadow: 1px 1px #555;
399
  }
 
 
 
 
 
 
 
 
 
 
400
  #sq_settings_body fieldset legend .sq_option_content{
401
  width: 123px;
402
  margin: 0 auto;
397
  text-decoration: none;
398
  text-shadow: 1px 1px #555;
399
  }
400
+
401
+ #sq_settings_body fieldset legend select{
402
+ padding: 2px;
403
+ line-height: 28px;
404
+ height: 28px;
405
+ vertical-align: middle;
406
+ font-size: 100%;
407
+ width: 100%;
408
+ }
409
+
410
  #sq_settings_body fieldset legend .sq_option_content{
411
  width: 123px;
412
  margin: 0 auto;
themes/default/css/sq_post.css CHANGED
@@ -201,9 +201,13 @@
201
  float: none;
202
  }
203
 
 
 
204
  #sq_options > ul{
205
  margin: 10px 0;
 
206
  }
 
207
  #sq_options > ul > li{
208
  position: relative;
209
  width: 100px;
201
  float: none;
202
  }
203
 
204
+ #sq_blocksearch ul,
205
+ #sq_blockseo ul,
206
  #sq_options > ul{
207
  margin: 10px 0;
208
+ padding: 0;
209
  }
210
+
211
  #sq_options > ul > li{
212
  position: relative;
213
  width: 100px;
themes/default/css/sq_postslist.css CHANGED
@@ -36,6 +36,48 @@ td.sq_rank_column {
36
  width: 90px;
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  td.sq_rank_column .sq_rank_column_row{
40
  text-align: center;
41
  position: relative;
@@ -68,7 +110,7 @@ td.sq_rank_column .sq_rank_column_row:hover .sq_chart_title{
68
  td.column-rank .sq_rank_column_button,
69
  td.sq_rank_column .sq_rank_column_button{
70
  display: block;
71
- margin: 10px auto;
72
  background-color: #15b14a;
73
  font-size: 13px;
74
  font-weight: bold;
36
  width: 90px;
37
  }
38
 
39
+ /********************************************************/
40
+ progress.sq_post_progress{
41
+ width: 100px;
42
+ height: 6px;
43
+ margin: 5px auto 0 auto;
44
+ padding: 0;
45
+ display: block;
46
+ -webkit-appearance: none;
47
+ box-shadow: none;
48
+ border: 1px solid #eee;
49
+ }
50
+ /* This rule sets the appearance of the progress bar background */
51
+ progress.sq_post_progress::-webkit-progress-bar{
52
+ background: transparent;
53
+ border-radius: 0px;
54
+ }
55
+
56
+ /* This rule sets the appearance of the progress bar meter */
57
+ progress.sq_post_progress::-webkit-progress-value {
58
+ background-color: #20bc49;
59
+ border-radius: 0px;
60
+ box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
61
+ background-size: 100px;
62
+ -webkit-animation: move 5s linear 0 infinite;
63
+ animation: move 5s linear 0;
64
+ background-image: linear-gradient(90deg, red 0%, orange 30%, orange 60%, #20bc49 100%);
65
+ }
66
+ progress.sq_post_100progress::-webkit-progress-value {
67
+ background-color: #20bc49;
68
+ }
69
+
70
+ @keyframes move {
71
+ 0% {background-position: 0px 0px, 0 0, 0 0}
72
+ 100% {background-position: -100px 0px, 0 0, 0 0}
73
+ }
74
+
75
+ @-webkit-keyframes move {
76
+ 0% {background-position: 0px 0px, 0 0, 0 0}
77
+ 100% {background-position: -100px 0px, 0 0, 0 0}
78
+ }
79
+ /********************************************************/
80
+
81
  td.sq_rank_column .sq_rank_column_row{
82
  text-align: center;
83
  position: relative;
110
  td.column-rank .sq_rank_column_button,
111
  td.sq_rank_column .sq_rank_column_button{
112
  display: block;
113
+ margin: 1px auto 10px auto;
114
  background-color: #15b14a;
115
  font-size: 13px;
116
  font-weight: bold;
themes/default/img/flags.png ADDED
Binary file
themes/default/js/sq_blocksettingsseo.js CHANGED
@@ -260,6 +260,8 @@ function sq_submitSettings() {
260
  sq_auto_favicon: jQuery('#sq_settings').find('input[name=sq_auto_favicon]:checked').val(),
261
  sq_auto_facebook: jQuery('#sq_settings').find('input[name=sq_auto_facebook]:checked').val(),
262
  sq_auto_twitter: jQuery('#sq_settings').find('input[name=sq_auto_twitter]:checked').val(),
 
 
263
  sq_twitter_account: jQuery('#sq_settings').find('input[name=sq_twitter_account]').val(),
264
  sq_facebook_account: jQuery('#sq_settings').find('input[name=sq_facebook_account]').val(),
265
  sq_google_plus: jQuery('#sq_settings').find('input[name=sq_google_plus]').val(),
260
  sq_auto_favicon: jQuery('#sq_settings').find('input[name=sq_auto_favicon]:checked').val(),
261
  sq_auto_facebook: jQuery('#sq_settings').find('input[name=sq_auto_facebook]:checked').val(),
262
  sq_auto_twitter: jQuery('#sq_settings').find('input[name=sq_auto_twitter]:checked').val(),
263
+ sq_og_locale: jQuery('#sq_settings').find('select[name=sq_og_locale] option:selected').val(),
264
+ //--
265
  sq_twitter_account: jQuery('#sq_settings').find('input[name=sq_twitter_account]').val(),
266
  sq_facebook_account: jQuery('#sq_settings').find('input[name=sq_facebook_account]').val(),
267
  sq_google_plus: jQuery('#sq_settings').find('input[name=sq_google_plus]').val(),
themes/default/js/sq_menu.js CHANGED
@@ -6,6 +6,7 @@ if (jQuery('#sq_settings').length > 0) {
6
  });
7
  }
8
 
 
9
  function ctl_setThemeColors(background, button, text) {
10
  jQuery('#sq_settings legend').css('background-color', background);
11
  jQuery('#sq_settings input[type="submit"]').css('background-color', button);
@@ -77,6 +78,10 @@ function sq_blockmenu() {
77
  jQuery('html,body').animate({scrollTop: previewtop}, 1000);
78
  });
79
 
 
 
 
 
80
  }
81
 
82
  //Show the title length in post editor
@@ -313,7 +318,7 @@ function sq_getHelp(category, zone) {
313
  jQuery('#sq_help' + category + zone).removeClass('sq_loading').addClass('sq_error').show();
314
  jQuery('#sq_help' + category + 'content').html('Lost connection with the server. Please make sure you whitelisted the IP from https://api.squirrly.co');
315
  }
316
- }, 10000);
317
 
318
  }
319
  function checkResponse(response) {
6
  });
7
  }
8
 
9
+
10
  function ctl_setThemeColors(background, button, text) {
11
  jQuery('#sq_settings legend').css('background-color', background);
12
  jQuery('#sq_settings input[type="submit"]').css('background-color', button);
78
  jQuery('html,body').animate({scrollTop: previewtop}, 1000);
79
  });
80
 
81
+ if (jQuery('#sq_canonical').length > 0) {
82
+ jQuery('#titlewrap').after(jQuery('#sq_canonical'));
83
+ jQuery('#sq_canonical').show();
84
+ }
85
  }
86
 
87
  //Show the title length in post editor
318
  jQuery('#sq_help' + category + zone).removeClass('sq_loading').addClass('sq_error').show();
319
  jQuery('#sq_help' + category + 'content').html('Lost connection with the server. Please make sure you whitelisted the IP from https://api.squirrly.co');
320
  }
321
+ }, 20000);
322
 
323
  }
324
  function checkResponse(response) {