Version Description
- 09/03/2019 =
- Update - Squirrly Live Assistant for multiple languages
- Update - my.squirrly.co to post on WordPress through a secure connection
- Update - Update SEO METAs with last Google Algorithms
- Update - Set Squirrly capabilities for each role
- Update - Keywords suggestion update for better results
- Fix - User Role Management when Admin has multiple roles
- Fix - Sitemap terms exclude empty tags and categories
- Fix - Sitemap taxonomi limit included to prevent timeouts
- Fix - Fixed the Squirrly SEO Admin role
- Fix - Fix small bugs
Download this release
Release Info
Developer | cifi |
Plugin | SEO SQUIRRLY™ |
Version | 9.2.10 |
Comparing to | |
See all releases |
Code changes from version 9.2.11 to 9.2.10
- config.json +1 -0
- controllers/Patterns.php +0 -4
- controllers/Post.php +31 -7
- models/Post.php +235 -0
- models/bulkseo/Metas.php +6 -0
- models/domain/Patterns.php +20 -7
- readme.txt +1 -5
- squirrly.php +2 -2
- view/Blocks/SLASearch.php +6 -2
config.json
CHANGED
@@ -45,6 +45,7 @@
|
|
45 |
"actions": {
|
46 |
"action": [
|
47 |
"sq_save_ogimage",
|
|
|
48 |
"sq_create_demo",
|
49 |
"sq_ajax_type_click",
|
50 |
"sq_ajax_search_blog"
|
45 |
"actions": {
|
46 |
"action": [
|
47 |
"sq_save_ogimage",
|
48 |
+
"sq_get_keyword",
|
49 |
"sq_create_demo",
|
50 |
"sq_ajax_type_click",
|
51 |
"sq_ajax_search_blog"
|
controllers/Patterns.php
CHANGED
@@ -33,10 +33,6 @@ class SQ_Controllers_Patterns extends SQ_Classes_FrontController {
|
|
33 |
|
34 |
//Foreach SQ, if has patterns, replace them
|
35 |
if ($sq_array = $post->sq->toArray()) {
|
36 |
-
|
37 |
-
//set the keywords from sq and not from post
|
38 |
-
$this->patterns->keywords = $post->sq->keywords;
|
39 |
-
|
40 |
$post->sq = $this->processPatterns($sq_array, $post->sq);
|
41 |
}
|
42 |
}
|
33 |
|
34 |
//Foreach SQ, if has patterns, replace them
|
35 |
if ($sq_array = $post->sq->toArray()) {
|
|
|
|
|
|
|
|
|
36 |
$post->sq = $this->processPatterns($sq_array, $post->sq);
|
37 |
}
|
38 |
}
|
controllers/Post.php
CHANGED
@@ -211,6 +211,16 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
|
|
211 |
get_post_status($postarr['ID']) != 'auto-draft' &&
|
212 |
get_post_status($postarr['ID']) != 'inherit'
|
213 |
) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
//Save the snippet in case is edited in backend and not saved
|
215 |
SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->saveSEO();
|
216 |
|
@@ -260,6 +270,23 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
|
|
260 |
echo json_encode($return);
|
261 |
exit();
|
262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
case 'sq_create_demo':
|
264 |
$post_type = 'post';
|
265 |
if (post_type_exists($post_type)) {
|
@@ -267,8 +294,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
|
|
267 |
$json = json_decode(file_get_contents(_SQ_ROOT_DIR_ . 'demo.json'));
|
268 |
|
269 |
if (isset($json->demo->title) && isset($json->demo->content)) {
|
270 |
-
@setrawcookie('sq_keyword', rawurlencode($json->demo->keyword), strtotime('+1 hour'), COOKIEPATH, COOKIE_DOMAIN, is_ssl());
|
271 |
-
|
272 |
$args = array();
|
273 |
$args['s'] = '"' . addslashes($json->demo->title) . '"';
|
274 |
$args['post_type'] = $post_type;
|
@@ -289,6 +314,10 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
|
|
289 |
|
290 |
if ($post_id = wp_insert_post($post)) {
|
291 |
if (!is_wp_error($post_id)) {
|
|
|
|
|
|
|
|
|
292 |
wp_redirect(admin_url("post.php?post=" . $post_id . "&action=edit&post_type=" . $post_type));
|
293 |
exit();
|
294 |
|
@@ -352,11 +381,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController {
|
|
352 |
private function _checkBriefcaseKeywords($post_id) {
|
353 |
if (SQ_Classes_Helpers_Tools::getIsset('sq_hash')) {
|
354 |
$keywords = SQ_Classes_Helpers_Tools::getValue('sq_briefcase_keyword', array());
|
355 |
-
|
356 |
-
if (empty($keywords)) { //if not from brifcase, check the keyword
|
357 |
-
$keywords[] = SQ_Classes_Helpers_Tools::getValue('sq_keyword');
|
358 |
-
}
|
359 |
-
|
360 |
if (!empty($keywords)) {
|
361 |
$sq_hash = SQ_Classes_Helpers_Tools::getValue('sq_hash', md5($post_id));
|
362 |
$url = SQ_Classes_Helpers_Tools::getValue('sq_url', get_permalink($post_id));
|
211 |
get_post_status($postarr['ID']) != 'auto-draft' &&
|
212 |
get_post_status($postarr['ID']) != 'inherit'
|
213 |
) {
|
214 |
+
//Save the keyword for this post
|
215 |
+
if ($json = $this->model->getKeyword($postarr['ID'])) {
|
216 |
+
$json->keyword = addslashes(SQ_Classes_Helpers_Tools::getValue('sq_keyword'));
|
217 |
+
$this->model->saveKeyword($postarr['ID'], $json);
|
218 |
+
} else {
|
219 |
+
$args = array();
|
220 |
+
$args['keyword'] = addslashes(SQ_Classes_Helpers_Tools::getValue('sq_keyword'));
|
221 |
+
$this->model->saveKeyword($postarr['ID'], json_decode(json_encode($args)));
|
222 |
+
}
|
223 |
+
|
224 |
//Save the snippet in case is edited in backend and not saved
|
225 |
SQ_Classes_ObjController::getClass('SQ_Models_Snippet')->saveSEO();
|
226 |
|
270 |
echo json_encode($return);
|
271 |
exit();
|
272 |
|
273 |
+
case 'sq_get_keyword':
|
274 |
+
if (!current_user_can('sq_manage_snippet')) {
|
275 |
+
$response['error'] = SQ_Classes_Error::showNotices(__("You do not have permission to perform this action", _SQ_PLUGIN_NAME_), 'sq_error');
|
276 |
+
SQ_Classes_Helpers_Tools::setHeader('json');
|
277 |
+
echo json_encode($response);
|
278 |
+
exit();
|
279 |
+
}
|
280 |
+
|
281 |
+
SQ_Classes_Helpers_Tools::setHeader('json');
|
282 |
+
if (SQ_Classes_Helpers_Tools::getIsset('post_id')) {
|
283 |
+
echo json_encode($this->model->getKeywordsFromPost(SQ_Classes_Helpers_Tools::getValue('post_id')));
|
284 |
+
} else {
|
285 |
+
echo json_encode(array('error' => true));
|
286 |
+
}
|
287 |
+
SQ_Classes_Helpers_Tools::emptyCache();
|
288 |
+
break;
|
289 |
+
|
290 |
case 'sq_create_demo':
|
291 |
$post_type = 'post';
|
292 |
if (post_type_exists($post_type)) {
|
294 |
$json = json_decode(file_get_contents(_SQ_ROOT_DIR_ . 'demo.json'));
|
295 |
|
296 |
if (isset($json->demo->title) && isset($json->demo->content)) {
|
|
|
|
|
297 |
$args = array();
|
298 |
$args['s'] = '"' . addslashes($json->demo->title) . '"';
|
299 |
$args['post_type'] = $post_type;
|
314 |
|
315 |
if ($post_id = wp_insert_post($post)) {
|
316 |
if (!is_wp_error($post_id)) {
|
317 |
+
$args = array();
|
318 |
+
$args['keyword'] = $json->demo->keyword;
|
319 |
+
$this->model->saveKeyword($post_id, json_decode(json_encode($args)));
|
320 |
+
|
321 |
wp_redirect(admin_url("post.php?post=" . $post_id . "&action=edit&post_type=" . $post_type));
|
322 |
exit();
|
323 |
|
381 |
private function _checkBriefcaseKeywords($post_id) {
|
382 |
if (SQ_Classes_Helpers_Tools::getIsset('sq_hash')) {
|
383 |
$keywords = SQ_Classes_Helpers_Tools::getValue('sq_briefcase_keyword', array());
|
|
|
|
|
|
|
|
|
|
|
384 |
if (!empty($keywords)) {
|
385 |
$sq_hash = SQ_Classes_Helpers_Tools::getValue('sq_hash', md5($post_id));
|
386 |
$url = SQ_Classes_Helpers_Tools::getValue('sq_url', get_permalink($post_id));
|
models/Post.php
CHANGED
@@ -227,4 +227,239 @@ class SQ_Models_Post {
|
|
227 |
return false;
|
228 |
}
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
}
|
227 |
return false;
|
228 |
}
|
229 |
|
230 |
+
/**
|
231 |
+
* Save/Update Meta in database
|
232 |
+
*
|
233 |
+
* @param integer $post_id
|
234 |
+
* @param array $metas [key,value]
|
235 |
+
* @return array|boolean
|
236 |
+
*/
|
237 |
+
public function savePostMeta($post_id, $metas = array()) {
|
238 |
+
global $wpdb;
|
239 |
+
|
240 |
+
if ((int)$post_id == 0 || empty($metas))
|
241 |
+
return false;
|
242 |
+
|
243 |
+
foreach ($metas as $meta) {
|
244 |
+
$sql = "SELECT `meta_value`
|
245 |
+
FROM `" . $wpdb->postmeta . "`
|
246 |
+
WHERE `meta_key` = '" . $meta['key'] . "' AND `post_id`=" . (int)$post_id;
|
247 |
+
|
248 |
+
if ($wpdb->get_row($sql)) {
|
249 |
+
$sql = "UPDATE `" . $wpdb->postmeta . "`
|
250 |
+
SET `meta_value` = '" . addslashes($meta['value']) . "'
|
251 |
+
WHERE `meta_key` = '" . $meta['key'] . "' AND `post_id`=" . (int)$post_id;
|
252 |
+
} else {
|
253 |
+
$sql = "INSERT INTO `" . $wpdb->postmeta . "`
|
254 |
+
(`post_id`,`meta_key`,`meta_value`)
|
255 |
+
VALUES (" . (int)$post_id . ",'" . $meta['key'] . "','" . addslashes($meta['value']) . "')";
|
256 |
+
}
|
257 |
+
$wpdb->query($sql);
|
258 |
+
}
|
259 |
+
|
260 |
+
return $metas;
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* check if there are keywords saved
|
265 |
+
* @global object $wpdb
|
266 |
+
* @return integer|false
|
267 |
+
*/
|
268 |
+
public function countKeywords() {
|
269 |
+
global $wpdb;
|
270 |
+
|
271 |
+
if ($posts = $wpdb->get_row("SELECT count(`post_id`) as count
|
272 |
+
FROM `" . $wpdb->postmeta . "`
|
273 |
+
WHERE (`meta_key` = '_sq_post_keyword')")) {
|
274 |
+
|
275 |
+
return $posts->count;
|
276 |
+
}
|
277 |
+
|
278 |
+
return false;
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* check if there are keywords saved
|
283 |
+
* @global object $wpdb
|
284 |
+
* @return integer|false
|
285 |
+
*/
|
286 |
+
public function getPostWithKeywords($filter = '', $ord = 'meta_id') {
|
287 |
+
global $wpdb;
|
288 |
+
|
289 |
+
if ($filter <> '') {
|
290 |
+
$filter = ' AND (' . $filter . ') ';
|
291 |
+
}
|
292 |
+
|
293 |
+
if ($posts = $wpdb->get_results("SELECT `post_id`, `meta_value`
|
294 |
+
FROM `" . $wpdb->postmeta . "`
|
295 |
+
WHERE (`meta_key` = '_sq_post_keyword')"
|
296 |
+
. $filter .
|
297 |
+
'ORDER BY `' . $ord . '`')) {
|
298 |
+
|
299 |
+
$posts = array_map(array($this, 'jsonDecodeValue'), $posts);
|
300 |
+
|
301 |
+
return $posts;
|
302 |
+
}
|
303 |
+
|
304 |
+
return false;
|
305 |
+
}
|
306 |
+
|
307 |
+
public function jsonDecodeValue($post) {
|
308 |
+
$post->meta_value = json_decode($post->meta_value);
|
309 |
+
return $post;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* get the keyword
|
314 |
+
* @global object $wpdb
|
315 |
+
* @param integer $post_id
|
316 |
+
* @return boolean
|
317 |
+
*/
|
318 |
+
public function getKeyword($post_id) {
|
319 |
+
global $wpdb;
|
320 |
+
|
321 |
+
if ($row = $wpdb->get_row("SELECT `post_id`, `meta_value`
|
322 |
+
FROM `" . $wpdb->postmeta . "`
|
323 |
+
WHERE (`meta_key` = '_sq_post_keyword' AND `post_id`=" . (int)$post_id . ")
|
324 |
+
ORDER BY `meta_id` DESC")) {
|
325 |
+
|
326 |
+
return json_decode($row->meta_value);
|
327 |
+
}
|
328 |
+
|
329 |
+
return false;
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Save the post keyword
|
334 |
+
* @param integer $post_id
|
335 |
+
* @param object $args
|
336 |
+
*/
|
337 |
+
public function saveKeyword($post_id, $args) {
|
338 |
+
$args->update = current_time('timestamp');
|
339 |
+
|
340 |
+
$meta[] = array('key' => '_sq_post_keyword',
|
341 |
+
'value' => json_encode($args));
|
342 |
+
|
343 |
+
$this->savePostMeta($post_id, $meta);
|
344 |
+
|
345 |
+
return json_encode($args);
|
346 |
+
}
|
347 |
+
|
348 |
+
public function getKeywordsFromPost($id) {
|
349 |
+
$post = get_post($id);
|
350 |
+
return $this->_getKeywordsbyDensity($post);
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Get keyword by density from post
|
355 |
+
*
|
356 |
+
* @return array
|
357 |
+
*/
|
358 |
+
private function _getKeywordsbyDensity($post) {
|
359 |
+
$keywords = array();
|
360 |
+
$content = '';
|
361 |
+
|
362 |
+
if (function_exists('preg_replace')) {
|
363 |
+
$content = strtolower(preg_replace('/[^a-zA-Z0-9-.]/', ' ', strip_tags($post->post_content)));
|
364 |
+
} else {
|
365 |
+
$content = strtolower(strip_tags($post->post_content));
|
366 |
+
}
|
367 |
+
|
368 |
+
$words = explode(" ", $content);
|
369 |
+
$phrases = $this->searchPhrase($content);
|
370 |
+
|
371 |
+
if ($post->post_title == '' || count((array)$words) < 5) {
|
372 |
+
return false;
|
373 |
+
}
|
374 |
+
|
375 |
+
$common_words = "a,at,i,he,she,it,and,me,my,you,the,tags,hash,to,that,this,they,their";
|
376 |
+
$common_words = strtolower($common_words);
|
377 |
+
$common_words = explode(",", $common_words);
|
378 |
+
// Get keywords
|
379 |
+
$words_sum = 0;
|
380 |
+
foreach ($words as $value) {
|
381 |
+
$common = false;
|
382 |
+
$value = $this->trimReplace($value);
|
383 |
+
if (strlen($value) >= 3) {
|
384 |
+
foreach ($common_words as $common_word) {
|
385 |
+
if ($common_word == $value) {
|
386 |
+
$common = true;
|
387 |
+
}
|
388 |
+
}
|
389 |
+
if ($common != true) {
|
390 |
+
if (!preg_match("/http/i", $value) && !preg_match("/mailto:/i", $value)) {
|
391 |
+
$keywords[] = SQ_Classes_Tools::i18n($value);
|
392 |
+
$words_sum++;
|
393 |
+
}
|
394 |
+
}
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
$results = $results1 = $results2 = array();
|
399 |
+
if (is_array($keywords) && !empty($keywords)) {
|
400 |
+
// Do some maths and write array
|
401 |
+
$keywords = array_count_values($keywords);
|
402 |
+
arsort($keywords);
|
403 |
+
|
404 |
+
foreach ($keywords as $key => $value) {
|
405 |
+
$percent = 100 / $words_sum * $value;
|
406 |
+
if ($percent > 1) {
|
407 |
+
foreach ($phrases as $phrase => $count) {
|
408 |
+
if (strpos($phrase, $key) !== false && !in_array($phrase, $results)) {
|
409 |
+
if (strpos(strtolower($post->post_title), $phrase) !== false) {
|
410 |
+
return $phrase;
|
411 |
+
}
|
412 |
+
}
|
413 |
+
}
|
414 |
+
}
|
415 |
+
}
|
416 |
+
}
|
417 |
+
// Return array
|
418 |
+
return false;
|
419 |
+
}
|
420 |
+
|
421 |
+
public function searchPhrase($text) {
|
422 |
+
$words = explode(".", strtolower($text));
|
423 |
+
//print_r($words);
|
424 |
+
$frequencies = array();
|
425 |
+
foreach ($words as $str) {
|
426 |
+
$phrases = $this->twoWordPhrases($str);
|
427 |
+
|
428 |
+
foreach ($phrases as $phrase) {
|
429 |
+
$key = join(' ', $phrase);
|
430 |
+
if (!isset($frequencies[$key])) {
|
431 |
+
$frequencies[$key] = 0;
|
432 |
+
}
|
433 |
+
$frequencies[$key]++;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
arsort($frequencies);
|
437 |
+
if (sizeof($frequencies) > 10) {
|
438 |
+
$frequencies = array_slice($frequencies, 0, 10);
|
439 |
+
}
|
440 |
+
return $frequencies;
|
441 |
+
}
|
442 |
+
|
443 |
+
public function twoWordPhrases($str) {
|
444 |
+
$words = preg_split('#\s+#', $str, -1, PREG_SPLIT_NO_EMPTY);
|
445 |
+
|
446 |
+
$phrases = array();
|
447 |
+
if (count((array)$words) > 2) {
|
448 |
+
foreach (range(0, count((array)$words) - 2) as $offset) {
|
449 |
+
$phrases[] = array_slice($words, $offset, 2);
|
450 |
+
}
|
451 |
+
}
|
452 |
+
return $phrases;
|
453 |
+
}
|
454 |
+
|
455 |
+
/**
|
456 |
+
* Get the newlines out
|
457 |
+
*
|
458 |
+
* @return string
|
459 |
+
*/
|
460 |
+
private function trimReplace($string) {
|
461 |
+
$string = trim($string);
|
462 |
+
return (string)str_replace(array("\r", "\r\n", "\n"), '', $string);
|
463 |
+
}
|
464 |
+
|
465 |
}
|
models/bulkseo/Metas.php
CHANGED
@@ -25,6 +25,12 @@ class SQ_Models_Bulkseo_Metas extends SQ_Models_Abstract_Assistant {
|
|
25 |
|
26 |
$this->_keyword = $this->_post->sq->keywords;
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
//Get all the patterns
|
29 |
$this->_patterns = SQ_Classes_Helpers_Tools::getOption('patterns');
|
30 |
|
25 |
|
26 |
$this->_keyword = $this->_post->sq->keywords;
|
27 |
|
28 |
+
if (!$this->_keyword) {
|
29 |
+
if (isset($this->_post->ID) && $json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($this->_post->ID)) {
|
30 |
+
$this->_keyword = $json->keyword;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
//Get all the patterns
|
35 |
$this->_patterns = SQ_Classes_Helpers_Tools::getOption('patterns');
|
36 |
|
models/domain/Patterns.php
CHANGED
@@ -466,21 +466,34 @@ class SQ_Models_Domain_Patterns extends SQ_Models_Abstract_Domain {
|
|
466 |
}
|
467 |
|
468 |
protected $_caption; //Attachment caption
|
469 |
-
|
470 |
-
//handle keywords
|
471 |
-
protected $_keywords;
|
472 |
protected $_keyword; //Replaced with the posts focus keyword
|
473 |
protected $_focuskw; //Same as keyword
|
474 |
|
475 |
-
public function setKeywords($value) {
|
476 |
-
$this->_focuskw = $this->_keyword =$value;
|
477 |
-
}
|
478 |
-
|
479 |
public function getKeyword() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
return $this->_keyword;
|
481 |
}
|
482 |
|
483 |
public function getFocuskw() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
return $this->_focuskw;
|
485 |
}
|
486 |
|
466 |
}
|
467 |
|
468 |
protected $_caption; //Attachment caption
|
|
|
|
|
|
|
469 |
protected $_keyword; //Replaced with the posts focus keyword
|
470 |
protected $_focuskw; //Same as keyword
|
471 |
|
|
|
|
|
|
|
|
|
472 |
public function getKeyword() {
|
473 |
+
if (!isset($this->_keyword) || $this->_keyword == '') {
|
474 |
+
if (isset($this->id) && (int)$this->id > 0) {
|
475 |
+
if ($json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($this->id)) {
|
476 |
+
$this->_focuskw = $this->_keyword = SQ_Classes_Helpers_Sanitize::i18n($json->keyword);
|
477 |
+
return $this->_keyword;
|
478 |
+
}
|
479 |
+
}
|
480 |
+
$this->_keyword = '';
|
481 |
+
}
|
482 |
+
|
483 |
return $this->_keyword;
|
484 |
}
|
485 |
|
486 |
public function getFocuskw() {
|
487 |
+
if (!isset($this->_focuskw) || $this->_focuskw == '') {
|
488 |
+
if (isset($this->id) && (int)$this->id > 0) {
|
489 |
+
if ($json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($this->id)) {
|
490 |
+
$this->_focuskw = $this->_keyword = SQ_Classes_Helpers_Sanitize::i18n($json->keyword);
|
491 |
+
return $this->_focuskw;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
$this->_focuskw = '';
|
495 |
+
}
|
496 |
+
|
497 |
return $this->_focuskw;
|
498 |
}
|
499 |
|
readme.txt
CHANGED
@@ -295,11 +295,6 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
|
|
295 |
Squirrly SEO 9.1.00 it's a big update. We've re-designed the UX and added many new features. If you don't want to change the current experience you have with Squirrly you can remain on the current stable version of Squirrly SEO.
|
296 |
|
297 |
== Changelog ==
|
298 |
-
= 9.2.11 - 09/11/2019 =
|
299 |
-
* SEO Update - Tested and Compatible with WordPress 5.2.3
|
300 |
-
* Fix - ranking assistant to set all green on average possitions
|
301 |
-
* Fix - Fixed the Squirrly SEO Admin role
|
302 |
-
|
303 |
= 9.2.10 - 09/03/2019 =
|
304 |
* Update - Squirrly Live Assistant for multiple languages
|
305 |
* Update - my.squirrly.co to post on WordPress through a secure connection
|
@@ -309,6 +304,7 @@ Squirrly SEO 9.1.00 it's a big update. We've re-designed the UX and added many n
|
|
309 |
* Fix - User Role Management when Admin has multiple roles
|
310 |
* Fix - Sitemap terms exclude empty tags and categories
|
311 |
* Fix - Sitemap taxonomi limit included to prevent timeouts
|
|
|
312 |
* Fix - Fix small bugs
|
313 |
|
314 |
= 9.2.01 - 08/20/2019 =
|
295 |
Squirrly SEO 9.1.00 it's a big update. We've re-designed the UX and added many new features. If you don't want to change the current experience you have with Squirrly you can remain on the current stable version of Squirrly SEO.
|
296 |
|
297 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
298 |
= 9.2.10 - 09/03/2019 =
|
299 |
* Update - Squirrly Live Assistant for multiple languages
|
300 |
* Update - my.squirrly.co to post on WordPress through a secure connection
|
304 |
* Fix - User Role Management when Admin has multiple roles
|
305 |
* Fix - Sitemap terms exclude empty tags and categories
|
306 |
* Fix - Sitemap taxonomi limit included to prevent timeouts
|
307 |
+
* Fix - Fixed the Squirrly SEO Admin role
|
308 |
* Fix - Fix small bugs
|
309 |
|
310 |
= 9.2.01 - 08/20/2019 =
|
squirrly.php
CHANGED
@@ -7,12 +7,12 @@
|
|
7 |
Plugin URI: https://www.squirrly.co
|
8 |
Description: SEO By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
|
9 |
Author: Squirrly SEO
|
10 |
-
Version: 9.2.
|
11 |
Author URI: https://www.squirrly.co
|
12 |
*/
|
13 |
if (!defined('SQ_VERSION')) {
|
14 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
15 |
-
define('SQ_VERSION', '9.2.
|
16 |
//The last stable version
|
17 |
define('SQ_STABLE_VERSION', '9.2.00');
|
18 |
// Call config files
|
7 |
Plugin URI: https://www.squirrly.co
|
8 |
Description: SEO By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
|
9 |
Author: Squirrly SEO
|
10 |
+
Version: 9.2.10
|
11 |
Author URI: https://www.squirrly.co
|
12 |
*/
|
13 |
if (!defined('SQ_VERSION')) {
|
14 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
15 |
+
define('SQ_VERSION', '9.2.10');
|
16 |
//The last stable version
|
17 |
define('SQ_STABLE_VERSION', '9.2.00');
|
18 |
// Call config files
|
view/Blocks/SLASearch.php
CHANGED
@@ -24,14 +24,18 @@
|
|
24 |
</div>
|
25 |
<div class="sq_keyword">
|
26 |
<?php
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
?>
|
29 |
<div id="sq_keyword_help" style="display:none">
|
30 |
<span></span><?php _e('Enter a keyword', _SQ_PLUGIN_NAME_); ?>
|
31 |
<p><?php _e('for Squirrly Live SEO optimization', _SQ_PLUGIN_NAME_); ?></p></div><?php
|
32 |
}
|
33 |
?>
|
34 |
-
<input type="text" id="sq_keyword" name="sq_keyword" value="" autocomplete="off" placeholder="<?php echo __('Type in your keyword...', _SQ_PLUGIN_NAME_) ?>"/>
|
35 |
<input type="button" id="sq_keyword_check" value=">"/>
|
36 |
|
37 |
<div id="sq_suggestion" style="display:none">
|
24 |
</div>
|
25 |
<div class="sq_keyword">
|
26 |
<?php
|
27 |
+
global $post;
|
28 |
+
$sq_keyword = '';
|
29 |
+
if (isset($post->ID) && $json = SQ_Classes_ObjController::getClass('SQ_Models_Post')->getKeyword($post->ID)) {
|
30 |
+
$sq_keyword = SQ_Classes_Helpers_Sanitize::i18n($json->keyword);
|
31 |
+
} elseif (SQ_Classes_Helpers_Tools::getOption('sq_keyword_help')) {
|
32 |
?>
|
33 |
<div id="sq_keyword_help" style="display:none">
|
34 |
<span></span><?php _e('Enter a keyword', _SQ_PLUGIN_NAME_); ?>
|
35 |
<p><?php _e('for Squirrly Live SEO optimization', _SQ_PLUGIN_NAME_); ?></p></div><?php
|
36 |
}
|
37 |
?>
|
38 |
+
<input type="text" id="sq_keyword" name="sq_keyword" value="<?php echo $sq_keyword ?>" autocomplete="off" placeholder="<?php echo __('Type in your keyword...', _SQ_PLUGIN_NAME_) ?>"/>
|
39 |
<input type="button" id="sq_keyword_check" value=">"/>
|
40 |
|
41 |
<div id="sq_suggestion" style="display:none">
|