Version Description
Download this release
Release Info
Developer | cifi |
Plugin | SEO SQUIRRLY™ |
Version | 11.1.08 |
Comparing to | |
See all releases |
Code changes from version 11.1.07 to 11.1.08
- classes/ActionController.php +1 -0
- classes/RemoteController.php +1 -1
- controllers/SeoSettings.php +3 -3
- models/Sitemaps.php +3 -0
- readme.txt +10 -0
- squirrly.php +2 -2
- view/Connect/GoogleAnalytics.php +1 -1
- view/Connect/GoogleSearchConsole.php +1 -1
- view/SeoSettings/Automation.php +1 -1
- view/assets/js/global.min.js +1 -1
classes/ActionController.php
CHANGED
@@ -180,6 +180,7 @@ class SQ_Classes_ActionController extends SQ_Classes_FrontController {
|
|
180 |
'sq_seosettings_gsc_revoke',
|
181 |
'sq_seosettings_gsc_check',
|
182 |
'sq_seosettings_ga_check',
|
|
|
183 |
'sq_seosettings_ga_save',
|
184 |
'sq_reinstall',
|
185 |
'sq_rollback',
|
180 |
'sq_seosettings_gsc_revoke',
|
181 |
'sq_seosettings_gsc_check',
|
182 |
'sq_seosettings_ga_check',
|
183 |
+
'sq_seosettings_clear_cache',
|
184 |
'sq_seosettings_ga_save',
|
185 |
'sq_reinstall',
|
186 |
'sq_rollback',
|
classes/RemoteController.php
CHANGED
@@ -106,7 +106,7 @@ class SQ_Classes_RemoteController {
|
|
106 |
* @return string
|
107 |
*/
|
108 |
public static function getApiLink($path) {
|
109 |
-
return _SQ_APIV2_URL_ . $path . '?token=' . SQ_Classes_Helpers_Tools::getOption('sq_api') . '&url=' . apply_filters('sq_homeurl', get_bloginfo('url'));
|
110 |
}
|
111 |
|
112 |
/**
|
106 |
* @return string
|
107 |
*/
|
108 |
public static function getApiLink($path) {
|
109 |
+
return _SQ_APIV2_URL_ . $path . '?token=' . SQ_Classes_Helpers_Tools::getOption('sq_api') . '&url_token='.(SQ_Classes_Helpers_Tools::getOption('sq_cloud_connect') ? SQ_Classes_Helpers_Tools::getOption('sq_cloud_token') : false).'&url=' . apply_filters('sq_homeurl', get_bloginfo('url'));
|
110 |
}
|
111 |
|
112 |
/**
|
controllers/SeoSettings.php
CHANGED
@@ -392,9 +392,8 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
|
|
392 |
break;
|
393 |
case 'sq_seosettings_ga_check':
|
394 |
case 'sq_seosettings_gsc_check':
|
395 |
-
|
396 |
-
|
397 |
-
}
|
398 |
//Refresh the checkin on login
|
399 |
delete_transient('sq_checkin');
|
400 |
|
@@ -750,6 +749,7 @@ class SQ_Controllers_SeoSettings extends SQ_Classes_FrontController {
|
|
750 |
echo wp_json_encode(array());
|
751 |
exit();
|
752 |
|
|
|
753 |
/************************ Automation ********************************************************/
|
754 |
case 'sq_ajax_automation_addpostype':
|
755 |
SQ_Classes_Helpers_Tools::setHeader('json');
|
392 |
break;
|
393 |
case 'sq_seosettings_ga_check':
|
394 |
case 'sq_seosettings_gsc_check':
|
395 |
+
case 'sq_seosettings_clear_cache':
|
396 |
+
|
|
|
397 |
//Refresh the checkin on login
|
398 |
delete_transient('sq_checkin');
|
399 |
|
749 |
echo wp_json_encode(array());
|
750 |
exit();
|
751 |
|
752 |
+
|
753 |
/************************ Automation ********************************************************/
|
754 |
case 'sq_ajax_automation_addpostype':
|
755 |
SQ_Classes_Helpers_Tools::setHeader('json');
|
models/Sitemaps.php
CHANGED
@@ -116,6 +116,9 @@ class SQ_Models_Sitemaps extends SQ_Models_Abstract_Seo {
|
|
116 |
continue;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
119 |
if (function_exists('pll_get_post_translations')) {
|
120 |
if (SQ_Classes_Helpers_Tools::getOption('sq_sitemap_combinelangs')) {
|
121 |
$translates = pll_get_post_translations($currentpost->ID);
|
116 |
continue;
|
117 |
}
|
118 |
|
119 |
+
//Exclude templates from sitemap
|
120 |
+
if (in_array($currentpost->post_type, array('elementor_library','ct_template','oxy_user_library','fusion_template'))) continue;
|
121 |
+
|
122 |
if (function_exists('pll_get_post_translations')) {
|
123 |
if (SQ_Classes_Helpers_Tools::getOption('sq_sitemap_combinelangs')) {
|
124 |
$translates = pll_get_post_translations($currentpost->ID);
|
readme.txt
CHANGED
@@ -654,6 +654,16 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
|
|
654 |
9. Squirrly SEO - Progress & Achievements
|
655 |
|
656 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
657 |
= 11.1.07- 08/05/2021 =
|
658 |
Update - Added compatibility with UiPress plugin
|
659 |
Update - Add Google Analytics property option select in Squirrly SEO plugin
|
654 |
9. Squirrly SEO - Progress & Achievements
|
655 |
|
656 |
== Changelog ==
|
657 |
+
= 11.1.08- 09/06/2021 =
|
658 |
+
Update - Compatibility with Oxygen Plugin when the Current Post is not loaded correctly on init
|
659 |
+
Update - Compatibility with TranslatePress plugin to load all translations correctly
|
660 |
+
Update - Show the GA tracking code on Property list
|
661 |
+
Update - Compatibility with Squirrly - No Categories plugin to hide Category Base for Woocommerce
|
662 |
+
Fix - Save when empty fields are added for UPC, GTIN, MPN fields in Woocommerce
|
663 |
+
Fix - Update the Connect To Cloud option on plugin activation process
|
664 |
+
Fix - Error setPost missing in SEO Snippet & Bulk SEO
|
665 |
+
Fix - Hide the Account Info only when Dev Kit specification for Dev Kit support
|
666 |
+
|
667 |
= 11.1.07- 08/05/2021 =
|
668 |
Update - Added compatibility with UiPress plugin
|
669 |
Update - Add Google Analytics property option select in Squirrly SEO plugin
|
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 SEO
|
10 |
* Author URI: https://plugin.squirrly.co
|
11 |
-
* Version: 11.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,7 +17,7 @@
|
|
17 |
|
18 |
if (!defined('SQ_VERSION')) {
|
19 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
20 |
-
define('SQ_VERSION', '11.1.
|
21 |
//The last stable version
|
22 |
define('SQ_STABLE_VERSION', '11.1.06');
|
23 |
// Call config files
|
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 SEO
|
10 |
* Author URI: https://plugin.squirrly.co
|
11 |
+
* Version: 11.1.08
|
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', '11.1.08');
|
21 |
//The last stable version
|
22 |
define('SQ_STABLE_VERSION', '11.1.06');
|
23 |
// Call config files
|
view/Connect/GoogleAnalytics.php
CHANGED
@@ -64,7 +64,7 @@ $connect = json_decode(wp_json_encode(SQ_Classes_Helpers_Tools::getOption('conne
|
|
64 |
<p><?php echo sprintf(esc_html__("Need Help Connecting Google Analytics? %sClick Here%s", _SQ_PLUGIN_NAME_),'<a href="https://howto.squirrly.co/faq/how-do-i-connect-google-analytics-both-tracking-code-and-the-api-connection/" target="_blank" style="color: lightyellow; text-decoration: underline">','</a>') ?></p>
|
65 |
</div>
|
66 |
<div class="sq_step1 mt-1">
|
67 |
-
<a href="<?php echo SQ_Classes_RemoteController::getApiLink('gaoauth'); ?>" onclick="jQuery('.sq_step1').hide();jQuery('.sq_step2').show();" target="_blank" type="button" class="btn btn-block btn-social btn-google text-info connect-button connect btn-lg">
|
68 |
<span class="fa fa-google"></span> <?php echo esc_html__("Sign in", _SQ_PLUGIN_NAME_); ?>
|
69 |
</a>
|
70 |
</div>
|
64 |
<p><?php echo sprintf(esc_html__("Need Help Connecting Google Analytics? %sClick Here%s", _SQ_PLUGIN_NAME_),'<a href="https://howto.squirrly.co/faq/how-do-i-connect-google-analytics-both-tracking-code-and-the-api-connection/" target="_blank" style="color: lightyellow; text-decoration: underline">','</a>') ?></p>
|
65 |
</div>
|
66 |
<div class="sq_step1 mt-1">
|
67 |
+
<a href="<?php echo SQ_Classes_RemoteController::getApiLink('gaoauth'); ?>" onclick="jQuery('.sq_step1').hide();jQuery('.sq_step2').show();jQuery(this).sq_clearCache();" target="_blank" type="button" class="btn btn-block btn-social btn-google text-info connect-button connect btn-lg">
|
68 |
<span class="fa fa-google"></span> <?php echo esc_html__("Sign in", _SQ_PLUGIN_NAME_); ?>
|
69 |
</a>
|
70 |
</div>
|
view/Connect/GoogleSearchConsole.php
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
<p><?php echo sprintf(esc_html__("Need Help Connecting Google Search Console? %sClick Here%s", _SQ_PLUGIN_NAME_), '<a href="https://howto.squirrly.co/faq/need-help-connecting-google-search-console-both-tracking-code-and-api-connection/" target="_blank" style="color: lightyellow; text-decoration: underline">', '</a>') ?></p>
|
33 |
</div>
|
34 |
<div class="sq_step1 mt-1">
|
35 |
-
<a href="<?php echo SQ_Classes_RemoteController::getApiLink('gscoauth'); ?>" onclick="jQuery('.sq_step1').hide();jQuery('.sq_step2').show();" target="_blank" type="button" class="btn btn-block btn-social btn-google text-info connect-button connect btn-lg">
|
36 |
<span class="fa fa-google"></span> <?php echo esc_html__("Sign in", _SQ_PLUGIN_NAME_); ?>
|
37 |
</a>
|
38 |
</div>
|
32 |
<p><?php echo sprintf(esc_html__("Need Help Connecting Google Search Console? %sClick Here%s", _SQ_PLUGIN_NAME_), '<a href="https://howto.squirrly.co/faq/need-help-connecting-google-search-console-both-tracking-code-and-api-connection/" target="_blank" style="color: lightyellow; text-decoration: underline">', '</a>') ?></p>
|
33 |
</div>
|
34 |
<div class="sq_step1 mt-1">
|
35 |
+
<a href="<?php echo SQ_Classes_RemoteController::getApiLink('gscoauth'); ?>" onclick="jQuery('.sq_step1').hide();jQuery('.sq_step2').show();jQuery(this).sq_clearCache();" target="_blank" type="button" class="btn btn-block btn-social btn-google text-info connect-button connect btn-lg">
|
36 |
<span class="fa fa-google"></span> <?php echo esc_html__("Sign in", _SQ_PLUGIN_NAME_); ?>
|
37 |
</a>
|
38 |
</div>
|
view/SeoSettings/Automation.php
CHANGED
@@ -58,7 +58,7 @@
|
|
58 |
|
59 |
$new_types = array();
|
60 |
foreach ($types as $pattern => $type) {
|
61 |
-
if (in_array($pattern, array('elementor_library'))) continue;
|
62 |
|
63 |
if (in_array($pattern, array_keys(SQ_Classes_Helpers_Tools::getOption('patterns')))) {
|
64 |
continue;
|
58 |
|
59 |
$new_types = array();
|
60 |
foreach ($types as $pattern => $type) {
|
61 |
+
if (in_array($pattern, array('elementor_library','ct_template','oxy_user_library','fusion_template'))) continue;
|
62 |
|
63 |
if (in_array($pattern, array_keys(SQ_Classes_Helpers_Tools::getOption('patterns')))) {
|
64 |
continue;
|
view/assets/js/global.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";$.sq_setCookie=function(name,value){value=value.toString().replace(new RegExp("\\\\","g"),"");document.cookie=name+"="+encodeURIComponent(value)+"; expires="+60*24+"; path=/"};$.sq_getCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" ")c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return decodeURIComponent(c.substring(nameEQ.length,c.length))}return null};$.sq_getHashParam=function(key){var urlparts=location.href.split("#");if(urlparts.length>=2){urlparts.shift();var queryString=urlparts.join("#");var results=new RegExp("[\\?&#]*"+key+"=([^&#]*)").exec(queryString);if(results){return results[1]||0}}return false};$.sq_setHashParam=function(key,val){var urlparts=location.href.split("#");if(urlparts.length>=2){var add=true;var urlBase=urlparts.shift();var queryString=urlparts.join("#");var prefix=encodeURIComponent(key)+"=";var pars=queryString.split(/[&;]/g);for(var i=pars.length;i-- >0;){if(pars[i].lastIndexOf(prefix,0)!==-1||pars[i]===""){pars[i]=pars[i].replace(pars[i],prefix+val);add=false;break}}add&&pars.push(prefix+val);location.href=urlBase+"#"+pars.join("&")}else{location.href+="#"+key+"="+val}};$.sq_getParam=function getUrlParameter(sParam){var sPageURL=window.location.search.substring(1),sURLVariables=sPageURL.split("&"),sParameterName,i;for(i=0;i<sURLVariables.length;i++){sParameterName=sURLVariables[i].split("=");if(sParameterName[0]===sParam){return sParameterName[1]===undefined?true:decodeURIComponent(sParameterName[1])}}return false};$.sq_loadChart=function(div){new Chart(div,{type:"bar",data:{labels:["","","","","","",""],datasets:[{data:div.data("values").split(","),borderWidth:0}]},options:{tooltips:{enabled:false},legend:{display:false},layout:{padding:{left:0,right:0,top:0,bottom:0}},title:{display:false},scales:{yAxes:[{display:false,ticks:{beginAtZero:true,min:0,max:1}}],xAxes:[{display:false,ticks:{beginAtZero:true}}]}}})};$.sq_showMessage=function(text,time){$(".sq_alert").remove();if(text.indexOf("<div>")==-1){text=$('<div class="sq_alert position-fixed fixed-top text-center text-white bg-success m-0 p-3 border border-white sq-position-fixed sq-fixed-top sq-text-center sq-text-white sq-bg-success sq-m-0 sq-p-4 sq-border sq-border-white">'+text+"</div>")}$("body").prepend(text);if(typeof time==="undefined"){time=2e3}setTimeout(function(){text.remove()},time);return text};$.fn.sq_addBriefcase=function(){var $this=this;$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_addkeyword",keyword:$this.data("keyword"),doserp:parseInt($this.data("doserp")),hidden:parseInt($this.data("hidden")),sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_minloading");if(typeof response.message!=="undefined"){$.sq_showMessage(response.message).addClass("sq_success");$this.closest("tr").addClass("bg-briefcase")}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error);$this.removeClass("sq_minloading")}else{$this.removeClass("sq_minloading");location.reload()}}).fail(function(){$this.removeClass("sq_minloading")})};$.fn.sq_ajaxCallListen=function(){var $this=this;var $input=$("#"+$this.data("input"));var $confirm=$this.data("confirm");var $action=$this.data("action");var $redirect=$this.data("redirect");var $javascript=$this.data("javascript");var $name=$this.data("name");var $value=0;if(!$input.length){$input=$this}if(typeof $confirm!=="undefined"){if(!confirm($confirm))return}if($input.is("input")&&$input.attr("type")==="checkbox"){if($input.is(":checked")){$value=$input.val()}}else{if($input.is("select")){$value=$input.find("option:selected").val()}else{if($input.is("input")&&$input.val()!==""){$value=$input.val()}}}$this.addClass("sq_minloading");if($action!==""&&$value!==""){return $.post(sqQuery.ajaxurl,{action:$action,input:$name,value:$value,referal:location.href,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.data!=="undefined"){if(response.data===""){$("#wpbody-content").prepend("Saved")}else{$("#wpbody-content").prepend(response.data)}if(response.assistant!==""&&response.assistant_dest){var show_url=$(".sq_assistant").find("ul:visible").attr("id");$(response.assistant_dest).html(response.assistant);if(show_url)$("#"+show_url).show()}setTimeout(function(){$this.removeClass("sq_minloading");if(typeof $javascript!=="undefined"){eval($javascript)}else if(typeof $redirect!=="undefined"){window.open($redirect,"_blank")}else{location.reload()}},1e3)}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error);$this.removeClass("sq_minloading")}else{$this.removeClass("sq_minloading");location.reload()}}).fail(function(){$this.removeClass("sq_minloading")},"json")}};$.fn.sq_getAccount=function(){var $this=this;$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_account_getaccount",sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"){$this.html(response.html)}}$this.removeClass("sq_minloading")}).fail(function(){$this.removeClass("sq_minloading")},"json")};$(document).ready(function(){SQ_DEBUG&&console.log("sq_GlobalInit");if($(".sq_account_info").length>0){$(".sq_account_info").sq_getAccount()}$(".sq_trend:visible").each(function(){$.sq_loadChart($(this))});if($(".sq_save_ajax").length>0){$(".sq_save_ajax").find("input").on("change",function(){$(this).sq_ajaxCallListen()});$(".sq_save_ajax").find("input[type=image]").on("click",function(){$(this).sq_ajaxCallListen()});$(".sq_save_ajax").find("button").on("click",function(){$(this).sq_ajaxCallListen()})}$("button.show_advanced").on("click",function(){$(".sq_advanced").show();$("button.show_advanced").hide();$("button.hide_advanced").show()});$("button.hide_advanced").on("click",function(){$(".sq_advanced").hide();$("button.hide_advanced").hide();$("button.show_advanced").show()});$("button[type=submit]").not(".noloading").on("click",function(){$(this).addClass("sq_minloading")});$("form#sq_register").on("submit",function(){$(this).find("button[type=submit]").addClass("sq_minloading")})})})(jQuery);
|
1 |
+
if(typeof SQ_DEBUG==="undefined")var SQ_DEBUG=false;(function($){"use strict";$.sq_setCookie=function(name,value){value=value.toString().replace(new RegExp("\\\\","g"),"");document.cookie=name+"="+encodeURIComponent(value)+"; expires="+60*24+"; path=/"};$.sq_getCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" ")c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return decodeURIComponent(c.substring(nameEQ.length,c.length))}return null};$.sq_getHashParam=function(key){var urlparts=location.href.split("#");if(urlparts.length>=2){urlparts.shift();var queryString=urlparts.join("#");var results=new RegExp("[\\?&#]*"+key+"=([^&#]*)").exec(queryString);if(results){return results[1]||0}}return false};$.sq_setHashParam=function(key,val){var urlparts=location.href.split("#");if(urlparts.length>=2){var add=true;var urlBase=urlparts.shift();var queryString=urlparts.join("#");var prefix=encodeURIComponent(key)+"=";var pars=queryString.split(/[&;]/g);for(var i=pars.length;i-- >0;){if(pars[i].lastIndexOf(prefix,0)!==-1||pars[i]===""){pars[i]=pars[i].replace(pars[i],prefix+val);add=false;break}}add&&pars.push(prefix+val);location.href=urlBase+"#"+pars.join("&")}else{location.href+="#"+key+"="+val}};$.sq_getParam=function getUrlParameter(sParam){var sPageURL=window.location.search.substring(1),sURLVariables=sPageURL.split("&"),sParameterName,i;for(i=0;i<sURLVariables.length;i++){sParameterName=sURLVariables[i].split("=");if(sParameterName[0]===sParam){return sParameterName[1]===undefined?true:decodeURIComponent(sParameterName[1])}}return false};$.sq_loadChart=function(div){new Chart(div,{type:"bar",data:{labels:["","","","","","",""],datasets:[{data:div.data("values").split(","),borderWidth:0}]},options:{tooltips:{enabled:false},legend:{display:false},layout:{padding:{left:0,right:0,top:0,bottom:0}},title:{display:false},scales:{yAxes:[{display:false,ticks:{beginAtZero:true,min:0,max:1}}],xAxes:[{display:false,ticks:{beginAtZero:true}}]}}})};$.sq_showMessage=function(text,time){$(".sq_alert").remove();if(text.indexOf("<div>")==-1){text=$('<div class="sq_alert position-fixed fixed-top text-center text-white bg-success m-0 p-3 border border-white sq-position-fixed sq-fixed-top sq-text-center sq-text-white sq-bg-success sq-m-0 sq-p-4 sq-border sq-border-white">'+text+"</div>")}$("body").prepend(text);if(typeof time==="undefined"){time=2e3}setTimeout(function(){text.remove()},time);return text};$.fn.sq_addBriefcase=function(){var $this=this;$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_briefcase_addkeyword",keyword:$this.data("keyword"),doserp:parseInt($this.data("doserp")),hidden:parseInt($this.data("hidden")),sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_minloading");if(typeof response.message!=="undefined"){$.sq_showMessage(response.message).addClass("sq_success");$this.closest("tr").addClass("bg-briefcase")}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error);$this.removeClass("sq_minloading")}else{$this.removeClass("sq_minloading");location.reload()}}).fail(function(){$this.removeClass("sq_minloading")})};$.fn.sq_ajaxCallListen=function(){var $this=this;var $input=$("#"+$this.data("input"));var $confirm=$this.data("confirm");var $action=$this.data("action");var $redirect=$this.data("redirect");var $javascript=$this.data("javascript");var $name=$this.data("name");var $value=0;if(!$input.length){$input=$this}if(typeof $confirm!=="undefined"){if(!confirm($confirm))return}if($input.is("input")&&$input.attr("type")==="checkbox"){if($input.is(":checked")){$value=$input.val()}}else{if($input.is("select")){$value=$input.find("option:selected").val()}else{if($input.is("input")&&$input.val()!==""){$value=$input.val()}}}$this.addClass("sq_minloading");if($action!==""&&$value!==""){return $.post(sqQuery.ajaxurl,{action:$action,input:$name,value:$value,referal:location.href,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.data!=="undefined"){if(response.data===""){$("#wpbody-content").prepend("Saved")}else{$("#wpbody-content").prepend(response.data)}if(response.assistant!==""&&response.assistant_dest){var show_url=$(".sq_assistant").find("ul:visible").attr("id");$(response.assistant_dest).html(response.assistant);if(show_url)$("#"+show_url).show()}setTimeout(function(){$this.removeClass("sq_minloading");if(typeof $javascript!=="undefined"){eval($javascript)}else if(typeof $redirect!=="undefined"){window.open($redirect,"_blank")}else{location.reload()}},1e3)}else if(typeof response.error!=="undefined"){$.sq_showMessage(response.error);$this.removeClass("sq_minloading")}else{$this.removeClass("sq_minloading");location.reload()}}).fail(function(){$this.removeClass("sq_minloading")},"json")}};$.fn.sq_getAccount=function(){var $this=this;$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_account_getaccount",sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response!=="undefined"){if(typeof response.html!=="undefined"){$this.html(response.html)}}$this.removeClass("sq_minloading")}).fail(function(){$this.removeClass("sq_minloading")},"json")};$.fn.sq_clearCache=function(){$.post(sqQuery.ajaxurl,{action:"sq_seosettings_clear_cache",sq_nonce:sqQuery.nonce})};$(document).ready(function(){SQ_DEBUG&&console.log("sq_GlobalInit");if($(".sq_account_info").length>0){$(".sq_account_info").sq_getAccount()}$(".sq_trend:visible").each(function(){$.sq_loadChart($(this))});if($(".sq_save_ajax").length>0){$(".sq_save_ajax").find("input").on("change",function(){$(this).sq_ajaxCallListen()});$(".sq_save_ajax").find("input[type=image]").on("click",function(){$(this).sq_ajaxCallListen()});$(".sq_save_ajax").find("button").on("click",function(){$(this).sq_ajaxCallListen()})}$("button.show_advanced").on("click",function(){$(".sq_advanced").show();$("button.show_advanced").hide();$("button.hide_advanced").show()});$("button.hide_advanced").on("click",function(){$(".sq_advanced").hide();$("button.hide_advanced").hide();$("button.show_advanced").show()});$("button[type=submit]").not(".noloading").on("click",function(){$(this).addClass("sq_minloading")});$("form#sq_register").on("submit",function(){$(this).find("button[type=submit]").addClass("sq_minloading")})})})(jQuery);
|