Version Description
- 08/12/2022 = Update - SLA compatibility with Zion Builder Update - SLA compatibility with WPBakery Page Builder Update - Style for the Sitemap News using sitemapnews.xsl Update - SEO Audits page to show the number of pages present in the audit Fix - load SEO metas late on AMP pages for compatibility with AMP plugins Fix - Don't load SEO Snippet on frontend when AMP is detected to avoid compatibility error with AMP plugin Fix - Make sure the keywords from briefcase are shown correctly in research, history and suggested page
Download this release
Release Info
Developer | cifi |
Plugin | SEO SQUIRRLY™ |
Version | 12.1.11 |
Comparing to | |
See all releases |
Code changes from version 12.1.10 to 12.1.11
- classes/ActionController.php +0 -1
- classes/DisplayController.php +2 -5
- classes/RemoteController.php +1 -1
- classes/helpers/Sanitize.php +0 -26
- classes/helpers/Tools.php +5 -2
- controllers/Audits.php +6 -8
- controllers/Patterns.php +10 -10
- controllers/Post.php +0 -31
- controllers/Sitemaps.php +15 -3
- core/BlockFeatures.php +34 -6
- models/Assistant.php +15 -2
- models/Audits.php +8 -4
- models/Compatibility.php +39 -39
- models/Frontend.php +5 -10
- models/ImportExport.php +0 -2
- models/Post.php +3 -168
- models/Settings.php +0 -3
- models/Sitemaps.php +4 -1
- models/abstract/Seo.php +17 -17
- models/focuspages/Image.php +9 -5
- models/focuspages/Innerlinks.php +3 -7
- models/services/JsonLD.php +7 -0
- models/services/Redirects.php +6 -4
- models/services/Verify.php +3 -7
- readme.txt +17 -2
- squirrly.php +3 -3
- view/Assistant/Settings.php +3 -1
- view/Audits/AuditPages.php +1 -1
- view/Automation/Automation.php +233 -207
- view/Ranking/Rankings.php +2 -5
- view/SeoSettings/Webmaster.php +0 -11
- view/assets/css/sitemap.xsl +4 -13
- view/assets/css/sitemapindex.xsl +51 -60
- view/assets/css/sitemapnews.xsl +57 -0
- view/assets/css/sqbootstrap.min.css +1 -1
- view/assets/js/assistant/sq_blockseo.min.js +1 -1
- view/assets/js/assistant/sq_frontend.min.js +1 -1
- view/assets/js/assistant/squirrly.min.js +1 -1
classes/ActionController.php
CHANGED
@@ -112,7 +112,6 @@ class SQ_Classes_ActionController extends SQ_Classes_FrontController
|
|
112 |
'description' => 'Post Page',
|
113 |
'actions' => array(
|
114 |
'action' => array(
|
115 |
-
'sq_ajax_save_ogimage',
|
116 |
'sq_ajax_get_post',
|
117 |
'sq_ajax_save_post',
|
118 |
'sq_ajax_type_click',
|
112 |
'description' => 'Post Page',
|
113 |
'actions' => array(
|
114 |
'action' => array(
|
|
|
115 |
'sq_ajax_get_post',
|
116 |
'sq_ajax_save_post',
|
117 |
'sq_ajax_type_click',
|
classes/DisplayController.php
CHANGED
@@ -24,10 +24,7 @@ class SQ_Classes_DisplayController
|
|
24 |
}
|
25 |
|
26 |
if (empty($params)) {
|
27 |
-
$params = array(
|
28 |
-
'trigger' => false,
|
29 |
-
'media' => 'all'
|
30 |
-
);
|
31 |
}
|
32 |
|
33 |
$css_uri = '';
|
@@ -71,7 +68,7 @@ class SQ_Classes_DisplayController
|
|
71 |
|
72 |
if ($css_uri <> '') {
|
73 |
if (!wp_style_is($name)) {
|
74 |
-
wp_enqueue_style($name, $css_uri, null, SQ_VERSION,
|
75 |
|
76 |
if (is_admin() || (isset($params['trigger']) && $params['trigger'] === true)) { //load CSS for admin or on triggered
|
77 |
wp_print_styles(array($name));
|
24 |
}
|
25 |
|
26 |
if (empty($params)) {
|
27 |
+
$params = array('trigger' => false);
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
$css_uri = '';
|
68 |
|
69 |
if ($css_uri <> '') {
|
70 |
if (!wp_style_is($name)) {
|
71 |
+
wp_enqueue_style($name, $css_uri, null, SQ_VERSION, 'all');
|
72 |
|
73 |
if (is_admin() || (isset($params['trigger']) && $params['trigger'] === true)) { //load CSS for admin or on triggered
|
74 |
wp_print_styles(array($name));
|
classes/RemoteController.php
CHANGED
@@ -54,7 +54,7 @@ class SQ_Classes_RemoteController
|
|
54 |
|
55 |
//call it with http to prevent curl issues with ssls
|
56 |
$url = self::cleanUrl(_SQ_APIV2_URL_ . $module . "?" . $parameters);
|
57 |
-
|
58 |
if (!isset(self::$cache[md5($url)])) {
|
59 |
if ($options['method'] == 'post') {
|
60 |
$options['body'] = $args;
|
54 |
|
55 |
//call it with http to prevent curl issues with ssls
|
56 |
$url = self::cleanUrl(_SQ_APIV2_URL_ . $module . "?" . $parameters);
|
57 |
+
|
58 |
if (!isset(self::$cache[md5($url)])) {
|
59 |
if ($options['method'] == 'post') {
|
60 |
$options['body'] = $args;
|
classes/helpers/Sanitize.php
CHANGED
@@ -426,32 +426,6 @@ class SQ_Classes_Helpers_Sanitize
|
|
426 |
return $code;
|
427 |
}
|
428 |
|
429 |
-
/**
|
430 |
-
* Check the Alexa code saved at settings
|
431 |
-
*
|
432 |
-
* @return string
|
433 |
-
*/
|
434 |
-
public static function checkAlexaCode($code)
|
435 |
-
{
|
436 |
-
if ($code <> '') {
|
437 |
-
$code = stripslashes($code);
|
438 |
-
|
439 |
-
|
440 |
-
if (strpos($code, 'content') !== false) {
|
441 |
-
preg_match('/content\\s*=\\s*[\"]([^\"]+)[\"]/i', $code, $result);
|
442 |
-
if (isset($result[1]) && !empty($result[1])) $code = $result[1];
|
443 |
-
}
|
444 |
-
|
445 |
-
if (strpos($code, '"') !== false) {
|
446 |
-
preg_match('/[\"]([^\"]+)[\"]/i', $code, $result);
|
447 |
-
if (isset($result[1]) && !empty($result[1])) $code = $result[1];
|
448 |
-
}
|
449 |
-
|
450 |
-
if ($code == '') SQ_Classes_Error::setError(esc_html__("The code for Alexa is incorrect.", 'squirrly-seo'));
|
451 |
-
}
|
452 |
-
return $code;
|
453 |
-
}
|
454 |
-
|
455 |
/**
|
456 |
* Check the twitter account
|
457 |
*
|
426 |
return $code;
|
427 |
}
|
428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
/**
|
430 |
* Check the twitter account
|
431 |
*
|
classes/helpers/Tools.php
CHANGED
@@ -100,7 +100,7 @@ class SQ_Classes_Helpers_Tools
|
|
100 |
.ml-stars svg:hover ~ svg{fill:none}
|
101 |
</style>';
|
102 |
|
103 |
-
$meta[] = "<a href='https://howto12.squirrly.co/
|
104 |
$meta[] = "<a href='https://wordpress.org/support/plugin/squirrly-seo/reviews/#new-post' target='_blank' title='" . esc_html__("Leave a review", 'squirrly-seo') . "'><i class='ml-stars'><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg></i></a>";
|
105 |
}
|
106 |
return $meta;
|
@@ -416,7 +416,6 @@ class SQ_Classes_Helpers_Tools
|
|
416 |
'baidu_wt' => "",
|
417 |
'yandex_wt' => "",
|
418 |
'pinterest_verify' => "",
|
419 |
-
'alexa_verify' => "",
|
420 |
'norton_verify' => "",
|
421 |
),
|
422 |
|
@@ -460,6 +459,7 @@ class SQ_Classes_Helpers_Tools
|
|
460 |
'do_analytics' => 1,
|
461 |
'do_fpixel' => 1,
|
462 |
'do_redirects' => 1,
|
|
|
463 |
),
|
464 |
'page' => array(
|
465 |
'protected' => 1,
|
@@ -479,6 +479,7 @@ class SQ_Classes_Helpers_Tools
|
|
479 |
'do_analytics' => 1,
|
480 |
'do_fpixel' => 1,
|
481 |
'do_redirects' => 1,
|
|
|
482 |
),
|
483 |
'product' => array(
|
484 |
'protected' => 1,
|
@@ -498,6 +499,7 @@ class SQ_Classes_Helpers_Tools
|
|
498 |
'do_analytics' => 1,
|
499 |
'do_fpixel' => 1,
|
500 |
'do_redirects' => 1,
|
|
|
501 |
),
|
502 |
'category' => array(
|
503 |
'protected' => 1,
|
@@ -782,6 +784,7 @@ class SQ_Classes_Helpers_Tools
|
|
782 |
'do_analytics' => 1,
|
783 |
'do_fpixel' => 1,
|
784 |
'do_redirects' => 0,
|
|
|
785 |
),
|
786 |
)
|
787 |
|
100 |
.ml-stars svg:hover ~ svg{fill:none}
|
101 |
</style>';
|
102 |
|
103 |
+
$meta[] = "<a href='https://howto12.squirrly.co/kb/install-squirrly-seo-plugin/' target='_blank'>" . esc_html__("Documentation", 'squirrly-seo') . "</a>";
|
104 |
$meta[] = "<a href='https://wordpress.org/support/plugin/squirrly-seo/reviews/#new-post' target='_blank' title='" . esc_html__("Leave a review", 'squirrly-seo') . "'><i class='ml-stars'><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg></i></a>";
|
105 |
}
|
106 |
return $meta;
|
416 |
'baidu_wt' => "",
|
417 |
'yandex_wt' => "",
|
418 |
'pinterest_verify' => "",
|
|
|
419 |
'norton_verify' => "",
|
420 |
),
|
421 |
|
459 |
'do_analytics' => 1,
|
460 |
'do_fpixel' => 1,
|
461 |
'do_redirects' => 1,
|
462 |
+
'google_news' => 1,
|
463 |
),
|
464 |
'page' => array(
|
465 |
'protected' => 1,
|
479 |
'do_analytics' => 1,
|
480 |
'do_fpixel' => 1,
|
481 |
'do_redirects' => 1,
|
482 |
+
'google_news' => 0,
|
483 |
),
|
484 |
'product' => array(
|
485 |
'protected' => 1,
|
499 |
'do_analytics' => 1,
|
500 |
'do_fpixel' => 1,
|
501 |
'do_redirects' => 1,
|
502 |
+
'google_news' => 0,
|
503 |
),
|
504 |
'category' => array(
|
505 |
'protected' => 1,
|
784 |
'do_analytics' => 1,
|
785 |
'do_fpixel' => 1,
|
786 |
'do_redirects' => 0,
|
787 |
+
'google_news' => 0,
|
788 |
),
|
789 |
)
|
790 |
|
controllers/Audits.php
CHANGED
@@ -351,14 +351,12 @@ class SQ_Controllers_Audits extends SQ_Classes_FrontController
|
|
351 |
return;
|
352 |
}
|
353 |
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
}
|
361 |
-
} else {
|
362 |
SQ_Classes_Error::setError(esc_html__("The audit for all pages can be made once an hour.", 'squirrly-seo') . " <br /> ");
|
363 |
}
|
364 |
break;
|
351 |
return;
|
352 |
}
|
353 |
|
354 |
+
$auditpage = SQ_Classes_RemoteController::updateAudit();
|
355 |
+
|
356 |
+
if (!is_wp_error($auditpage)) {
|
357 |
+
SQ_Classes_Error::setError(esc_html__("Audit page sent for recheck. It may take a while so please be patient.", 'squirrly-seo') . " <br /> ", 'success');
|
358 |
+
set_transient('sq_auditpage_all', time());
|
359 |
+
} elseif ($auditpage->get_error_message() == 'too_many_attempts') {
|
|
|
|
|
360 |
SQ_Classes_Error::setError(esc_html__("The audit for all pages can be made once an hour.", 'squirrly-seo') . " <br /> ");
|
361 |
}
|
362 |
break;
|
controllers/Patterns.php
CHANGED
@@ -5,21 +5,21 @@ class SQ_Controllers_Patterns extends SQ_Classes_FrontController
|
|
5 |
{
|
6 |
|
7 |
/**
|
8 |
-
*
|
9 |
*
|
10 |
-
* @var SQ_Models_Domain_Patterns $patterns
|
11 |
*/
|
12 |
public $patterns;
|
13 |
|
14 |
-
public function init()
|
15 |
{
|
16 |
if (is_rtl()) {
|
17 |
-
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap.rtl', array('trigger' => true
|
18 |
-
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl', array('trigger' => true
|
19 |
} else {
|
20 |
-
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap', array('trigger' => true
|
21 |
}
|
22 |
-
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('patterns', array('trigger' => true
|
23 |
|
24 |
echo '
|
25 |
<script>
|
@@ -35,7 +35,7 @@ class SQ_Controllers_Patterns extends SQ_Classes_FrontController
|
|
35 |
* @param SQ_Models_Domain_Post $post
|
36 |
* @return SQ_Models_Domain_Post | false
|
37 |
*/
|
38 |
-
public function replacePatterns($post)
|
39 |
{
|
40 |
if ($post instanceof SQ_Models_Domain_Post) {
|
41 |
//set the patterns based on the current post
|
@@ -64,7 +64,7 @@ class SQ_Controllers_Patterns extends SQ_Classes_FrontController
|
|
64 |
* @param $object
|
65 |
* @return mixed
|
66 |
*/
|
67 |
-
public function processPatterns($values, $object)
|
68 |
{
|
69 |
|
70 |
//Foreach SQ, if has patterns, replace them
|
@@ -116,7 +116,7 @@ class SQ_Controllers_Patterns extends SQ_Classes_FrontController
|
|
116 |
*
|
117 |
* @return void
|
118 |
*/
|
119 |
-
public function action()
|
120 |
{
|
121 |
parent::action();
|
122 |
|
5 |
{
|
6 |
|
7 |
/**
|
8 |
+
*
|
9 |
*
|
10 |
+
* @var SQ_Models_Domain_Patterns $patterns
|
11 |
*/
|
12 |
public $patterns;
|
13 |
|
14 |
+
public function init()
|
15 |
{
|
16 |
if (is_rtl()) {
|
17 |
+
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap.rtl', array('trigger' => true));
|
18 |
+
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('rtl', array('trigger' => true));
|
19 |
} else {
|
20 |
+
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('sqbootstrap', array('trigger' => true));
|
21 |
}
|
22 |
+
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('patterns', array('trigger' => true));
|
23 |
|
24 |
echo '
|
25 |
<script>
|
35 |
* @param SQ_Models_Domain_Post $post
|
36 |
* @return SQ_Models_Domain_Post | false
|
37 |
*/
|
38 |
+
public function replacePatterns($post)
|
39 |
{
|
40 |
if ($post instanceof SQ_Models_Domain_Post) {
|
41 |
//set the patterns based on the current post
|
64 |
* @param $object
|
65 |
* @return mixed
|
66 |
*/
|
67 |
+
public function processPatterns($values, $object)
|
68 |
{
|
69 |
|
70 |
//Foreach SQ, if has patterns, replace them
|
116 |
*
|
117 |
* @return void
|
118 |
*/
|
119 |
+
public function action()
|
120 |
{
|
121 |
parent::action();
|
122 |
|
controllers/Post.php
CHANGED
@@ -326,37 +326,6 @@ class SQ_Controllers_Post extends SQ_Classes_FrontController
|
|
326 |
parent::action();
|
327 |
switch (SQ_Classes_Helpers_Tools::getValue('action')) {
|
328 |
/** AJAX CALLS ***/
|
329 |
-
case 'sq_ajax_save_ogimage':
|
330 |
-
if (!SQ_Classes_Helpers_Tools::userCan('sq_manage_snippet')) {
|
331 |
-
$response['error'] = SQ_Classes_Error::showNotices(esc_html__("You do not have permission to perform this action", 'squirrly-seo'), 'sq_error');
|
332 |
-
SQ_Classes_Helpers_Tools::setHeader('json');
|
333 |
-
echo wp_json_encode($response);
|
334 |
-
exit();
|
335 |
-
}
|
336 |
-
|
337 |
-
if (!empty($_FILES['ogimage'])) {
|
338 |
-
$return = $this->model->addImage($_FILES['ogimage']);
|
339 |
-
}
|
340 |
-
if (isset($return['file'])) {
|
341 |
-
$return['filename'] = basename($return['file']);
|
342 |
-
$local_file = str_replace($return['filename'], urlencode($return['filename']), $return['url']);
|
343 |
-
$attach_id = wp_insert_attachment(
|
344 |
-
array(
|
345 |
-
'post_mime_type' => $return['type'],
|
346 |
-
'post_title' => preg_replace('/\.[^.]+$/', '', $return['filename']),
|
347 |
-
'post_content' => '',
|
348 |
-
'post_status' => 'inherit',
|
349 |
-
'guid' => $local_file
|
350 |
-
), $return['file'], SQ_Classes_Helpers_Tools::getValue('post_id')
|
351 |
-
);
|
352 |
-
|
353 |
-
$attach_data = wp_generate_attachment_metadata($attach_id, $return['file']);
|
354 |
-
wp_update_attachment_metadata($attach_id, $attach_data);
|
355 |
-
}
|
356 |
-
SQ_Classes_Helpers_Tools::setHeader('json');
|
357 |
-
|
358 |
-
echo wp_json_encode($return);
|
359 |
-
exit();
|
360 |
case 'sq_ajax_save_post':
|
361 |
SQ_Classes_Helpers_Tools::setHeader('json');
|
362 |
|
326 |
parent::action();
|
327 |
switch (SQ_Classes_Helpers_Tools::getValue('action')) {
|
328 |
/** AJAX CALLS ***/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
case 'sq_ajax_save_post':
|
330 |
SQ_Classes_Helpers_Tools::setHeader('json');
|
331 |
|
controllers/Sitemaps.php
CHANGED
@@ -157,8 +157,6 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController
|
|
157 |
}
|
158 |
}
|
159 |
|
160 |
-
|
161 |
-
|
162 |
//show products
|
163 |
if ($this->model->type == 'sitemap-product') {
|
164 |
if (SQ_Classes_Helpers_Tools::isEcommerce() && $sq_sitemap[$this->model->type][1] == 2) {
|
@@ -171,6 +169,16 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController
|
|
171 |
//PREPARE CUSTOM QUERIES
|
172 |
switch ($this->model->type) {
|
173 |
case 'sitemap-news':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
case 'sitemap-post':
|
175 |
$sq_query['posts_per_page'] = $this->posts_limit;
|
176 |
break;
|
@@ -256,8 +264,9 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController
|
|
256 |
|
257 |
public function getSquirrlyHeader($header)
|
258 |
{
|
|
|
259 |
if ($this->model->type <> 'locations') {
|
260 |
-
$header = '<?xml-stylesheet type="text/xsl" href="/' . _SQ_ASSETS_RELATIVE_URL_ . 'css/sitemap' . ($this->model->type == 'sitemap' ? 'index' : '') . '.xsl"?>' . "\n";
|
261 |
$header .= '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . "\n";
|
262 |
$header .= '<!-- generator="Squirrly SEO Sitemap" -->' . "\n";
|
263 |
$header .= '<!-- generator-url="https://wordpress.org/plugins/squirrly-seo/" -->' . "\n";
|
@@ -544,6 +553,9 @@ class SQ_Controllers_Sitemaps extends SQ_Classes_FrontController
|
|
544 |
*/
|
545 |
public function showPackXml($xml = array())
|
546 |
{
|
|
|
|
|
|
|
547 |
if (empty($xml)) {
|
548 |
$xml['contains'] = '';
|
549 |
}
|
157 |
}
|
158 |
}
|
159 |
|
|
|
|
|
160 |
//show products
|
161 |
if ($this->model->type == 'sitemap-product') {
|
162 |
if (SQ_Classes_Helpers_Tools::isEcommerce() && $sq_sitemap[$this->model->type][1] == 2) {
|
169 |
//PREPARE CUSTOM QUERIES
|
170 |
switch ($this->model->type) {
|
171 |
case 'sitemap-news':
|
172 |
+
//integration with webstory plguin for Google News
|
173 |
+
foreach (SQ_Classes_Helpers_Tools::getOption('patterns') as $pattern => $type) {
|
174 |
+
if(isset($type['google_news']) && $type['google_news'] == 1){
|
175 |
+
array_push($sq_query['post_type'],$pattern);
|
176 |
+
}
|
177 |
+
}
|
178 |
+
$sq_query['date_query'] = array(
|
179 |
+
'after' => 'midnight 2 days ago',
|
180 |
+
'inclusive' => true,
|
181 |
+
);
|
182 |
case 'sitemap-post':
|
183 |
$sq_query['posts_per_page'] = $this->posts_limit;
|
184 |
break;
|
264 |
|
265 |
public function getSquirrlyHeader($header)
|
266 |
{
|
267 |
+
|
268 |
if ($this->model->type <> 'locations') {
|
269 |
+
$header = '<?xml-stylesheet type="text/xsl" href="/' . _SQ_ASSETS_RELATIVE_URL_ . 'css/sitemap' . ($this->model->type == 'sitemap' ? 'index' : ($this->model->type == 'sitemap-news' ? 'news' : '')) . '.xsl"?>' . "\n";
|
270 |
$header .= '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . "\n";
|
271 |
$header .= '<!-- generator="Squirrly SEO Sitemap" -->' . "\n";
|
272 |
$header .= '<!-- generator-url="https://wordpress.org/plugins/squirrly-seo/" -->' . "\n";
|
553 |
*/
|
554 |
public function showPackXml($xml = array())
|
555 |
{
|
556 |
+
//clear the empty lines
|
557 |
+
$xml = array_filter($xml);
|
558 |
+
|
559 |
if (empty($xml)) {
|
560 |
$xml['contains'] = '';
|
561 |
}
|
core/BlockFeatures.php
CHANGED
@@ -329,7 +329,7 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
|
|
329 |
'show' => SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php'),
|
330 |
),//Live Assistant Thrive Architect
|
331 |
array(
|
332 |
-
'title' => "Bricks Website Builder
|
333 |
'description' => "The SEO Live Assistant <strong>works on the front-end of Bricks Website Builder</strong>, just as you're creating or editing your Bricks page.",
|
334 |
'category' => "Assistants",
|
335 |
'mainfeature' => false,
|
@@ -342,6 +342,34 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
|
|
342 |
'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#bricks',
|
343 |
'show' => SQ_Classes_Helpers_Tools::isThemeActive('bricks'),
|
344 |
),//Live Assistant Bricks Website Builder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
array(
|
346 |
'title' => "Blogging Assistant",
|
347 |
'description' => "Add relevant <strong>Copyright-Free images, Tweets, Wikis, Blog Excerpts</strong> in your posts.",
|
@@ -512,7 +540,7 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
|
|
512 |
), //Google Search Console
|
513 |
array(
|
514 |
'title' => "Webmaster Tools",
|
515 |
-
'description' => "Connect your website with the popular webmasters like <strong>Google Search Console (GSC), Bing, Baidu, Yandex
|
516 |
'category' => "Integration Features",
|
517 |
'mainfeature' => false,
|
518 |
'option' => 'sq_auto_webmasters',
|
@@ -567,8 +595,8 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
|
|
567 |
'show' => SQ_Classes_Helpers_Tools::getMenuVisible('show_audit'),
|
568 |
), //SEO Focus Pages Majestic
|
569 |
array(
|
570 |
-
'title' => "
|
571 |
-
'description' => "Receive <strong>
|
572 |
'category' => "Integration Features",
|
573 |
'mainfeature' => false,
|
574 |
'option' => false,
|
@@ -577,9 +605,9 @@ class SQ_Core_BlockFeatures extends SQ_Classes_BlockController
|
|
577 |
'connection' => true,
|
578 |
'logo' => 'fa-solid fa-puzzle-piece',
|
579 |
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_audits', 'audits'),
|
580 |
-
'details' => 'https://howto12.squirrly.co/kb/seo-audit/#
|
581 |
'show' => SQ_Classes_Helpers_Tools::getMenuVisible('show_audit'),
|
582 |
-
), //SEO Audit
|
583 |
array(
|
584 |
'title' => "Polylang",
|
585 |
'description' => "<strong>Multilingual Support</strong> with Polylang plugin for fast multilingual optimization. Load Squirrly Live Assistant, SEO Snippets and Sitemap XML based on Polylang language.",
|
329 |
'show' => SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php'),
|
330 |
),//Live Assistant Thrive Architect
|
331 |
array(
|
332 |
+
'title' => "Bricks Website Builder",
|
333 |
'description' => "The SEO Live Assistant <strong>works on the front-end of Bricks Website Builder</strong>, just as you're creating or editing your Bricks page.",
|
334 |
'category' => "Assistants",
|
335 |
'mainfeature' => false,
|
342 |
'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#bricks',
|
343 |
'show' => SQ_Classes_Helpers_Tools::isThemeActive('bricks'),
|
344 |
),//Live Assistant Bricks Website Builder
|
345 |
+
array(
|
346 |
+
'title' => "WPBakery Page Builder",
|
347 |
+
'description' => "The SEO Live Assistant <strong>works on the front-end of WPBakery Page Builder</strong>, just as you're creating or editing your WPBakery page.",
|
348 |
+
'category' => "Assistants",
|
349 |
+
'mainfeature' => false,
|
350 |
+
'option' => 'sq_sla_frontend',
|
351 |
+
'active' => SQ_Classes_Helpers_Tools::getOption('sq_sla_frontend'),
|
352 |
+
'optional' => true,
|
353 |
+
'connection' => false,
|
354 |
+
'logo' => 'fa-solid fa-message',
|
355 |
+
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_assistant', 'settings'),
|
356 |
+
'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#wpbakery',
|
357 |
+
'show' => SQ_Classes_Helpers_Tools::isPluginInstalled('js_composer/js_composer.php'),
|
358 |
+
),//Live Assistant WPBakery Builder
|
359 |
+
array(
|
360 |
+
'title' => "Zion Editor",
|
361 |
+
'description' => "The SEO Live Assistant <strong>works on the front-end of Zion Editor</strong>, just as you're creating or editing your Zion page.",
|
362 |
+
'category' => "Assistants",
|
363 |
+
'mainfeature' => false,
|
364 |
+
'option' => 'sq_sla_frontend',
|
365 |
+
'active' => SQ_Classes_Helpers_Tools::getOption('sq_sla_frontend'),
|
366 |
+
'optional' => true,
|
367 |
+
'connection' => false,
|
368 |
+
'logo' => 'fa-solid fa-message',
|
369 |
+
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_assistant', 'settings'),
|
370 |
+
'details' => 'https://howto12.squirrly.co/kb/squirrly-live-assistant/#zion',
|
371 |
+
'show' => SQ_Classes_Helpers_Tools::isPluginInstalled('zionbuilder/zionbuilder.php'),
|
372 |
+
),//Live Assistant Zion Editor
|
373 |
array(
|
374 |
'title' => "Blogging Assistant",
|
375 |
'description' => "Add relevant <strong>Copyright-Free images, Tweets, Wikis, Blog Excerpts</strong> in your posts.",
|
540 |
), //Google Search Console
|
541 |
array(
|
542 |
'title' => "Webmaster Tools",
|
543 |
+
'description' => "Connect your website with the popular webmasters like <strong>Google Search Console (GSC), Bing, Baidu, Yandex</strong>.",
|
544 |
'category' => "Integration Features",
|
545 |
'mainfeature' => false,
|
546 |
'option' => 'sq_auto_webmasters',
|
595 |
'show' => SQ_Classes_Helpers_Tools::getMenuVisible('show_audit'),
|
596 |
), //SEO Focus Pages Majestic
|
597 |
array(
|
598 |
+
'title' => "Semrush",
|
599 |
+
'description' => "Receive <strong>Semrush Rank and Backlinks</strong> information directly in your Audit report.",
|
600 |
'category' => "Integration Features",
|
601 |
'mainfeature' => false,
|
602 |
'option' => false,
|
605 |
'connection' => true,
|
606 |
'logo' => 'fa-solid fa-puzzle-piece',
|
607 |
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_audits', 'audits'),
|
608 |
+
'details' => 'https://howto12.squirrly.co/kb/seo-audit/#semrush',
|
609 |
'show' => SQ_Classes_Helpers_Tools::getMenuVisible('show_audit'),
|
610 |
+
), //SEO Audit Semrush
|
611 |
array(
|
612 |
'title' => "Polylang",
|
613 |
'description' => "<strong>Multilingual Support</strong> with Polylang plugin for fast multilingual optimization. Load Squirrly Live Assistant, SEO Snippets and Sitemap XML based on Polylang language.",
|
models/Assistant.php
CHANGED
@@ -30,6 +30,7 @@ class SQ_Models_Assistant
|
|
30 |
$content .= '<ul id="sq_assistant_tasks_' . $category_name . '" class="p-0 m-0" >';
|
31 |
foreach ($tasks as $name => $task) {
|
32 |
|
|
|
33 |
$content .= '<li class="sq_task row p-2 mx-0 my-3 ' . (isset($task['status']) ? $task['status'] : '') . '" data-category="' . $category_name . '" data-name="' . $name . '" data-active="' . $task['active'] . '" data-completed="' . $task['completed'] . '" data-dismiss="modal">
|
34 |
<i class="fa-solid fa-check" title="' . $task['error_message'] . '"></i>
|
35 |
<div class="col p-1 m-0">' . $task['title'] . '</div>
|
@@ -186,31 +187,37 @@ class SQ_Models_Assistant
|
|
186 |
'title' => esc_html__("Activate METAs", 'squirrly-seo'),
|
187 |
'description' => sprintf(esc_html__("Activate the %sMETA settings%s from the Squirrly SEO Plugin. %s You can import ALL META settings you've made with other plugins in WordPress into your Squirrly SEO Plugin. That way everything will be kept 100%% intact, without any head-aches. %s To complete this task you need to activate: %s - Optimize the Titles%s - Optimize Descriptions %s - Add Canonical META Link %s Make sure you click on %sSave settings%s after you switch anything on or off.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'metas') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />', '<br />', '<br />', '<br /><br />', '<strong>', '</strong>'),
|
188 |
'function' => 'checkSettingsMetas',
|
|
|
189 |
),
|
190 |
'setup_jsonld' => array(
|
191 |
'title' => esc_html__("Activate JSON-LD", 'squirrly-seo'),
|
192 |
'description' => sprintf(esc_html__("%sJSON-LD Structured Data%s needs to be activated. %s The Duplicate Removal feature of Squirrly SEO will make sure that if you have more than one JSON-LD definition inside the source code of any URL, the definition created by Squirrly SEO will be the only one that remains. %s Make sure you setup all the information about your Organization or your Personal Brand here. %s To finish all the JSON-LD related setup, also visit the %sSocial Media Accounts%s section of our Settings page and write in your social media profiles for this site. %s Then, at URL-level you will be able to add custom JSON-LD if you're an advanced user.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'jsonld') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />', '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'social', array('#tab=accounts')) . '">', '</a>', '<br /><br />'),
|
193 |
'function' => 'checkSettingsJsonld',
|
|
|
194 |
),
|
195 |
'setup_og' => array(
|
196 |
'title' => esc_html__("Activate Open Graph", 'squirrly-seo'),
|
197 |
'description' => sprintf(esc_html__("Go to the %sSocial Media section%s.%sActivate Open Graph. (switch the toggle to ON) %s The Open Graph will help you control the way your posts look when people share your URLs to social media sites like Facebook and LinkedIN. %s It will also make your social media posts look great and gain you clicks to your site.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'social') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
|
198 |
'function' => 'checkSettingsSocialOG',
|
|
|
199 |
),
|
200 |
'setup_twc' => array(
|
201 |
'title' => esc_html__("Activate Twitter Card", 'squirrly-seo'),
|
202 |
'description' => sprintf(esc_html__("Go to the %sSocial Media section%s. %s - Activate Twitter Card. (from Twitter Card Settings: switch the toggle to ON) %s - Add your Twitter profile URL (go to the Social Media Accounts section to do this) %s The Twitter Card will help you control the way your posts look when people share your URLs on Twitter. %s It will also make your social media posts look great and gain you clicks to your site.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'social') . '">', '</a>', '<br /><br />', '<br />', '<br /><br />', '<br /><br />'),
|
203 |
'function' => 'checkSettingsSocialTWC',
|
|
|
204 |
),
|
205 |
'setup_sitemap' => array(
|
206 |
'title' => esc_html__("Activate Sitemap XML", 'squirrly-seo'),
|
207 |
'description' => sprintf(esc_html__("Activate your %sSitemap XML%s setting. Squirrly SEO will then generate your sitemap, according to different items you can set up. %s Use this to tell Google how often you bring new content to your site. %s Also, choose for which types of URLs you'll want to have sitemaps. It depends on your strategy. Leave the defaults if you're uncertain. Squirrly SEO chooses the best defaults for you. %s Make sure you include Images and Videos in the sitemap. It has been identified as a ranking factor, so it's good to have that.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'tweaks') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
|
208 |
'function' => 'checkSettingsSitemap',
|
|
|
209 |
),
|
210 |
'setup_ganalytics' => array(
|
211 |
'title' => esc_html__("Activate Google Analytics", 'squirrly-seo'),
|
212 |
'description' => sprintf(esc_html__("Go to the %sTracking Tools section%s. %s Add your Google Analytics ID to complete this setting. (find it in the tracking code that Google Analytics tells you to place on your site) %s Squirrly SEO will then add (automatically) your Google Analytics tracking code (in the format you desire) to every page of your site (according to rules you can modify in the Automation section).", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'webmaster#tab=trackers') . '">', '</a>', '<br /><br />', '<br /><br />'),
|
213 |
'function' => 'checkSettingsGoogleAnalytics',
|
|
|
214 |
),
|
215 |
// 'setup_fpixel' => array(
|
216 |
// 'title' => esc_html__("Activate Facebook Pixel", 'squirrly-seo'),
|
@@ -221,6 +228,7 @@ class SQ_Models_Assistant
|
|
221 |
'title' => esc_html__("Connect the Webmasters", 'squirrly-seo'),
|
222 |
'description' => sprintf(esc_html__("Go to the %sWebmasters section%s. %s This section makes it super easy to integrate different (important) 3rd party services with your WordPress. %s Some webmasters are optional, but Google Search Console is really important. %s Enter your Pinterest code, especially if you plan to expand your presence on Pinterest. It will %sactivate Rich Pins%s, which will completely boost your sales and visibility for any product or post that has great images.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'webmaster') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />', '<a href="https://developers.pinterest.com/tools/url-debugger/" target="_blank">', '</a>'),
|
223 |
'function' => 'checkSettingsWebmasters',
|
|
|
224 |
),
|
225 |
|
226 |
);
|
@@ -297,6 +305,12 @@ class SQ_Models_Assistant
|
|
297 |
}
|
298 |
|
299 |
foreach ($tasks as $name => &$task) {
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
if (!isset($this->_dbtasks[$category_name][$name]['completed'])) {
|
301 |
$this->_dbtasks[$category_name][$name]['completed'] = false;
|
302 |
}
|
@@ -491,8 +505,7 @@ class SQ_Models_Assistant
|
|
491 |
if (SQ_Classes_Helpers_Tools::getOption('sq_auto_webmasters')) {
|
492 |
$codes = json_decode(wp_json_encode(SQ_Classes_Helpers_Tools::getOption('codes')));
|
493 |
if (isset($codes->google_wt) && $codes->google_wt <> ''
|
494 |
-
|| isset($codes->bing_wt) && $codes->bing_wt <> ''
|
495 |
-
|| isset($codes->alexa_verify) && $codes->alexa_verify <> ''
|
496 |
|| isset($codes->baidu_wt) && $codes->baidu_wt <> ''
|
497 |
|| isset($codes->yandex_wt) && $codes->yandex_wt <> ''
|
498 |
|| isset($codes->norton_verify) && $codes->norton_verify <> ''
|
30 |
$content .= '<ul id="sq_assistant_tasks_' . $category_name . '" class="p-0 m-0" >';
|
31 |
foreach ($tasks as $name => $task) {
|
32 |
|
33 |
+
|
34 |
$content .= '<li class="sq_task row p-2 mx-0 my-3 ' . (isset($task['status']) ? $task['status'] : '') . '" data-category="' . $category_name . '" data-name="' . $name . '" data-active="' . $task['active'] . '" data-completed="' . $task['completed'] . '" data-dismiss="modal">
|
35 |
<i class="fa-solid fa-check" title="' . $task['error_message'] . '"></i>
|
36 |
<div class="col p-1 m-0">' . $task['title'] . '</div>
|
187 |
'title' => esc_html__("Activate METAs", 'squirrly-seo'),
|
188 |
'description' => sprintf(esc_html__("Activate the %sMETA settings%s from the Squirrly SEO Plugin. %s You can import ALL META settings you've made with other plugins in WordPress into your Squirrly SEO Plugin. That way everything will be kept 100%% intact, without any head-aches. %s To complete this task you need to activate: %s - Optimize the Titles%s - Optimize Descriptions %s - Add Canonical META Link %s Make sure you click on %sSave settings%s after you switch anything on or off.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'metas') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />', '<br />', '<br />', '<br /><br />', '<strong>', '</strong>'),
|
189 |
'function' => 'checkSettingsMetas',
|
190 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_metas')
|
191 |
),
|
192 |
'setup_jsonld' => array(
|
193 |
'title' => esc_html__("Activate JSON-LD", 'squirrly-seo'),
|
194 |
'description' => sprintf(esc_html__("%sJSON-LD Structured Data%s needs to be activated. %s The Duplicate Removal feature of Squirrly SEO will make sure that if you have more than one JSON-LD definition inside the source code of any URL, the definition created by Squirrly SEO will be the only one that remains. %s Make sure you setup all the information about your Organization or your Personal Brand here. %s To finish all the JSON-LD related setup, also visit the %sSocial Media Accounts%s section of our Settings page and write in your social media profiles for this site. %s Then, at URL-level you will be able to add custom JSON-LD if you're an advanced user.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'jsonld') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />', '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'social', array('#tab=accounts')) . '">', '</a>', '<br /><br />'),
|
195 |
'function' => 'checkSettingsJsonld',
|
196 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_jsonld')
|
197 |
),
|
198 |
'setup_og' => array(
|
199 |
'title' => esc_html__("Activate Open Graph", 'squirrly-seo'),
|
200 |
'description' => sprintf(esc_html__("Go to the %sSocial Media section%s.%sActivate Open Graph. (switch the toggle to ON) %s The Open Graph will help you control the way your posts look when people share your URLs to social media sites like Facebook and LinkedIN. %s It will also make your social media posts look great and gain you clicks to your site.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'social') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
|
201 |
'function' => 'checkSettingsSocialOG',
|
202 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_facebook')
|
203 |
),
|
204 |
'setup_twc' => array(
|
205 |
'title' => esc_html__("Activate Twitter Card", 'squirrly-seo'),
|
206 |
'description' => sprintf(esc_html__("Go to the %sSocial Media section%s. %s - Activate Twitter Card. (from Twitter Card Settings: switch the toggle to ON) %s - Add your Twitter profile URL (go to the Social Media Accounts section to do this) %s The Twitter Card will help you control the way your posts look when people share your URLs on Twitter. %s It will also make your social media posts look great and gain you clicks to your site.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'social') . '">', '</a>', '<br /><br />', '<br />', '<br /><br />', '<br /><br />'),
|
207 |
'function' => 'checkSettingsSocialTWC',
|
208 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_twitter')
|
209 |
),
|
210 |
'setup_sitemap' => array(
|
211 |
'title' => esc_html__("Activate Sitemap XML", 'squirrly-seo'),
|
212 |
'description' => sprintf(esc_html__("Activate your %sSitemap XML%s setting. Squirrly SEO will then generate your sitemap, according to different items you can set up. %s Use this to tell Google how often you bring new content to your site. %s Also, choose for which types of URLs you'll want to have sitemaps. It depends on your strategy. Leave the defaults if you're uncertain. Squirrly SEO chooses the best defaults for you. %s Make sure you include Images and Videos in the sitemap. It has been identified as a ranking factor, so it's good to have that.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'tweaks') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />'),
|
213 |
'function' => 'checkSettingsSitemap',
|
214 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_sitemap')
|
215 |
),
|
216 |
'setup_ganalytics' => array(
|
217 |
'title' => esc_html__("Activate Google Analytics", 'squirrly-seo'),
|
218 |
'description' => sprintf(esc_html__("Go to the %sTracking Tools section%s. %s Add your Google Analytics ID to complete this setting. (find it in the tracking code that Google Analytics tells you to place on your site) %s Squirrly SEO will then add (automatically) your Google Analytics tracking code (in the format you desire) to every page of your site (according to rules you can modify in the Automation section).", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'webmaster#tab=trackers') . '">', '</a>', '<br /><br />', '<br /><br />'),
|
219 |
'function' => 'checkSettingsGoogleAnalytics',
|
220 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_tracking')
|
221 |
),
|
222 |
// 'setup_fpixel' => array(
|
223 |
// 'title' => esc_html__("Activate Facebook Pixel", 'squirrly-seo'),
|
228 |
'title' => esc_html__("Connect the Webmasters", 'squirrly-seo'),
|
229 |
'description' => sprintf(esc_html__("Go to the %sWebmasters section%s. %s This section makes it super easy to integrate different (important) 3rd party services with your WordPress. %s Some webmasters are optional, but Google Search Console is really important. %s Enter your Pinterest code, especially if you plan to expand your presence on Pinterest. It will %sactivate Rich Pins%s, which will completely boost your sales and visibility for any product or post that has great images.", 'squirrly-seo'), '<a href="' . SQ_Classes_Helpers_Tools::getAdminUrl('sq_seosettings', 'webmaster') . '">', '</a>', '<br /><br />', '<br /><br />', '<br /><br />', '<a href="https://developers.pinterest.com/tools/url-debugger/" target="_blank">', '</a>'),
|
230 |
'function' => 'checkSettingsWebmasters',
|
231 |
+
'show' => SQ_Classes_Helpers_Tools::getOption('sq_auto_webmasters')
|
232 |
),
|
233 |
|
234 |
);
|
305 |
}
|
306 |
|
307 |
foreach ($tasks as $name => &$task) {
|
308 |
+
|
309 |
+
if(isset($task['show']) && !$task['show']) {
|
310 |
+
unset($tasks[$name]);
|
311 |
+
continue;
|
312 |
+
}
|
313 |
+
|
314 |
if (!isset($this->_dbtasks[$category_name][$name]['completed'])) {
|
315 |
$this->_dbtasks[$category_name][$name]['completed'] = false;
|
316 |
}
|
505 |
if (SQ_Classes_Helpers_Tools::getOption('sq_auto_webmasters')) {
|
506 |
$codes = json_decode(wp_json_encode(SQ_Classes_Helpers_Tools::getOption('codes')));
|
507 |
if (isset($codes->google_wt) && $codes->google_wt <> ''
|
508 |
+
|| isset($codes->bing_wt) && $codes->bing_wt <> ''
|
|
|
509 |
|| isset($codes->baidu_wt) && $codes->baidu_wt <> ''
|
510 |
|| isset($codes->yandex_wt) && $codes->yandex_wt <> ''
|
511 |
|| isset($codes->norton_verify) && $codes->norton_verify <> ''
|
models/Audits.php
CHANGED
@@ -449,15 +449,15 @@ class SQ_Models_Audits
|
|
449 |
'solution' => esc_html__("Get links to your page from domains with authority.", 'squirrly-seo'),
|
450 |
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo'),
|
451 |
),
|
452 |
-
'
|
453 |
'complete' => false,
|
454 |
-
'title' => esc_html__("
|
455 |
'success' => '%s ',
|
456 |
'fail' => '%s ',
|
457 |
'success_list' => '',
|
458 |
'fail_list' => '',
|
459 |
-
'description' => sprintf(esc_html__("How can we fix the
|
460 |
-
'protip' => esc_html__("A certain and tested way of increasing
|
461 |
'solution' => esc_html__("Try to gain organic traffic to your site.", 'squirrly-seo'),
|
462 |
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo'),
|
463 |
),
|
@@ -527,6 +527,10 @@ class SQ_Models_Audits
|
|
527 |
continue;
|
528 |
}
|
529 |
|
|
|
|
|
|
|
|
|
530 |
$replace = '';
|
531 |
switch ($audittask->audit_task) {
|
532 |
case 'TopTen':
|
449 |
'solution' => esc_html__("Get links to your page from domains with authority.", 'squirrly-seo'),
|
450 |
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo'),
|
451 |
),
|
452 |
+
'SemrushRank' => array(
|
453 |
'complete' => false,
|
454 |
+
'title' => esc_html__("Semrush Rank", 'squirrly-seo'),
|
455 |
'success' => '%s ',
|
456 |
'fail' => '%s ',
|
457 |
'success_list' => '',
|
458 |
'fail_list' => '',
|
459 |
+
'description' => sprintf(esc_html__("How can we fix the Semrush Rank of the website? %s Get more traffic to your website. %s Increase your SEO rankings, get more shares on social media. You can use tools like Social Squirrly to make sure you constantly promote your pages, without doing any manual work. And without forgetting to keep posting them. [link]https://www.squirrly.co/social-media/tools-for-digital-marketing/[/link]%s", 'squirrly-seo'), '<ul><li>', '</li><li>', '</li></ul>'),
|
460 |
+
'protip' => esc_html__("A certain and tested way of increasing Semrush rank is creating and promoting many pieces of fresh content. An agency like Squirrly's Content Agency can help you with this. [link]http://www.squirrly.co/agency[/link]", 'squirrly-seo'),
|
461 |
'solution' => esc_html__("Try to gain organic traffic to your site.", 'squirrly-seo'),
|
462 |
'link' => SQ_Classes_Helpers_Tools::getAdminUrl('sq_bulkseo', 'bulkseo'),
|
463 |
),
|
527 |
continue;
|
528 |
}
|
529 |
|
530 |
+
if ($audittask->audit_task == 'SemrushRank' && $audittask->value == 0) {
|
531 |
+
continue;
|
532 |
+
}
|
533 |
+
|
534 |
$replace = '';
|
535 |
switch ($audittask->audit_task) {
|
536 |
case 'TopTen':
|
models/Compatibility.php
CHANGED
@@ -156,15 +156,15 @@ class SQ_Models_Compatibility
|
|
156 |
}
|
157 |
|
158 |
//Load SLA in WPBakery Frontend
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
|
169 |
//Load SLA in Thrive Backend
|
170 |
if (SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php')) {
|
@@ -179,20 +179,20 @@ class SQ_Models_Compatibility
|
|
179 |
}
|
180 |
|
181 |
//Load SLA in Zion Backend
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
|
197 |
}
|
198 |
}
|
@@ -236,23 +236,23 @@ class SQ_Models_Compatibility
|
|
236 |
}
|
237 |
|
238 |
//Load the SLA for JS Composer / WPBakery
|
239 |
-
|
240 |
-
|
241 |
-
//
|
242 |
-
// //Load the style for builders
|
243 |
-
// SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders');
|
244 |
-
// }
|
245 |
-
// }
|
246 |
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
//
|
253 |
-
|
254 |
-
|
255 |
-
|
|
|
|
|
|
|
|
|
|
|
256 |
|
257 |
//Load the SLA for Elementor Editor
|
258 |
if (SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php')) {
|
156 |
}
|
157 |
|
158 |
//Load SLA in WPBakery Frontend
|
159 |
+
if (SQ_Classes_Helpers_Tools::isPluginInstalled('js_composer/js_composer.php')) {
|
160 |
+
if (SQ_Classes_Helpers_Tools::getValue('vc_action') == 'vc_inline') {
|
161 |
+
//activate frontend SLA
|
162 |
+
add_filter('sq_load_frontend_sla', '__return_true');
|
163 |
+
|
164 |
+
//hook the WPBakery editor
|
165 |
+
add_action('vc_frontend_editor_render_template', array(SQ_Classes_ObjController::getClass('SQ_Models_LiveAssistant'), 'loadFrontent'), 99);
|
166 |
+
}
|
167 |
+
}
|
168 |
|
169 |
//Load SLA in Thrive Backend
|
170 |
if (SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php')) {
|
179 |
}
|
180 |
|
181 |
//Load SLA in Zion Backend
|
182 |
+
if (SQ_Classes_Helpers_Tools::isPluginInstalled('zionbuilder/zionbuilder.php')) {
|
183 |
+
if (SQ_Classes_Helpers_Tools::getValue('action') == 'zion_builder_active') {
|
184 |
+
//activate frontend SLA
|
185 |
+
add_filter('sq_load_frontend_sla', '__return_true');
|
186 |
+
|
187 |
+
wp_enqueue_script('jquery');
|
188 |
+
wp_enqueue_script('jquery-ui-core');
|
189 |
+
wp_enqueue_script('jquery-ui-draggable');
|
190 |
+
wp_print_scripts(array('jquery', 'jquery-ui-core', 'jquery-ui-draggable'));
|
191 |
+
|
192 |
+
//activate SLA for Zion on frontend
|
193 |
+
add_action('zionbuilder/editor/after_scripts', array(SQ_Classes_ObjController::getClass('SQ_Models_LiveAssistant'), 'loadFrontent'), 99);
|
194 |
+
}
|
195 |
+
}
|
196 |
|
197 |
}
|
198 |
}
|
236 |
}
|
237 |
|
238 |
//Load the SLA for JS Composer / WPBakery
|
239 |
+
if (SQ_Classes_Helpers_Tools::isPluginInstalled('js_composer/js_composer.php')) {
|
240 |
+
if (SQ_Classes_Helpers_Tools::getValue('vc_editable')) {
|
|
|
|
|
|
|
|
|
|
|
241 |
|
242 |
+
//Load the style for builders
|
243 |
+
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders');
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
//Load the SLA for Zion Editor
|
248 |
+
if (SQ_Classes_Helpers_Tools::isPluginInstalled('zionbuilder/zionbuilder.php')) {
|
249 |
+
if (SQ_Classes_Helpers_Tools::getValue('zionbuilder-preview')) {
|
250 |
+
|
251 |
+
//Load the style for builders
|
252 |
+
SQ_Classes_ObjController::getClass('SQ_Classes_DisplayController')->loadMedia('builders');
|
253 |
+
|
254 |
+
}
|
255 |
+
}
|
256 |
|
257 |
//Load the SLA for Elementor Editor
|
258 |
if (SQ_Classes_Helpers_Tools::isPluginInstalled('thrive-visual-editor/thrive-visual-editor.php')) {
|
models/Frontend.php
CHANGED
@@ -4,7 +4,6 @@ class SQ_Models_Frontend
|
|
4 |
{
|
5 |
|
6 |
private $_post;
|
7 |
-
private $_buffer = false;
|
8 |
|
9 |
public function __construct()
|
10 |
{
|
@@ -63,15 +62,15 @@ class SQ_Models_Frontend
|
|
63 |
public function getBuffer($buffer)
|
64 |
{
|
65 |
|
66 |
-
if (
|
67 |
if (!$buffer && ob_get_contents()) {
|
68 |
$buffer = ob_get_contents();
|
69 |
}
|
70 |
|
71 |
-
$
|
72 |
}
|
73 |
|
74 |
-
return $
|
75 |
}
|
76 |
|
77 |
|
@@ -84,9 +83,7 @@ class SQ_Models_Frontend
|
|
84 |
public function setMetaInBuffer($buffer)
|
85 |
{
|
86 |
//if is enabled sq for this page
|
87 |
-
if ($this->
|
88 |
-
|
89 |
-
if ($header = $this->getHeader()) {
|
90 |
|
91 |
try {
|
92 |
//clear the existing tags to avoid duplicates
|
@@ -155,7 +152,6 @@ class SQ_Models_Frontend
|
|
155 |
} catch (Exception $e) {
|
156 |
}
|
157 |
}
|
158 |
-
}
|
159 |
|
160 |
return $buffer;
|
161 |
}
|
@@ -254,6 +250,7 @@ class SQ_Models_Frontend
|
|
254 |
*/
|
255 |
public function loadSeoLibrary()
|
256 |
{
|
|
|
257 |
if ($this->_post && isset($this->_post->sq->doseo) && $this->_post->sq->doseo) {
|
258 |
|
259 |
if (SQ_Classes_Helpers_Tools::getOption('sq_auto_redirects')) {
|
@@ -677,8 +674,6 @@ class SQ_Models_Frontend
|
|
677 |
return $post;
|
678 |
}
|
679 |
|
680 |
-
|
681 |
-
|
682 |
return false;
|
683 |
}
|
684 |
|
4 |
{
|
5 |
|
6 |
private $_post;
|
|
|
7 |
|
8 |
public function __construct()
|
9 |
{
|
62 |
public function getBuffer($buffer)
|
63 |
{
|
64 |
|
65 |
+
if ($this->runSEOForThisPage()) {
|
66 |
if (!$buffer && ob_get_contents()) {
|
67 |
$buffer = ob_get_contents();
|
68 |
}
|
69 |
|
70 |
+
$buffer = apply_filters('sq_buffer', $buffer);
|
71 |
}
|
72 |
|
73 |
+
return $buffer;
|
74 |
}
|
75 |
|
76 |
|
83 |
public function setMetaInBuffer($buffer)
|
84 |
{
|
85 |
//if is enabled sq for this page
|
86 |
+
if ($header = $this->getHeader()) {
|
|
|
|
|
87 |
|
88 |
try {
|
89 |
//clear the existing tags to avoid duplicates
|
152 |
} catch (Exception $e) {
|
153 |
}
|
154 |
}
|
|
|
155 |
|
156 |
return $buffer;
|
157 |
}
|
250 |
*/
|
251 |
public function loadSeoLibrary()
|
252 |
{
|
253 |
+
|
254 |
if ($this->_post && isset($this->_post->sq->doseo) && $this->_post->sq->doseo) {
|
255 |
|
256 |
if (SQ_Classes_Helpers_Tools::getOption('sq_auto_redirects')) {
|
674 |
return $post;
|
675 |
}
|
676 |
|
|
|
|
|
677 |
return false;
|
678 |
}
|
679 |
|
models/ImportExport.php
CHANGED
@@ -404,7 +404,6 @@ class SQ_Models_ImportExport
|
|
404 |
if (isset($options['webmasterTools']['google']) && $options['webmasterTools']['google'] <> '') $codes['google_analytics'] = $options['webmasterTools']['google'];
|
405 |
if (isset($options['webmasterTools']['yandex']) && $options['webmasterTools']['yandex'] <> '') $codes['yandex_wt'] = $options['webmasterTools']['yandex'];
|
406 |
if (isset($options['webmasterTools']['baidu']) && $options['webmasterTools']['baidu'] <> '') $codes['baidu_wt'] = $options['webmasterTools']['baidu'];
|
407 |
-
if (isset($options['webmasterTools']['alexa']) && $options['webmasterTools']['alexa'] <> '') $codes['alexa_verify'] = $options['webmasterTools']['alexa'];
|
408 |
if (isset($options['webmasterTools']['norton']) && $options['webmasterTools']['norton'] <> '') $codes['norton_verify'] = $options['webmasterTools']['norton'];
|
409 |
|
410 |
SQ_Classes_Helpers_Tools::saveOptions('socials', $socials);
|
@@ -443,7 +442,6 @@ class SQ_Models_ImportExport
|
|
443 |
if (isset($options['google_verify']) && $options['google_verify'] <> '') $codes['google_wt'] = $options['google_verify'];
|
444 |
if (isset($options['bing_verify']) && $options['bing_verify'] <> '') $codes['bing_wt'] = $options['bing_verify'];
|
445 |
if (isset($options['pinterest_verify']) && $options['pinterest_verify'] <> '') $codes['pinterest_verify'] = $options['pinterest_verify'];
|
446 |
-
if (isset($options['alexa_verify']) && $options['alexa_verify'] <> '') $codes['alexa_verify'] = $options['alexa_verify'];
|
447 |
if (isset($options['yandex_verify']) && $options['yandex_verify'] <> '') $codes['yandex_wt'] = $options['yandex_verify'];
|
448 |
if (isset($options['baidu_verify']) && $options['baidu_verify'] <> '') $codes['baidu_wt'] = $options['baidu_verify'];
|
449 |
if (isset($options['norton_verify']) && $options['norton_verify'] <> '') $codes['norton_verify'] = $options['norton_verify'];
|
404 |
if (isset($options['webmasterTools']['google']) && $options['webmasterTools']['google'] <> '') $codes['google_analytics'] = $options['webmasterTools']['google'];
|
405 |
if (isset($options['webmasterTools']['yandex']) && $options['webmasterTools']['yandex'] <> '') $codes['yandex_wt'] = $options['webmasterTools']['yandex'];
|
406 |
if (isset($options['webmasterTools']['baidu']) && $options['webmasterTools']['baidu'] <> '') $codes['baidu_wt'] = $options['webmasterTools']['baidu'];
|
|
|
407 |
if (isset($options['webmasterTools']['norton']) && $options['webmasterTools']['norton'] <> '') $codes['norton_verify'] = $options['webmasterTools']['norton'];
|
408 |
|
409 |
SQ_Classes_Helpers_Tools::saveOptions('socials', $socials);
|
442 |
if (isset($options['google_verify']) && $options['google_verify'] <> '') $codes['google_wt'] = $options['google_verify'];
|
443 |
if (isset($options['bing_verify']) && $options['bing_verify'] <> '') $codes['bing_wt'] = $options['bing_verify'];
|
444 |
if (isset($options['pinterest_verify']) && $options['pinterest_verify'] <> '') $codes['pinterest_verify'] = $options['pinterest_verify'];
|
|
|
445 |
if (isset($options['yandex_verify']) && $options['yandex_verify'] <> '') $codes['yandex_wt'] = $options['yandex_verify'];
|
446 |
if (isset($options['baidu_verify']) && $options['baidu_verify'] <> '') $codes['baidu_wt'] = $options['baidu_verify'];
|
447 |
if (isset($options['norton_verify']) && $options['norton_verify'] <> '') $codes['norton_verify'] = $options['norton_verify'];
|
models/Post.php
CHANGED
@@ -12,178 +12,13 @@ class SQ_Models_Post
|
|
12 |
* @param array $args
|
13 |
* @return array|WP_Error
|
14 |
*/
|
15 |
-
public function searchPost($args)
|
16 |
{
|
17 |
wp_reset_query();
|
18 |
$wp_query = new WP_Query($args);
|
19 |
return $wp_query->get_posts();
|
20 |
}
|
21 |
|
22 |
-
/**
|
23 |
-
* Returns the attachment from the file URL
|
24 |
-
*
|
25 |
-
* @param $image_url
|
26 |
-
* @return mixed
|
27 |
-
*/
|
28 |
-
function findAttachmentByUrl($image_url)
|
29 |
-
{
|
30 |
-
global $wpdb;
|
31 |
-
return $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE `post_type` = %s AND `guid` like '%%%s';", 'attachment', $image_url));
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Add the image for Open Graph
|
36 |
-
*
|
37 |
-
* @param string $file
|
38 |
-
* @return array [name (the name of the file), image (the path of the image), message (the returned message)]
|
39 |
-
*/
|
40 |
-
function addImage(&$file, $overrides = false, $time = null)
|
41 |
-
{
|
42 |
-
// The default error handler.
|
43 |
-
if (!function_exists('wp_handle_upload_error')) {
|
44 |
-
|
45 |
-
function wp_handle_upload_error(&$file, $message)
|
46 |
-
{
|
47 |
-
return array('error' => $message);
|
48 |
-
}
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Filter data for the current file to upload.
|
54 |
-
*
|
55 |
-
* @since 2.9.0
|
56 |
-
*
|
57 |
-
* @param array $file An array of data for a single file.
|
58 |
-
*/
|
59 |
-
$file = apply_filters('wp_handle_upload_prefilter', $file);
|
60 |
-
|
61 |
-
// You may define your own function and pass the name in $overrides['upload_error_handler']
|
62 |
-
$upload_error_handler = 'wp_handle_upload_error';
|
63 |
-
|
64 |
-
// You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.
|
65 |
-
if (isset($file['error']) && !is_numeric($file['error']) && $file['error'])
|
66 |
-
return $upload_error_handler($file, $file['error']);
|
67 |
-
|
68 |
-
// You may define your own function and pass the name in $overrides['unique_filename_callback']
|
69 |
-
$unique_filename_callback = null;
|
70 |
-
|
71 |
-
// $_POST['action'] must be set and its value must equal $overrides['action'] or this:
|
72 |
-
$action = 'sq_ajax_save_ogimage';
|
73 |
-
|
74 |
-
// Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error'].
|
75 |
-
$upload_error_strings = array(false,
|
76 |
-
esc_html__("The uploaded file exceeds the upload_max_filesize directive in php.ini."),
|
77 |
-
esc_html__("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form."),
|
78 |
-
esc_html__("The uploaded file was only partially uploaded."),
|
79 |
-
esc_html__("No file was uploaded."),
|
80 |
-
'',
|
81 |
-
esc_html__("Missing a temporary folder."),
|
82 |
-
esc_html__("Failed to write file to disk."),
|
83 |
-
esc_html__("File upload stopped by extension."));
|
84 |
-
|
85 |
-
// All tests are on by default. Most can be turned off by $overrides[{test_name}] = false;
|
86 |
-
$test_form = true;
|
87 |
-
$test_size = true;
|
88 |
-
$test_upload = true;
|
89 |
-
|
90 |
-
// If you override this, you must provide $ext and $type!!!!
|
91 |
-
$test_type = true;
|
92 |
-
$mimes = false;
|
93 |
-
|
94 |
-
// Install user overrides. Did we mention that this voids your warranty?
|
95 |
-
if (is_array($overrides))
|
96 |
-
extract($overrides, EXTR_OVERWRITE);
|
97 |
-
|
98 |
-
// A correct form post will pass this test.
|
99 |
-
if ($test_form && (!isset($_POST['action']) || ($_POST['action'] != $action)))
|
100 |
-
return call_user_func($upload_error_handler, $file, esc_html__("Invalid form submission."));
|
101 |
-
|
102 |
-
// A successful upload will pass this test. It makes no sense to override this one.
|
103 |
-
if (isset($file['error']) && $file['error'] > 0) {
|
104 |
-
return call_user_func($upload_error_handler, $file, $upload_error_strings[$file['error']]);
|
105 |
-
}
|
106 |
-
|
107 |
-
// A non-empty file will pass this test.
|
108 |
-
if ($test_size && !($file['size'] > 0)) {
|
109 |
-
if (is_multisite())
|
110 |
-
$error_msg = esc_html__("File is empty. Please upload something more substantial.", 'squirrly-seo');
|
111 |
-
else
|
112 |
-
$error_msg = esc_html__("File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.", 'squirrly-seo');
|
113 |
-
return call_user_func($upload_error_handler, $file, $error_msg);
|
114 |
-
}
|
115 |
-
|
116 |
-
// A properly uploaded file will pass this test. There should be no reason to override this one.
|
117 |
-
if ($test_upload && !@ is_uploaded_file($file['tmp_name']))
|
118 |
-
return call_user_func($upload_error_handler, $file, esc_html__("Specified file failed upload test.", 'squirrly-seo'));
|
119 |
-
|
120 |
-
// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
|
121 |
-
if ($test_type) {
|
122 |
-
$wp_filetype = wp_check_filetype_and_ext($file['tmp_name'], $file['name'], $mimes);
|
123 |
-
|
124 |
-
extract($wp_filetype);
|
125 |
-
|
126 |
-
// Check to see if wp_check_filetype_and_ext() determined the filename was incorrect
|
127 |
-
if (isset($proper_filename) && $proper_filename <> '')
|
128 |
-
$file['name'] = $proper_filename;
|
129 |
-
|
130 |
-
if ((!isset($type) || !isset($ext)) && !SQ_Classes_Helpers_Tools::userCan('unfiltered_upload'))
|
131 |
-
return call_user_func($upload_error_handler, $file, esc_html__("Sorry, this file type is not permitted for security reasons.", 'squirrly-seo'));
|
132 |
-
|
133 |
-
if (!$ext)
|
134 |
-
$ext = ltrim(strrchr($file['name'], '.'), '.');
|
135 |
-
|
136 |
-
if (!$type)
|
137 |
-
$type = $file['type'];
|
138 |
-
} else {
|
139 |
-
$type = '';
|
140 |
-
}
|
141 |
-
|
142 |
-
// A writable uploads dir will pass this test. Again, there's no point overriding this one.
|
143 |
-
if (!(($uploads = wp_upload_dir($time)) && false === $uploads['error']))
|
144 |
-
return call_user_func($upload_error_handler, $file, $uploads['error']);
|
145 |
-
|
146 |
-
$filename = wp_unique_filename($uploads['path'], $file['name'], $unique_filename_callback);
|
147 |
-
|
148 |
-
// Move the file to the uploads dir
|
149 |
-
$new_file = $uploads['path'] . "/$filename";
|
150 |
-
if (false === @ move_uploaded_file($file['tmp_name'], $new_file)) {
|
151 |
-
if (0 === strpos($uploads['basedir'], ABSPATH))
|
152 |
-
$error_path = str_replace(ABSPATH, '', $uploads['basedir']) . $uploads['subdir'];
|
153 |
-
else
|
154 |
-
$error_path = basename($uploads['basedir']) . $uploads['subdir'];
|
155 |
-
|
156 |
-
return $upload_error_handler($file, sprintf(esc_html__("The uploaded file could not be moved to %s.", 'squirrly-seo'), $error_path));
|
157 |
-
}
|
158 |
-
|
159 |
-
// Set correct file permissions
|
160 |
-
$stat = stat(dirname($new_file));
|
161 |
-
$perms = $stat['mode'] & 0000666;
|
162 |
-
@ chmod($new_file, $perms);
|
163 |
-
|
164 |
-
// Compute the URL
|
165 |
-
$url = $uploads['url'] . "/$filename";
|
166 |
-
|
167 |
-
if (is_multisite())
|
168 |
-
delete_transient('dirsize_cache');
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Filter the data array for the uploaded file.
|
172 |
-
*
|
173 |
-
* @since 2.1.0
|
174 |
-
*
|
175 |
-
* @param array $upload {
|
176 |
-
* Array of upload data.
|
177 |
-
*
|
178 |
-
* @type string $file Filename of the newly-uploaded file.
|
179 |
-
* @type string $url URL of the uploaded file.
|
180 |
-
* @type string $type File type.
|
181 |
-
* }
|
182 |
-
* @param string $context The type of upload action. Accepts 'upload' or 'sideload'.
|
183 |
-
*/
|
184 |
-
return apply_filters('wp_handle_upload', array('file' => $new_file, 'url' => $url, 'type' => $type), 'upload');
|
185 |
-
}
|
186 |
-
|
187 |
/**
|
188 |
* Upload the image on server from version 2.0.4
|
189 |
*
|
@@ -191,7 +26,7 @@ class SQ_Models_Post
|
|
191 |
* @param bool $basename
|
192 |
* @return array|bool
|
193 |
*/
|
194 |
-
public function upload_image($url, $basename)
|
195 |
{
|
196 |
if (strpos($url, 'http') === false && strpos($url, '//') !== false) {
|
197 |
$url = 'http:' . $url;
|
@@ -233,7 +68,7 @@ class SQ_Models_Post
|
|
233 |
return false;
|
234 |
}
|
235 |
|
236 |
-
public function getTasks()
|
237 |
{
|
238 |
$sla_tasks = array(
|
239 |
"" => array(
|
12 |
* @param array $args
|
13 |
* @return array|WP_Error
|
14 |
*/
|
15 |
+
public function searchPost($args)
|
16 |
{
|
17 |
wp_reset_query();
|
18 |
$wp_query = new WP_Query($args);
|
19 |
return $wp_query->get_posts();
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Upload the image on server from version 2.0.4
|
24 |
*
|
26 |
* @param bool $basename
|
27 |
* @return array|bool
|
28 |
*/
|
29 |
+
public function upload_image($url, $basename)
|
30 |
{
|
31 |
if (strpos($url, 'http') === false && strpos($url, '//') !== false) {
|
32 |
$url = 'http:' . $url;
|
68 |
return false;
|
69 |
}
|
70 |
|
71 |
+
public function getTasks()
|
72 |
{
|
73 |
$sla_tasks = array(
|
74 |
"" => array(
|
models/Settings.php
CHANGED
@@ -118,9 +118,6 @@ class SQ_Models_Settings
|
|
118 |
case 'google_analytics':
|
119 |
$subvalue = SQ_Classes_Helpers_Sanitize::checkGoogleAnalyticsCode($value[$subkey]);
|
120 |
break;
|
121 |
-
case 'alexa_verify':
|
122 |
-
$subvalue = SQ_Classes_Helpers_Sanitize::checkAlexaCode($value[$subkey]);
|
123 |
-
break;
|
124 |
case 'facebook_pixel':
|
125 |
$subvalue = SQ_Classes_Helpers_Sanitize::checkFacebookPixel($value[$subkey]);
|
126 |
break;
|
118 |
case 'google_analytics':
|
119 |
$subvalue = SQ_Classes_Helpers_Sanitize::checkGoogleAnalyticsCode($value[$subkey]);
|
120 |
break;
|
|
|
|
|
|
|
121 |
case 'facebook_pixel':
|
122 |
$subvalue = SQ_Classes_Helpers_Sanitize::checkFacebookPixel($value[$subkey]);
|
123 |
break;
|
models/Sitemaps.php
CHANGED
@@ -123,6 +123,7 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo
|
|
123 |
if (post_password_required()) {
|
124 |
continue;
|
125 |
}
|
|
|
126 |
if (function_exists('pll_get_post_translations')) {
|
127 |
if (SQ_Classes_Helpers_Tools::getOption('sq_sitemap_combinelangs')) {
|
128 |
$translates = pll_get_post_translations($currentpost->ID);
|
@@ -276,6 +277,7 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo
|
|
276 |
$posts['contains'] = array();
|
277 |
|
278 |
if (have_posts()) {
|
|
|
279 |
while (have_posts()) {
|
280 |
the_post();
|
281 |
|
@@ -286,6 +288,7 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo
|
|
286 |
if(SQ_Classes_Helpers_Tools::getOption('sq_sitemap_exclude_noindex') && $post->sq->noindex) {
|
287 |
continue;
|
288 |
}
|
|
|
289 |
$this->setPost($post); //set current sitemap post
|
290 |
|
291 |
$xml = array();
|
@@ -519,7 +522,7 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo
|
|
519 |
{
|
520 |
$xml = array();
|
521 |
|
522 |
-
if (!isset($post->url) || !$post->url) {
|
523 |
return $xml;
|
524 |
}
|
525 |
|
123 |
if (post_password_required()) {
|
124 |
continue;
|
125 |
}
|
126 |
+
|
127 |
if (function_exists('pll_get_post_translations')) {
|
128 |
if (SQ_Classes_Helpers_Tools::getOption('sq_sitemap_combinelangs')) {
|
129 |
$translates = pll_get_post_translations($currentpost->ID);
|
277 |
$posts['contains'] = array();
|
278 |
|
279 |
if (have_posts()) {
|
280 |
+
|
281 |
while (have_posts()) {
|
282 |
the_post();
|
283 |
|
288 |
if(SQ_Classes_Helpers_Tools::getOption('sq_sitemap_exclude_noindex') && $post->sq->noindex) {
|
289 |
continue;
|
290 |
}
|
291 |
+
|
292 |
$this->setPost($post); //set current sitemap post
|
293 |
|
294 |
$xml = array();
|
522 |
{
|
523 |
$xml = array();
|
524 |
|
525 |
+
if (!isset($post->url) || !$post->url || strpos($post->url, home_url()) === false) {
|
526 |
return $xml;
|
527 |
}
|
528 |
|
models/abstract/Seo.php
CHANGED
@@ -7,7 +7,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
7 |
protected $_patterns;
|
8 |
protected $_sq_use;
|
9 |
|
10 |
-
public function __construct()
|
11 |
{
|
12 |
$this->_post = SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getPost();
|
13 |
$this->_sq_use = true;
|
@@ -18,14 +18,14 @@ abstract class SQ_Models_Abstract_Seo
|
|
18 |
*
|
19 |
* @param SQ_Models_Domain_Post $post
|
20 |
*/
|
21 |
-
public function setPost($post)
|
22 |
{
|
23 |
$this->_post = $post;
|
24 |
}
|
25 |
|
26 |
/****************************
|
27 |
-
*
|
28 |
-
* CLEAR THE VALUES
|
29 |
*************************************/
|
30 |
/***********************************************************************************/
|
31 |
/**
|
@@ -35,7 +35,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
35 |
* @param $title
|
36 |
* @return string
|
37 |
*/
|
38 |
-
public function clearTitle($title)
|
39 |
{
|
40 |
return SQ_Classes_Helpers_Sanitize::clearTitle($title);
|
41 |
}
|
@@ -47,7 +47,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
47 |
* @param $description
|
48 |
* @return mixed|string
|
49 |
*/
|
50 |
-
public function clearDescription($description)
|
51 |
{
|
52 |
return SQ_Classes_Helpers_Sanitize::clearDescription($description);
|
53 |
}
|
@@ -59,7 +59,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
59 |
* @param $keywords
|
60 |
* @return mixed|null|string|string[]
|
61 |
*/
|
62 |
-
public function clearKeywords($keywords)
|
63 |
{
|
64 |
if ($keywords <> '') {
|
65 |
return SQ_Classes_Helpers_Sanitize::clearTitle($keywords);
|
@@ -73,7 +73,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
73 |
* @param string $what
|
74 |
* @return bool|mixed|string
|
75 |
*/
|
76 |
-
protected function getAuthor($what = 'user_nicename')
|
77 |
{
|
78 |
|
79 |
if (!isset($this->_author)) {
|
@@ -106,7 +106,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
106 |
* @param boolean $all take all the images or stop at the first one
|
107 |
* @return array
|
108 |
*/
|
109 |
-
public function getPostImages($all = false)
|
110 |
{
|
111 |
$images = array();
|
112 |
|
@@ -163,13 +163,13 @@ abstract class SQ_Models_Abstract_Seo
|
|
163 |
}
|
164 |
|
165 |
|
166 |
-
return $images;
|
167 |
}
|
168 |
|
169 |
/**
|
170 |
* @return mixed
|
171 |
*/
|
172 |
-
public function getImageType($url = '')
|
173 |
{
|
174 |
|
175 |
if ($url == '' || strpos($url, '.') === false) {
|
@@ -196,7 +196,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
196 |
* @param boolean $all take all the videos or stop at the first one
|
197 |
* @return array|false
|
198 |
*/
|
199 |
-
public function getPostVideos($all = false)
|
200 |
{
|
201 |
$videos = false;
|
202 |
$thumbnail = '';
|
@@ -311,7 +311,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
311 |
|
312 |
}
|
313 |
|
314 |
-
return $videos;
|
315 |
}
|
316 |
|
317 |
/**
|
@@ -319,7 +319,7 @@ abstract class SQ_Models_Abstract_Seo
|
|
319 |
*
|
320 |
* @return bool
|
321 |
*/
|
322 |
-
public function isHomePage()
|
323 |
{
|
324 |
return SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->isHomePage();
|
325 |
}
|
@@ -329,17 +329,17 @@ abstract class SQ_Models_Abstract_Seo
|
|
329 |
*
|
330 |
* @return SQ_Models_Domain_Post
|
331 |
*/
|
332 |
-
public function getPost()
|
333 |
{
|
334 |
return SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getPost();
|
335 |
}
|
336 |
|
337 |
-
public function returnFalse()
|
338 |
{
|
339 |
return false;
|
340 |
}
|
341 |
|
342 |
-
public function truncate($text, $min = 100, $max = 110)
|
343 |
{
|
344 |
return SQ_Classes_Helpers_Sanitize::truncate($text, $min, $max);
|
345 |
}
|
7 |
protected $_patterns;
|
8 |
protected $_sq_use;
|
9 |
|
10 |
+
public function __construct()
|
11 |
{
|
12 |
$this->_post = SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getPost();
|
13 |
$this->_sq_use = true;
|
18 |
*
|
19 |
* @param SQ_Models_Domain_Post $post
|
20 |
*/
|
21 |
+
public function setPost($post)
|
22 |
{
|
23 |
$this->_post = $post;
|
24 |
}
|
25 |
|
26 |
/****************************
|
27 |
+
*
|
28 |
+
* CLEAR THE VALUES
|
29 |
*************************************/
|
30 |
/***********************************************************************************/
|
31 |
/**
|
35 |
* @param $title
|
36 |
* @return string
|
37 |
*/
|
38 |
+
public function clearTitle($title)
|
39 |
{
|
40 |
return SQ_Classes_Helpers_Sanitize::clearTitle($title);
|
41 |
}
|
47 |
* @param $description
|
48 |
* @return mixed|string
|
49 |
*/
|
50 |
+
public function clearDescription($description)
|
51 |
{
|
52 |
return SQ_Classes_Helpers_Sanitize::clearDescription($description);
|
53 |
}
|
59 |
* @param $keywords
|
60 |
* @return mixed|null|string|string[]
|
61 |
*/
|
62 |
+
public function clearKeywords($keywords)
|
63 |
{
|
64 |
if ($keywords <> '') {
|
65 |
return SQ_Classes_Helpers_Sanitize::clearTitle($keywords);
|
73 |
* @param string $what
|
74 |
* @return bool|mixed|string
|
75 |
*/
|
76 |
+
protected function getAuthor($what = 'user_nicename')
|
77 |
{
|
78 |
|
79 |
if (!isset($this->_author)) {
|
106 |
* @param boolean $all take all the images or stop at the first one
|
107 |
* @return array
|
108 |
*/
|
109 |
+
public function getPostImages($all = false)
|
110 |
{
|
111 |
$images = array();
|
112 |
|
163 |
}
|
164 |
|
165 |
|
166 |
+
return apply_filters('sq_post_images', $images);
|
167 |
}
|
168 |
|
169 |
/**
|
170 |
* @return mixed
|
171 |
*/
|
172 |
+
public function getImageType($url = '')
|
173 |
{
|
174 |
|
175 |
if ($url == '' || strpos($url, '.') === false) {
|
196 |
* @param boolean $all take all the videos or stop at the first one
|
197 |
* @return array|false
|
198 |
*/
|
199 |
+
public function getPostVideos($all = false)
|
200 |
{
|
201 |
$videos = false;
|
202 |
$thumbnail = '';
|
311 |
|
312 |
}
|
313 |
|
314 |
+
return apply_filters('sq_post_videos', $videos);
|
315 |
}
|
316 |
|
317 |
/**
|
319 |
*
|
320 |
* @return bool
|
321 |
*/
|
322 |
+
public function isHomePage()
|
323 |
{
|
324 |
return SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->isHomePage();
|
325 |
}
|
329 |
*
|
330 |
* @return SQ_Models_Domain_Post
|
331 |
*/
|
332 |
+
public function getPost()
|
333 |
{
|
334 |
return SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getPost();
|
335 |
}
|
336 |
|
337 |
+
public function returnFalse()
|
338 |
{
|
339 |
return false;
|
340 |
}
|
341 |
|
342 |
+
public function truncate($text, $min = 100, $max = 110)
|
343 |
{
|
344 |
return SQ_Classes_Helpers_Sanitize::truncate($text, $min, $max);
|
345 |
}
|
models/focuspages/Image.php
CHANGED
@@ -157,14 +157,18 @@ class SQ_Models_Focuspages_Image extends SQ_Models_Abstract_Assistant
|
|
157 |
$keyword = preg_replace('/\s{2,}/', ' ', $keyword);
|
158 |
$words = explode(' ', $keyword);
|
159 |
foreach ($this->_images as $image) {
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
//Check if all words are present in the image URL
|
161 |
$allwords = true;
|
162 |
foreach ($words as $word) {
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
$allwords = false;
|
167 |
-
}
|
168 |
}
|
169 |
}
|
170 |
//Complete task if all words are found
|
157 |
$keyword = preg_replace('/\s{2,}/', ' ', $keyword);
|
158 |
$words = explode(' ', $keyword);
|
159 |
foreach ($this->_images as $image) {
|
160 |
+
|
161 |
+
//get only the image filename
|
162 |
+
if(basename($image) <> ''){
|
163 |
+
$image = basename($image);
|
164 |
+
}
|
165 |
+
|
166 |
//Check if all words are present in the image URL
|
167 |
$allwords = true;
|
168 |
foreach ($words as $word) {
|
169 |
+
//Find the string with normalization
|
170 |
+
if ($word <> '' && SQ_Classes_Helpers_Tools::findStr($image, $word, true) === false) {
|
171 |
+
$allwords = false;
|
|
|
|
|
172 |
}
|
173 |
}
|
174 |
//Complete task if all words are found
|
models/focuspages/Innerlinks.php
CHANGED
@@ -24,19 +24,15 @@ class SQ_Models_Focuspages_Innerlinks extends SQ_Models_Abstract_Assistant
|
|
24 |
if ($path == '') $path = $this->_permalink;
|
25 |
|
26 |
if ($this->_permalink <> '') {
|
27 |
-
global $wpdb;
|
28 |
|
29 |
if (isset($this->_audit->data->sq_seo_innerlinks) && $this->_audit->data->sq_seo_innerlinks) {
|
30 |
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
$this->_inner_links = $row->count;
|
35 |
-
}
|
36 |
-
|
37 |
-
} else {
|
38 |
$this->_inner_links = (int)$this->_audit->data->sq_seo_innerlinks->inner_links;
|
39 |
}
|
|
|
40 |
} else {
|
41 |
$this->_error = true;
|
42 |
}
|
24 |
if ($path == '') $path = $this->_permalink;
|
25 |
|
26 |
if ($this->_permalink <> '') {
|
|
|
27 |
|
28 |
if (isset($this->_audit->data->sq_seo_innerlinks) && $this->_audit->data->sq_seo_innerlinks) {
|
29 |
|
30 |
+
$this->_inner_links = 0;
|
31 |
|
32 |
+
if (isset($this->_audit->data->sq_seo_innerlinks->inner_links)) {
|
|
|
|
|
|
|
|
|
33 |
$this->_inner_links = (int)$this->_audit->data->sq_seo_innerlinks->inner_links;
|
34 |
}
|
35 |
+
|
36 |
} else {
|
37 |
$this->_error = true;
|
38 |
}
|
models/services/JsonLD.php
CHANGED
@@ -1285,11 +1285,15 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo
|
|
1285 |
}
|
1286 |
|
1287 |
$markup_offer['priceSpecification'] = array(
|
|
|
1288 |
'price' => wc_format_decimal($price, wc_get_price_decimals()),
|
1289 |
'minPrice' => wc_format_decimal($minprice, wc_get_price_decimals()),
|
1290 |
'maxPrice' => wc_format_decimal($maxprice, wc_get_price_decimals()),
|
1291 |
'priceCurrency' => $currency,
|
1292 |
);
|
|
|
|
|
|
|
1293 |
}
|
1294 |
}
|
1295 |
|
@@ -1337,9 +1341,12 @@ class SQ_Models_Services_JsonLD extends SQ_Models_Abstract_Seo
|
|
1337 |
}
|
1338 |
|
1339 |
if (function_exists('wc_prices_include_tax')) {
|
|
|
1340 |
$markup_offer['priceSpecification']['price'] = wc_format_decimal($product->get_price(), wc_get_price_decimals());
|
1341 |
$markup_offer['priceSpecification']['priceCurrency'] = $currency;
|
1342 |
$markup_offer['priceSpecification']['valueAddedTaxIncluded'] = wc_prices_include_tax() ? 'true' : 'false';
|
|
|
|
|
1343 |
}
|
1344 |
|
1345 |
//Set the offer
|
1285 |
}
|
1286 |
|
1287 |
$markup_offer['priceSpecification'] = array(
|
1288 |
+
'@type' => 'UnitPriceSpecification',
|
1289 |
'price' => wc_format_decimal($price, wc_get_price_decimals()),
|
1290 |
'minPrice' => wc_format_decimal($minprice, wc_get_price_decimals()),
|
1291 |
'maxPrice' => wc_format_decimal($maxprice, wc_get_price_decimals()),
|
1292 |
'priceCurrency' => $currency,
|
1293 |
);
|
1294 |
+
|
1295 |
+
unset($markup_offer['price']);
|
1296 |
+
unset($markup_offer['priceCurrency']);
|
1297 |
}
|
1298 |
}
|
1299 |
|
1341 |
}
|
1342 |
|
1343 |
if (function_exists('wc_prices_include_tax')) {
|
1344 |
+
$markup_offer['priceSpecification']['@type'] = 'UnitPriceSpecification';
|
1345 |
$markup_offer['priceSpecification']['price'] = wc_format_decimal($product->get_price(), wc_get_price_decimals());
|
1346 |
$markup_offer['priceSpecification']['priceCurrency'] = $currency;
|
1347 |
$markup_offer['priceSpecification']['valueAddedTaxIncluded'] = wc_prices_include_tax() ? 'true' : 'false';
|
1348 |
+
unset($markup_offer['price']);
|
1349 |
+
unset($markup_offer['priceCurrency']);
|
1350 |
}
|
1351 |
|
1352 |
//Set the offer
|
models/services/Redirects.php
CHANGED
@@ -4,7 +4,7 @@ class SQ_Models_Services_Redirects extends SQ_Models_Abstract_Seo
|
|
4 |
{
|
5 |
|
6 |
|
7 |
-
public function __construct()
|
8 |
{
|
9 |
parent::__construct();
|
10 |
|
@@ -44,7 +44,7 @@ class SQ_Models_Services_Redirects extends SQ_Models_Abstract_Seo
|
|
44 |
/**
|
45 |
* Check for changed permalink in the Posts and redirect the article to the new URL
|
46 |
*/
|
47 |
-
public function redirectPermalinks()
|
48 |
{
|
49 |
if (is_404() && isset($_SERVER['REQUEST_URI'])) {
|
50 |
$query_string = false;
|
@@ -83,8 +83,10 @@ class SQ_Models_Services_Redirects extends SQ_Models_Abstract_Seo
|
|
83 |
header('X-Redirect-By: Squirrly SEO');
|
84 |
|
85 |
//check the default redirect URL and prevent loop redirects
|
86 |
-
if
|
87 |
-
|
|
|
|
|
88 |
} else {
|
89 |
header('Location: ' . home_url(), true, 301);
|
90 |
}
|
4 |
{
|
5 |
|
6 |
|
7 |
+
public function __construct()
|
8 |
{
|
9 |
parent::__construct();
|
10 |
|
44 |
/**
|
45 |
* Check for changed permalink in the Posts and redirect the article to the new URL
|
46 |
*/
|
47 |
+
public function redirectPermalinks()
|
48 |
{
|
49 |
if (is_404() && isset($_SERVER['REQUEST_URI'])) {
|
50 |
$query_string = false;
|
83 |
header('X-Redirect-By: Squirrly SEO');
|
84 |
|
85 |
//check the default redirect URL and prevent loop redirects
|
86 |
+
if(SQ_Classes_Helpers_Tools::getOption('404_url_redirect')) {
|
87 |
+
if (parse_url(SQ_Classes_Helpers_Tools::getOption('404_url_redirect'), PHP_URL_PATH) <> $_SERVER['REQUEST_URI']) {
|
88 |
+
header('Location: ' . SQ_Classes_Helpers_Tools::getOption('404_url_redirect'), true, 301);
|
89 |
+
}
|
90 |
} else {
|
91 |
header('Location: ' . home_url(), true, 301);
|
92 |
}
|
models/services/Verify.php
CHANGED
@@ -4,7 +4,7 @@ class SQ_Models_Services_Verify extends SQ_Models_Abstract_Seo
|
|
4 |
{
|
5 |
|
6 |
|
7 |
-
public function __construct()
|
8 |
{
|
9 |
parent::__construct();
|
10 |
|
@@ -16,7 +16,7 @@ class SQ_Models_Services_Verify extends SQ_Models_Abstract_Seo
|
|
16 |
}
|
17 |
}
|
18 |
|
19 |
-
public function generateVerify($metas = array())
|
20 |
{
|
21 |
$codes = json_decode(wp_json_encode(SQ_Classes_Helpers_Tools::getOption('codes')));
|
22 |
|
@@ -41,14 +41,10 @@ class SQ_Models_Services_Verify extends SQ_Models_Abstract_Seo
|
|
41 |
}
|
42 |
}
|
43 |
|
44 |
-
if (isset($codes->alexa_verify) && $codes->alexa_verify <> '') {
|
45 |
-
$metas['alexaVerifyID'] = $codes->alexa_verify;
|
46 |
-
}
|
47 |
-
|
48 |
return $metas;
|
49 |
}
|
50 |
|
51 |
-
public function packVerify($metas = array())
|
52 |
{
|
53 |
if (!empty($metas)) {
|
54 |
foreach ($metas as $key => &$value) {
|
4 |
{
|
5 |
|
6 |
|
7 |
+
public function __construct()
|
8 |
{
|
9 |
parent::__construct();
|
10 |
|
16 |
}
|
17 |
}
|
18 |
|
19 |
+
public function generateVerify($metas = array())
|
20 |
{
|
21 |
$codes = json_decode(wp_json_encode(SQ_Classes_Helpers_Tools::getOption('codes')));
|
22 |
|
41 |
}
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
44 |
return $metas;
|
45 |
}
|
46 |
|
47 |
+
public function packVerify($metas = array())
|
48 |
{
|
49 |
if (!empty($metas)) {
|
50 |
foreach ($metas as $key => &$value) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://plugin.squirrly.co/squirrly-seo-pricing/
|
|
4 |
Tags: SEO, SEO Plugin, XML sitemap, WooCommerce SEO, Search Engine, Open Graph, Video Sitemap, Google News Sitemap, Rich Snippets, Robotx.txt, SEO Automation, Local SEO, SEO Content analysis, SEO Content, SEO Optimization, WordPress SEO, Yoast, Yoast Compatible, Yoast Import, SEO Redirection, Redirection, SEO Sitemap, SEO Caching, Meta Title, Meta Description, Performance, SEO Audit, SEO Keyword Research, SEO Rank Math import, Google Search Console, Schema
|
5 |
Requires at least: 4.3
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 12.1.
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv2 or later
|
10 |
|
@@ -669,6 +669,16 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
|
|
669 |
7. Squirrly SEO - SEO Briefcase
|
670 |
|
671 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
672 |
= 12.1.10 - 07/25/2022 =
|
673 |
Update - SLA compatibility with Bricks Website Builder
|
674 |
Update - SLA compatibility with Thrive Architect
|
@@ -1177,7 +1187,12 @@ Increased plugin security and update compatibilities
|
|
1177 |
* Introducing Squirrly Private SEO Consultant and Squirrly Machine Learning system
|
1178 |
* and more ...
|
1179 |
|
1180 |
-
|
|
|
|
|
|
|
|
|
|
|
1181 |
yoast alternative
|
1182 |
yoast seo alternative
|
1183 |
all in one seo alternative
|
4 |
Tags: SEO, SEO Plugin, XML sitemap, WooCommerce SEO, Search Engine, Open Graph, Video Sitemap, Google News Sitemap, Rich Snippets, Robotx.txt, SEO Automation, Local SEO, SEO Content analysis, SEO Content, SEO Optimization, WordPress SEO, Yoast, Yoast Compatible, Yoast Import, SEO Redirection, Redirection, SEO Sitemap, SEO Caching, Meta Title, Meta Description, Performance, SEO Audit, SEO Keyword Research, SEO Rank Math import, Google Search Console, Schema
|
5 |
Requires at least: 4.3
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 12.1.11
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv2 or later
|
10 |
|
669 |
7. Squirrly SEO - SEO Briefcase
|
670 |
|
671 |
== Changelog ==
|
672 |
+
= 12.1.11 - 08/12/2022 =
|
673 |
+
Update - SLA compatibility with Zion Builder
|
674 |
+
Update - SLA compatibility with WPBakery Page Builder
|
675 |
+
Update - Style for the Sitemap News using sitemapnews.xsl
|
676 |
+
Update - SEO Audits page to show the number of pages present in the audit
|
677 |
+
Fix - load SEO metas late on AMP pages for compatibility with AMP plugins
|
678 |
+
Fix - Don't load SEO Snippet on frontend when AMP is detected to avoid compatibility error with AMP plugin
|
679 |
+
Fix - Make sure the keywords from briefcase are shown correctly in research, history and suggested page
|
680 |
+
|
681 |
+
|
682 |
= 12.1.10 - 07/25/2022 =
|
683 |
Update - SLA compatibility with Bricks Website Builder
|
684 |
Update - SLA compatibility with Thrive Architect
|
1187 |
* Introducing Squirrly Private SEO Consultant and Squirrly Machine Learning system
|
1188 |
* and more ...
|
1189 |
|
1190 |
+
divi seo
|
1191 |
+
thrive seo
|
1192 |
+
oxygen seo
|
1193 |
+
elementor seo
|
1194 |
+
zion seo
|
1195 |
+
bricks seo
|
1196 |
yoast alternative
|
1197 |
yoast seo alternative
|
1198 |
all in one seo alternative
|
squirrly.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Description: A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services. Over 300 functionalities for SEO available when you need them.
|
9 |
* Author: Squirrly
|
10 |
* Author URI: https://plugin.squirrly.co
|
11 |
-
* Version: 12.1.
|
12 |
* License: GPLv2 or later
|
13 |
* License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
14 |
* Text Domain: squirrly-seo
|
@@ -17,9 +17,9 @@
|
|
17 |
|
18 |
if (!defined('SQ_VERSION')) {
|
19 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
20 |
-
define('SQ_VERSION', '12.1.
|
21 |
//The last stable version
|
22 |
-
define('SQ_STABLE_VERSION', '12.1.
|
23 |
// Call config files
|
24 |
try {
|
25 |
include_once dirname(__FILE__) . '/config/config.php';
|
8 |
* Description: A.I.-based Private SEO Consultant. In a Plugin. Powered by Machine Learning and Cloud Services. Over 300 functionalities for SEO available when you need them.
|
9 |
* Author: Squirrly
|
10 |
* Author URI: https://plugin.squirrly.co
|
11 |
+
* Version: 12.1.11
|
12 |
* License: GPLv2 or later
|
13 |
* License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
14 |
* Text Domain: squirrly-seo
|
17 |
|
18 |
if (!defined('SQ_VERSION')) {
|
19 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
20 |
+
define('SQ_VERSION', '12.1.11');
|
21 |
//The last stable version
|
22 |
+
define('SQ_STABLE_VERSION', '12.1.10');
|
23 |
// Call config files
|
24 |
try {
|
25 |
include_once dirname(__FILE__) . '/config/config.php';
|
view/Assistant/Settings.php
CHANGED
@@ -107,7 +107,9 @@
|
|
107 |
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Oxygen Builder %s plugin.", 'squirrly-seo'),'<a href="https://oxygenbuilder.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
108 |
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Divi Builder %s plugin.", 'squirrly-seo'),'<a href="https://www.elegantthemes.com/gallery/divi/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
109 |
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Thrive Architect %s plugin.", 'squirrly-seo'),'<a href="https://thrivethemes.com/architect/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
110 |
-
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Bricks Website Builder %s
|
|
|
|
|
111 |
</div>
|
112 |
</div>
|
113 |
</div>
|
107 |
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Oxygen Builder %s plugin.", 'squirrly-seo'),'<a href="https://oxygenbuilder.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
108 |
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Divi Builder %s plugin.", 'squirrly-seo'),'<a href="https://www.elegantthemes.com/gallery/divi/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
109 |
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Thrive Architect %s plugin.", 'squirrly-seo'),'<a href="https://thrivethemes.com/architect/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
110 |
+
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Bricks Website Builder %s.", 'squirrly-seo'),'<a href="https://bricksbuilder.io/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
111 |
+
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s WPBakery Page Builder %s plugin.", 'squirrly-seo'),'<a href="https://wpbakery.com/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
112 |
+
<div class="small text-black-50 ml-5 mt-1"><?php echo sprintf(esc_html__("Supports %s Zion Builder %s plugin.", 'squirrly-seo'),'<a href="https://zionbuilder.io/" target="_blank" class="font-weight-bold">','</a>'); ?></div>
|
113 |
</div>
|
114 |
</div>
|
115 |
</div>
|
view/Audits/AuditPages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<?php
|
4 |
if (!empty($view->auditpages)) { ?>
|
5 |
|
6 |
-
<h4 class="card-title"><?php echo esc_html__("Audited pages", 'squirrly-seo')
|
7 |
<div class="col-12 m-0 p-0 position-relative">
|
8 |
<div class=" col-12 m-0 p-0 my-2 py-2 py-0">
|
9 |
<table class="table table-striped table-hover">
|
3 |
<?php
|
4 |
if (!empty($view->auditpages)) { ?>
|
5 |
|
6 |
+
<h4 class="card-title"><?php echo esc_html__("Audited pages", 'squirrly-seo') ?> (<?php echo count((array)$view->auditpages) ?> <?php echo esc_html('pages', 'squirrly-seo') ?>)</h4>
|
7 |
<div class="col-12 m-0 p-0 position-relative">
|
8 |
<div class=" col-12 m-0 p-0 my-2 py-2 py-0">
|
9 |
<table class="table table-striped table-hover">
|
view/Automation/Automation.php
CHANGED
@@ -34,7 +34,11 @@
|
|
34 |
<?php $view->show_view('Blocks/SubMenu'); ?>
|
35 |
|
36 |
<div class="d-flex flex-column flex-grow-1 m-0 p-0">
|
37 |
-
<?php
|
|
|
|
|
|
|
|
|
38 |
$itemname = ucwords(str_replace(array('-', '_'), ' ', esc_attr($pattern)));
|
39 |
if ($pattern == 'tax-product_cat') {
|
40 |
$itemname = "Product Category";
|
@@ -51,8 +55,18 @@
|
|
51 |
<span class="text-black-50">(<?php echo esc_html($pattern) ?>)</span><?php } ?>
|
52 |
</h4>
|
53 |
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
<div class="col-4 p-0 pr-3 font-weight-bold">
|
57 |
<?php echo esc_html__("Title", 'squirrly-seo'); ?> :
|
58 |
<a href="https://howto12.squirrly.co/kb/seo-automation/#title_automation" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
@@ -62,7 +76,7 @@
|
|
62 |
<textarea rows="1" class="form-control bg-input" name="patterns[<?php echo esc_attr($pattern) ?>][title]"><?php echo (isset($type['title'])) ? esc_html($type['title']) : '' ?></textarea>
|
63 |
</div>
|
64 |
</div>
|
65 |
-
<div class="col-12 row p-0
|
66 |
<div class="col-4 p-0 pr-3 font-weight-bold">
|
67 |
<?php echo esc_html__("Description", 'squirrly-seo'); ?>:
|
68 |
<a href="https://howto12.squirrly.co/kb/seo-automation/#description_automation" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
@@ -72,8 +86,7 @@
|
|
72 |
<textarea class="form-control" name="patterns[<?php echo esc_attr($pattern) ?>][description]" rows="5"><?php echo (isset($type['description']) ? esc_html($type['description']) : '') ?></textarea>
|
73 |
</div>
|
74 |
</div>
|
75 |
-
|
76 |
-
<div class="col-12 row p-0 m-0 my-5">
|
77 |
<div class="col-4 p-1 font-weight-bold">
|
78 |
<?php echo esc_html__("Separator", 'squirrly-seo'); ?>:
|
79 |
<a href="https://howto12.squirrly.co/kb/seo-automation/#separator" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
@@ -90,59 +103,71 @@
|
|
90 |
</select>
|
91 |
</div>
|
92 |
</div>
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
</div>
|
106 |
-
</div>
|
107 |
-
<?php }?>
|
108 |
-
|
109 |
-
|
110 |
-
<?php if (SQ_Classes_Helpers_Tools::getOption('sq_auto_noindex')) { ?>
|
111 |
-
<div class="col-12 row m-0 p-0 my-5">
|
112 |
-
<div class="checker col-12 row m-0 p-0">
|
113 |
-
<div class="col-12 p-0 sq-switch sq-switch-sm <?php echo((!SQ_Classes_Helpers_Tools::getOption('sq_auto_metas') || !SQ_Classes_Helpers_Tools::getOption('sq_auto_noindex')) ? 'sq_deactivated' : ''); ?>">
|
114 |
-
<input type="hidden" name="patterns[<?php echo esc_attr($pattern) ?>][nofollow]" value="1"/>
|
115 |
-
<input type="checkbox" id="sq_patterns_<?php echo esc_attr($pattern) ?>_nofollow" name="patterns[<?php echo esc_attr($pattern) ?>][nofollow]" class="sq-switch" <?php echo((isset($type['nofollow']) && $type['nofollow'] == 0) ? 'checked="checked"' : '') ?> value="0"/>
|
116 |
-
<label for="sq_patterns_<?php echo esc_attr($pattern) ?>_nofollow" class="ml-1"><?php echo esc_html__("Send Authority to it", 'squirrly-seo'); ?>
|
117 |
-
<a href="https://howto12.squirrly.co/kb/seo-automation/#send_authority" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
118 |
-
</label>
|
119 |
-
<div class="small text-black-50 ml-5"><?php echo esc_html__("If you switch off this option, Squirrly will add 'nofollow' meta for this post type.", 'squirrly-seo'); ?></div>
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
</div>
|
123 |
-
|
124 |
<?php }?>
|
125 |
|
126 |
|
127 |
-
<?php if (SQ_Classes_Helpers_Tools::getOption('
|
128 |
<div class="col-12 row m-0 p-0 my-5">
|
129 |
<div class="checker col-12 row m-0 p-0">
|
130 |
-
<div class="col-12 p-0 sq-switch sq-switch-sm <?php echo((!SQ_Classes_Helpers_Tools::getOption('
|
131 |
-
<input type="hidden" name="patterns[<?php echo esc_attr($pattern) ?>][
|
132 |
-
<input type="checkbox" id="sq_patterns_<?php echo esc_attr($pattern) ?>
|
133 |
-
<label for="sq_patterns_<?php echo esc_attr($pattern) ?>
|
134 |
-
<a href="https://howto12.squirrly.co/kb/seo-automation/#
|
135 |
</label>
|
136 |
-
<div class="small text-black-50 ml-5"><?php echo esc_html__("
|
137 |
-
<div class="small text-black-50 ml-5"><?php echo esc_html__("If you switch off this option, Squirrly will not load the Sitemap for this post type.", 'squirrly-seo'); ?></div>
|
138 |
</div>
|
139 |
</div>
|
140 |
</div>
|
141 |
<?php }?>
|
|
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
-
<?php if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
|
|
|
146 |
<div class="col-12 row m-0 p-0 my-5">
|
147 |
<div class="checker col-12 row m-0 p-0">
|
148 |
<div class="col-12 m-0 p-0 sq-switch sq-switch-sm">
|
@@ -155,209 +180,210 @@
|
|
155 |
</div>
|
156 |
</div>
|
157 |
</div>
|
|
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
</div>
|
166 |
-
<div class="col-8 p-0">
|
167 |
-
<input type="text" class="form-control bg-input" name="404_url_redirect" value="<?php echo SQ_Classes_Helpers_Tools::getOption('404_url_redirect') ?>"/>
|
168 |
-
</div>
|
169 |
</div>
|
170 |
-
|
|
|
|
|
|
|
|
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
</div>
|
182 |
</div>
|
183 |
</div>
|
184 |
-
|
|
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
</div>
|
197 |
</div>
|
198 |
</div>
|
199 |
-
|
|
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
</div>
|
212 |
</div>
|
213 |
</div>
|
214 |
-
|
|
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
</div>
|
233 |
-
<div class="small text-black-50"><?php echo esc_html__("JSON-LD will load the Schema for the selected types.", 'squirrly-seo'); ?></div>
|
234 |
-
</div>
|
235 |
-
<?php
|
236 |
-
$post_types = json_decode(SQ_ALL_JSONLD_TYPES, true);
|
237 |
-
|
238 |
-
if (in_array($pattern, array('search', 'category', 'tag', 'archive', 'attachment', '404', 'tax-post_tag', 'tax-post_cat', 'tax-product_tag', 'tax-product_cat'))) $post_types = array('website');
|
239 |
-
if (in_array($pattern, array('home', 'shop'))) $post_types = array('website', 'local store', 'local restaurant');
|
240 |
-
if ($pattern == 'profile') $post_types = array('profile');
|
241 |
-
if ($pattern == 'product') $post_types = array('product');
|
242 |
-
?>
|
243 |
-
<div class="col-5 p-0">
|
244 |
-
<select <?php echo((count($post_types) > 1) ? 'multiple' : '') ?> name="patterns[<?php echo esc_attr($pattern) ?>][jsonld_types][]" class="selectpicker form-control bg-input mb-1 border" style="min-height: 100px;">
|
245 |
-
<?php foreach ($post_types as $post_type => $jsonld_type) { ?>
|
246 |
-
<option <?php echo((isset($type['jsonld_types']) && !empty($type['jsonld_types']) && in_array($jsonld_type, $type['jsonld_types'])) ? 'selected="selected"' : '') ?> value="<?php echo esc_attr($jsonld_type) ?>">
|
247 |
-
<?php echo esc_html(ucfirst($jsonld_type)) ?>
|
248 |
-
</option>
|
249 |
-
<?php } ?>
|
250 |
-
|
251 |
-
</select>
|
252 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
</div>
|
254 |
</div>
|
255 |
</div>
|
256 |
-
|
|
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
</div>
|
275 |
-
<div class="small text-black-50"><?php echo esc_html__("Select which Open Graph type to load for this post type.", 'squirrly-seo'); ?></div>
|
276 |
-
</div>
|
277 |
-
<?php
|
278 |
-
$post_types = json_decode(SQ_ALL_OG_TYPES, true);
|
279 |
-
|
280 |
-
if (in_array($pattern, array('home', 'search', 'category', 'tag', 'archive', '404', 'attachment', 'tax-post_tag', 'tax-post_cat', 'tax-product_tag', 'tax-product_cat', 'shop'))) $post_types = array('website');
|
281 |
-
if ($pattern == 'profile') $post_types = array('profile');
|
282 |
-
if ($pattern == 'product') $post_types = array('product');
|
283 |
-
?>
|
284 |
-
<div class="col-5 p-0">
|
285 |
-
<select name="patterns[<?php echo esc_attr($pattern) ?>][og_type]" class="form-control bg-input mb-1 border">
|
286 |
-
<?php foreach ($post_types as $post_type => $og_type) { ?>
|
287 |
-
<option <?php echo((isset($type['og_type']) && $type['og_type'] == $og_type) ? 'selected="selected"' : '') ?> value="<?php echo esc_attr($og_type) ?>">
|
288 |
-
<?php echo esc_html(ucfirst($og_type)) ?>
|
289 |
-
</option>
|
290 |
-
<?php } ?>
|
291 |
-
|
292 |
-
</select>
|
293 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
</div>
|
295 |
</div>
|
296 |
</div>
|
297 |
-
|
|
|
298 |
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
</div>
|
310 |
</div>
|
311 |
</div>
|
312 |
-
|
|
|
313 |
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
</div>
|
325 |
</div>
|
326 |
</div>
|
|
|
327 |
|
328 |
|
329 |
-
|
330 |
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
</div>
|
342 |
</div>
|
343 |
</div>
|
344 |
-
<?php }?>
|
345 |
-
|
346 |
-
<?php if ($pattern <> 'custom' && (!isset($type['protected']) || !$type['protected'])) { ?>
|
347 |
-
<div class="col-12 row m-0 p-3 sq_save_ajax">
|
348 |
-
<div class="col-12 p-0 text-right">
|
349 |
-
<input type="hidden" id="sq_delete_post_types_<?php echo esc_attr($pattern) ?>" value="<?php echo esc_attr($pattern) ?>"/>
|
350 |
-
<button type="button" data-confirm="<?php echo sprintf(esc_html__("Do you want to delete the automation for %s?", 'squirrly-seo'), ucwords(str_replace(array('-', '_'), array(' '), esc_attr($pattern)))); ?>" data-input="sq_delete_post_types_<?php echo esc_attr($pattern) ?>" data-action="sq_ajax_automation_deletepostype" data-name="post_type" class="btn btn-link btn-sm text-black-50 rounded-0"><?php echo sprintf(esc_html__("Remove automation for %s", 'squirrly-seo'), ucwords(str_replace(array('-', '_'), array(' '), esc_attr($pattern)))); ?></button>
|
351 |
-
</div>
|
352 |
</div>
|
353 |
-
<?php }
|
354 |
|
355 |
-
|
356 |
-
|
|
|
|
|
|
|
357 |
</div>
|
|
|
|
|
358 |
|
|
|
|
|
359 |
</div>
|
360 |
|
|
|
|
|
361 |
</div>
|
362 |
|
363 |
<?php } ?>
|
34 |
<?php $view->show_view('Blocks/SubMenu'); ?>
|
35 |
|
36 |
<div class="d-flex flex-column flex-grow-1 m-0 p-0">
|
37 |
+
<?php
|
38 |
+
$filter = array('public' => true, '_builtin' => false);
|
39 |
+
$types = get_post_types($filter);
|
40 |
+
|
41 |
+
foreach (SQ_Classes_Helpers_Tools::getOption('patterns') as $pattern => $type) {
|
42 |
$itemname = ucwords(str_replace(array('-', '_'), ' ', esc_attr($pattern)));
|
43 |
if ($pattern == 'tax-product_cat') {
|
44 |
$itemname = "Product Category";
|
55 |
<span class="text-black-50">(<?php echo esc_html($pattern) ?>)</span><?php } ?>
|
56 |
</h4>
|
57 |
|
58 |
+
|
59 |
+
<?php if (!SQ_Classes_Helpers_Tools::getOption('sq_auto_pattern')) { ?>
|
60 |
+
<div class="sq_deactivated_label sq-col-12 sq-row sq-m-0 sq-p-2 sq-pr-3 sq_save_ajax" style="top: 105px">
|
61 |
+
<div class="sq-col-12 sq-p-0 sq-text-center sq-small">
|
62 |
+
<input type="hidden" id="activate_sq_auto_pattern" value="1"/>
|
63 |
+
<button type="button" class="sq-btn sq-btn-link sq-text-danger sq-btn-lg" data-input="activate_sq_auto_pattern" data-action="sq_ajax_seosettings_save" data-name="sq_auto_pattern"><?php echo esc_html__("Activate Patterns", 'squirrly-seo'); ?></button>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<?php } ?>
|
67 |
+
|
68 |
+
<div class="p-0 m-0 <?php echo(SQ_Classes_Helpers_Tools::getOption('sq_auto_pattern') ? '' : 'sq_deactivated') ?>">
|
69 |
+
<div class="col-12 row p-0 mx-2 my-5">
|
70 |
<div class="col-4 p-0 pr-3 font-weight-bold">
|
71 |
<?php echo esc_html__("Title", 'squirrly-seo'); ?> :
|
72 |
<a href="https://howto12.squirrly.co/kb/seo-automation/#title_automation" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
76 |
<textarea rows="1" class="form-control bg-input" name="patterns[<?php echo esc_attr($pattern) ?>][title]"><?php echo (isset($type['title'])) ? esc_html($type['title']) : '' ?></textarea>
|
77 |
</div>
|
78 |
</div>
|
79 |
+
<div class="col-12 row p-0 mx-2 my-5">
|
80 |
<div class="col-4 p-0 pr-3 font-weight-bold">
|
81 |
<?php echo esc_html__("Description", 'squirrly-seo'); ?>:
|
82 |
<a href="https://howto12.squirrly.co/kb/seo-automation/#description_automation" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
86 |
<textarea class="form-control" name="patterns[<?php echo esc_attr($pattern) ?>][description]" rows="5"><?php echo (isset($type['description']) ? esc_html($type['description']) : '') ?></textarea>
|
87 |
</div>
|
88 |
</div>
|
89 |
+
<div class="col-12 row p-0 mx-2 my-5">
|
|
|
90 |
<div class="col-4 p-1 font-weight-bold">
|
91 |
<?php echo esc_html__("Separator", 'squirrly-seo'); ?>:
|
92 |
<a href="https://howto12.squirrly.co/kb/seo-automation/#separator" target="_blank"><i class="fa-solid fa-question-circle m-0 px-2" style="display: inline;"></i></a>
|
103 |
</select>
|
104 |
</div>
|
105 |
</div>
|
106 |
+
</div>
|
107 |
|
108 |
+
<?php if (SQ_Classes_Helpers_Tools::getOption('sq_auto_metas')) { ?>
|
109 |
+
<?php if (SQ_Classes_Helpers_Tools::getOption('sq_auto_noindex')) { ?>
|
110 |
+
<div class="col-12 row p-0 m-0 my-5">
|
111 |
+
<div class="col-12 p-0 sq-switch sq-switch-sm">
|
112 |
+
<input type="hidden" name="patterns[<?php echo esc_attr($pattern) ?>][noindex]" value="1"/>
|