Version Description
- 02/23/2018 =
- Fix - Correct the separator to show on custom patterns
- Fix - Show Title and Excerpt when Pattern option is off
- Fix - Save Pattern option on Switch click
- Fix - Show Save Message on Snippet save
Download this release
Release Info
| Developer | cifi |
| Plugin | |
| Version | 8.3.11 |
| Comparing to | |
| See all releases | |
Code changes from version 8.3.10 to 8.3.11
- core/BlockPatterns.php +9 -0
- core/BlockSettingsSeo.php +2 -1
- core/config.xml +1 -0
- models/domain/Patterns.php +1 -1
- models/domain/Post.php +28 -25
- models/domain/Sq.php +3 -0
- readme.txt +6 -0
- squirrly.php +2 -2
- view/BlockBriefcaseKeywords.php +0 -2
- view/FrontMenu.php +6 -6
- view/js/blockpatterns.js +15 -0
- view/js/blockpatterns.min.js +2 -1
- view/js/blocksettingsseo.js +1 -1
- view/js/frontmenu.js +3 -3
- view/js/frontmenu.min.js +2 -2
core/BlockPatterns.php
CHANGED
|
@@ -19,6 +19,15 @@ class SQ_Core_BlockPatterns extends SQ_Classes_BlockController {
|
|
| 19 |
public function action() {
|
| 20 |
parent::action();
|
| 21 |
switch (SQ_Classes_Tools::getValue('action')) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
case 'sq_savepatters':
|
| 24 |
if (!current_user_can('manage_options')) {
|
| 19 |
public function action() {
|
| 20 |
parent::action();
|
| 21 |
switch (SQ_Classes_Tools::getValue('action')) {
|
| 22 |
+
case 'sq_savepatters_option':
|
| 23 |
+
if (!current_user_can('manage_options')) {
|
| 24 |
+
return;
|
| 25 |
+
}
|
| 26 |
+
SQ_Classes_Tools::setHeader('json');
|
| 27 |
+
|
| 28 |
+
SQ_Classes_Tools::saveOptions('sq_auto_pattern', SQ_Classes_Tools::getValue('sq_auto_pattern'));
|
| 29 |
+
echo json_encode(array('saved' => true));
|
| 30 |
+
exit();
|
| 31 |
|
| 32 |
case 'sq_savepatters':
|
| 33 |
if (!current_user_can('manage_options')) {
|
core/BlockSettingsSeo.php
CHANGED
|
@@ -388,9 +388,10 @@ class SQ_Core_BlockSettingsSeo extends SQ_Classes_BlockController {
|
|
| 388 |
if (!current_user_can('manage_options')) {
|
| 389 |
return;
|
| 390 |
}
|
|
|
|
| 391 |
|
| 392 |
SQ_Classes_Tools::saveOptions('active_help', SQ_Classes_Tools::getValue('active_help'));
|
| 393 |
-
|
| 394 |
case 'sq_warnings_off':
|
| 395 |
if (!current_user_can('manage_options')) {
|
| 396 |
return;
|
| 388 |
if (!current_user_can('manage_options')) {
|
| 389 |
return;
|
| 390 |
}
|
| 391 |
+
SQ_Classes_Tools::setHeader('json');
|
| 392 |
|
| 393 |
SQ_Classes_Tools::saveOptions('active_help', SQ_Classes_Tools::getValue('active_help'));
|
| 394 |
+
exit();
|
| 395 |
case 'sq_warnings_off':
|
| 396 |
if (!current_user_can('manage_options')) {
|
| 397 |
return;
|
core/config.xml
CHANGED
|
@@ -77,6 +77,7 @@
|
|
| 77 |
<description>Setting page</description>
|
| 78 |
<actions>
|
| 79 |
<action>sq_savepatters</action>
|
|
|
|
| 80 |
</actions>
|
| 81 |
<active>1</active>
|
| 82 |
<admin>1</admin>
|
| 77 |
<description>Setting page</description>
|
| 78 |
<actions>
|
| 79 |
<action>sq_savepatters</action>
|
| 80 |
+
<action>sq_savepatters_option</action>
|
| 81 |
</actions>
|
| 82 |
<active>1</active>
|
| 83 |
<admin>1</admin>
|
models/domain/Patterns.php
CHANGED
|
@@ -206,7 +206,7 @@ class SQ_Models_Domain_Patterns extends SQ_Models_Abstract_Domain {
|
|
| 206 |
|
| 207 |
public function getSep() {
|
| 208 |
if (!isset($this->_sep)) {
|
| 209 |
-
$this->_sep =
|
| 210 |
}
|
| 211 |
|
| 212 |
$seps = json_decode(SQ_ALL_SEP, true);
|
| 206 |
|
| 207 |
public function getSep() {
|
| 208 |
if (!isset($this->_sep)) {
|
| 209 |
+
$this->_sep = '-';
|
| 210 |
}
|
| 211 |
|
| 212 |
$seps = json_decode(SQ_ALL_SEP, true);
|
models/domain/Post.php
CHANGED
|
@@ -11,6 +11,7 @@ class SQ_Models_Domain_Post extends SQ_Models_Abstract_Domain {
|
|
| 11 |
protected $_sq;
|
| 12 |
protected $_sq_adm;
|
| 13 |
protected $_socials;
|
|
|
|
| 14 |
protected $_patterns;
|
| 15 |
//
|
| 16 |
protected $_post_name;
|
|
@@ -44,26 +45,32 @@ class SQ_Models_Domain_Post extends SQ_Models_Abstract_Domain {
|
|
| 44 |
if (!isset($this->_sq) && isset($this->_post_type) && $this->_post_type <> '') {
|
| 45 |
//Get the saved sq settings
|
| 46 |
$this->_sq = SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getSqSeo($this->_hash);
|
| 47 |
-
if (
|
| 48 |
$patterns = SQ_Classes_Tools::getOption('patterns');
|
| 49 |
//print_R($patterns);
|
| 50 |
if (!empty($patterns) && $sq_array = $this->_sq->toArray()) {
|
| 51 |
if (!empty($sq_array))
|
| 52 |
foreach ($sq_array as $key => $value) {
|
| 53 |
-
if ($value == '') {
|
| 54 |
-
if (
|
| 55 |
-
if (isset($patterns[$this->_post_type]
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
} else {
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
}
|
| 69 |
}
|
|
@@ -71,9 +78,7 @@ class SQ_Models_Domain_Post extends SQ_Models_Abstract_Domain {
|
|
| 71 |
}
|
| 72 |
}
|
| 73 |
|
| 74 |
-
|
| 75 |
}
|
| 76 |
-
|
| 77 |
return $this->_sq;
|
| 78 |
}
|
| 79 |
|
|
@@ -90,14 +95,18 @@ class SQ_Models_Domain_Post extends SQ_Models_Abstract_Domain {
|
|
| 90 |
if (!empty($sq_array))
|
| 91 |
foreach ($sq_array as $key => $value) {
|
| 92 |
if ($value == '') {
|
| 93 |
-
if (
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
}
|
| 99 |
}
|
| 100 |
}
|
|
|
|
| 101 |
}
|
| 102 |
}
|
| 103 |
}
|
|
@@ -142,10 +151,4 @@ class SQ_Models_Domain_Post extends SQ_Models_Abstract_Domain {
|
|
| 142 |
return $this->_post_attachment;
|
| 143 |
}
|
| 144 |
|
| 145 |
-
public function toArray() {
|
| 146 |
-
$array = parent::toArray();
|
| 147 |
-
$array['sq'] = $this->sq;
|
| 148 |
-
|
| 149 |
-
return $array;
|
| 150 |
-
}
|
| 151 |
}
|
| 11 |
protected $_sq;
|
| 12 |
protected $_sq_adm;
|
| 13 |
protected $_socials;
|
| 14 |
+
//
|
| 15 |
protected $_patterns;
|
| 16 |
//
|
| 17 |
protected $_post_name;
|
| 45 |
if (!isset($this->_sq) && isset($this->_post_type) && $this->_post_type <> '') {
|
| 46 |
//Get the saved sq settings
|
| 47 |
$this->_sq = SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getSqSeo($this->_hash);
|
| 48 |
+
if (!empty($this->_sq)) {
|
| 49 |
$patterns = SQ_Classes_Tools::getOption('patterns');
|
| 50 |
//print_R($patterns);
|
| 51 |
if (!empty($patterns) && $sq_array = $this->_sq->toArray()) {
|
| 52 |
if (!empty($sq_array))
|
| 53 |
foreach ($sq_array as $key => $value) {
|
| 54 |
+
if ($key == 'sep' || $value == '') {
|
| 55 |
+
if (SQ_Classes_Tools::getOption('sq_auto_pattern')) {
|
| 56 |
+
if (isset($patterns[$this->_post_type])) {
|
| 57 |
+
if (isset($patterns[$this->_post_type][$key])) {
|
| 58 |
+
$this->_sq->$key = $patterns[$this->_post_type][$key];
|
| 59 |
+
}
|
| 60 |
+
} else {
|
| 61 |
+
if (isset($patterns['custom'][$key])) {
|
| 62 |
+
$this->_sq->$key = $patterns['custom'][$key];
|
| 63 |
+
}
|
| 64 |
}
|
| 65 |
} else {
|
| 66 |
+
//If there are no patterns and no custom field, get the post values
|
| 67 |
+
switch ($key) {
|
| 68 |
+
case 'title':
|
| 69 |
+
$this->_sq->title = $this->post_title;
|
| 70 |
+
break;
|
| 71 |
+
case 'description':
|
| 72 |
+
$this->_sq->description = $this->post_excerpt;
|
| 73 |
+
break;
|
| 74 |
}
|
| 75 |
}
|
| 76 |
}
|
| 78 |
}
|
| 79 |
}
|
| 80 |
|
|
|
|
| 81 |
}
|
|
|
|
| 82 |
return $this->_sq;
|
| 83 |
}
|
| 84 |
|
| 95 |
if (!empty($sq_array))
|
| 96 |
foreach ($sq_array as $key => $value) {
|
| 97 |
if ($value == '') {
|
| 98 |
+
if (SQ_Classes_Tools::getOption('sq_auto_pattern')) {
|
| 99 |
+
|
| 100 |
+
if (isset($patterns[$this->_post_type])) {
|
| 101 |
+
$this->_sq_adm->patterns = json_decode(json_encode($patterns[$this->_post_type]));
|
| 102 |
+
} else {
|
| 103 |
+
$this->_sq_adm->patterns = json_decode(json_encode($patterns['custom']));
|
| 104 |
+
}
|
| 105 |
}
|
| 106 |
}
|
| 107 |
}
|
| 108 |
}
|
| 109 |
+
|
| 110 |
}
|
| 111 |
}
|
| 112 |
}
|
| 151 |
return $this->_post_attachment;
|
| 152 |
}
|
| 153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
}
|
models/domain/Sq.php
CHANGED
|
@@ -207,6 +207,9 @@ class SQ_Models_Domain_Sq extends SQ_Models_Abstract_Domain {
|
|
| 207 |
'og_author' => $this->og_author,
|
| 208 |
'og_type' => $this->og_type,
|
| 209 |
'og_media' => $this->og_media,
|
|
|
|
|
|
|
|
|
|
| 210 |
);
|
| 211 |
}
|
| 212 |
}
|
| 207 |
'og_author' => $this->og_author,
|
| 208 |
'og_type' => $this->og_type,
|
| 209 |
'og_media' => $this->og_media,
|
| 210 |
+
|
| 211 |
+
'patterns' => $this->patterns,
|
| 212 |
+
'sep' => $this->sep,
|
| 213 |
);
|
| 214 |
}
|
| 215 |
}
|
readme.txt
CHANGED
|
@@ -155,6 +155,12 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
|
|
| 155 |
Squirrly SEO 8.3.01 it's a stable version of Squirrly SEO and has all the SEO requirements by Search Engines
|
| 156 |
|
| 157 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
= 8.3.10 - 02/21/2018 =
|
| 159 |
* Update - Launching the Squirrly SEO Briefcase Labels
|
| 160 |
* Update - Changed New Meta Lengths for all articles
|
| 155 |
Squirrly SEO 8.3.01 it's a stable version of Squirrly SEO and has all the SEO requirements by Search Engines
|
| 156 |
|
| 157 |
== Changelog ==
|
| 158 |
+
= 8.3.11 - 02/23/2018 =
|
| 159 |
+
* Fix - Correct the separator to show on custom patterns
|
| 160 |
+
* Fix - Show Title and Excerpt when Pattern option is off
|
| 161 |
+
* Fix - Save Pattern option on Switch click
|
| 162 |
+
* Fix - Show Save Message on Snippet save
|
| 163 |
+
|
| 164 |
= 8.3.10 - 02/21/2018 =
|
| 165 |
* Update - Launching the Squirrly SEO Briefcase Labels
|
| 166 |
* Update - Changed New Meta Lengths for all articles
|
squirrly.php
CHANGED
|
@@ -8,12 +8,12 @@
|
|
| 8 |
Plugin URI: http://www.squirrly.co
|
| 9 |
Description: SEO By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
|
| 10 |
Author: Squirrly SEO
|
| 11 |
-
Version: 8.3.
|
| 12 |
Author URI: http://www.squirrly.co
|
| 13 |
*/
|
| 14 |
|
| 15 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
| 16 |
-
define('SQ_VERSION', '8.3.
|
| 17 |
|
| 18 |
/* Call config files */
|
| 19 |
if (file_exists(dirname(__FILE__) . '/config/config.php')) {
|
| 8 |
Plugin URI: http://www.squirrly.co
|
| 9 |
Description: SEO By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
|
| 10 |
Author: Squirrly SEO
|
| 11 |
+
Version: 8.3.11
|
| 12 |
Author URI: http://www.squirrly.co
|
| 13 |
*/
|
| 14 |
|
| 15 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
| 16 |
+
define('SQ_VERSION', '8.3.11');
|
| 17 |
|
| 18 |
/* Call config files */
|
| 19 |
if (file_exists(dirname(__FILE__) . '/config/config.php')) {
|
view/BlockBriefcaseKeywords.php
CHANGED
|
@@ -45,8 +45,6 @@
|
|
| 45 |
|
| 46 |
<button class="btn btn-success" onclick="jQuery('.sq_add_keyword_dialog').modal('show')"><?php _e('Add new keyword', _SQ_PLUGIN_NAME_); ?></button>
|
| 47 |
<button class="btn btn-warning" onclick="jQuery('.sq_add_labels_dialog').modal('show')"><?php _e('Manage Labels', _SQ_PLUGIN_NAME_); ?></button>
|
| 48 |
-
|
| 49 |
-
|
| 50 |
</div>
|
| 51 |
|
| 52 |
<div class="col-md-12 m-b-lg">
|
| 45 |
|
| 46 |
<button class="btn btn-success" onclick="jQuery('.sq_add_keyword_dialog').modal('show')"><?php _e('Add new keyword', _SQ_PLUGIN_NAME_); ?></button>
|
| 47 |
<button class="btn btn-warning" onclick="jQuery('.sq_add_labels_dialog').modal('show')"><?php _e('Manage Labels', _SQ_PLUGIN_NAME_); ?></button>
|
|
|
|
|
|
|
| 48 |
</div>
|
| 49 |
|
| 50 |
<div class="col-md-12 m-b-lg">
|
view/FrontMenu.php
CHANGED
|
@@ -132,7 +132,7 @@ if (SQ_Classes_Tools::isAjax() || SQ_Classes_Tools::isFrontAdmin()) {
|
|
| 132 |
<div class="row">
|
| 133 |
<div class="three columns sq_text"><?php _e('SEO Title', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 134 |
<div class="nine columns">
|
| 135 |
-
<div class="input-group sq_pattern_field">
|
| 136 |
<input type="text" autocomplete="off" id="sq_title" name="sq_title" class="form-control input-lg sq-toggle" value="<?php echo SQ_Classes_Tools::clearTitle($view->post->sq_adm->title) ?>" placeholder="<?php echo(SQ_Classes_Tools::getOption('sq_auto_pattern') ? __('Pattern: ', _SQ_PLUGIN_NAME_) . $view->post->sq_adm->patterns->title : '') ?>"/>
|
| 137 |
<input type="hidden" id="sq_title_preview" name="sq_title_preview" value="<?php echo $view->post->sq->title ?>">
|
| 138 |
<div class="sq-actions">
|
|
@@ -182,7 +182,7 @@ if (SQ_Classes_Tools::isAjax() || SQ_Classes_Tools::isFrontAdmin()) {
|
|
| 182 |
<div class="row">
|
| 183 |
<div class="three columns sq_text"><?php _e('META Description', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 184 |
<div class="nine columns">
|
| 185 |
-
<div class="input-group sq_pattern_field">
|
| 186 |
<textarea style="color: black;" class="form-control sq-toggle" name="sq_description" id="sq_description" placeholder="<?php echo(SQ_Classes_Tools::getOption('sq_auto_pattern') ? __('Pattern: ', _SQ_PLUGIN_NAME_) . $view->post->sq_adm->patterns->description : '') ?>"><?php echo SQ_Classes_Tools::clearDescription($view->post->sq_adm->description) ?></textarea>
|
| 187 |
<div class="sq-actions">
|
| 188 |
<div class="sq-action">
|
|
@@ -341,7 +341,7 @@ if (SQ_Classes_Tools::isAjax() || SQ_Classes_Tools::isFrontAdmin()) {
|
|
| 341 |
<div class="row">
|
| 342 |
<div class="three columns sq_text"><?php _e('OG Title', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 343 |
<div class="nine columns">
|
| 344 |
-
<div class="sq_pattern_field">
|
| 345 |
<input type="text" autocomplete="off" name="sq_og_title" id="sq_og_title" value="<?php echo SQ_Classes_Tools::clearTitle($view->post->sq_adm->og_title) ?>"/>
|
| 346 |
</div>
|
| 347 |
<div class="row">
|
|
@@ -354,7 +354,7 @@ if (SQ_Classes_Tools::isAjax() || SQ_Classes_Tools::isFrontAdmin()) {
|
|
| 354 |
<div class="row">
|
| 355 |
<div class="three columns sq_text"><?php _e('OG Description', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 356 |
<div class="nine columns">
|
| 357 |
-
<div class="sq_pattern_field">
|
| 358 |
<textarea style="color: black;" name="sq_og_description" id="sq_og_description"><?php echo SQ_Classes_Tools::clearDescription($view->post->sq_adm->og_description) ?></textarea>
|
| 359 |
</div>
|
| 360 |
<div class="row">
|
|
@@ -481,7 +481,7 @@ if (SQ_Classes_Tools::isAjax() || SQ_Classes_Tools::isFrontAdmin()) {
|
|
| 481 |
<div class="row">
|
| 482 |
<div class="three columns sq_text"><?php _e('Twitter Card Title', _SQ_PLUGIN_NAME_) ?></div>
|
| 483 |
<div class="nine columns">
|
| 484 |
-
<div class="sq_pattern_field">
|
| 485 |
<input type="text" autocomplete="off" name="sq_tw_title" id="sq_tw_title" value="<?php echo SQ_Classes_Tools::clearTitle($view->post->sq_adm->tw_title) ?>"/>
|
| 486 |
</div>
|
| 487 |
<div class="row">
|
|
@@ -494,7 +494,7 @@ if (SQ_Classes_Tools::isAjax() || SQ_Classes_Tools::isFrontAdmin()) {
|
|
| 494 |
<div class="row">
|
| 495 |
<div class="three columns sq_text"><?php _e('Twitter Card Description', _SQ_PLUGIN_NAME_) ?></div>
|
| 496 |
<div class="nine columns">
|
| 497 |
-
<div class="sq_pattern_field">
|
| 498 |
<textarea style="color: black;" name="sq_tw_description" id="sq_tw_description"><?php echo SQ_Classes_Tools::clearDescription($view->post->sq_adm->tw_description) ?></textarea>
|
| 499 |
</div>
|
| 500 |
<div class="row">
|
| 132 |
<div class="row">
|
| 133 |
<div class="three columns sq_text"><?php _e('SEO Title', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 134 |
<div class="nine columns">
|
| 135 |
+
<div class="input-group <?php echo (SQ_Classes_Tools::getOption('sq_auto_pattern') ? 'sq_pattern_field' : '') ?>">
|
| 136 |
<input type="text" autocomplete="off" id="sq_title" name="sq_title" class="form-control input-lg sq-toggle" value="<?php echo SQ_Classes_Tools::clearTitle($view->post->sq_adm->title) ?>" placeholder="<?php echo(SQ_Classes_Tools::getOption('sq_auto_pattern') ? __('Pattern: ', _SQ_PLUGIN_NAME_) . $view->post->sq_adm->patterns->title : '') ?>"/>
|
| 137 |
<input type="hidden" id="sq_title_preview" name="sq_title_preview" value="<?php echo $view->post->sq->title ?>">
|
| 138 |
<div class="sq-actions">
|
| 182 |
<div class="row">
|
| 183 |
<div class="three columns sq_text"><?php _e('META Description', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 184 |
<div class="nine columns">
|
| 185 |
+
<div class="input-group <?php echo (SQ_Classes_Tools::getOption('sq_auto_pattern') ? 'sq_pattern_field' : '') ?>">
|
| 186 |
<textarea style="color: black;" class="form-control sq-toggle" name="sq_description" id="sq_description" placeholder="<?php echo(SQ_Classes_Tools::getOption('sq_auto_pattern') ? __('Pattern: ', _SQ_PLUGIN_NAME_) . $view->post->sq_adm->patterns->description : '') ?>"><?php echo SQ_Classes_Tools::clearDescription($view->post->sq_adm->description) ?></textarea>
|
| 187 |
<div class="sq-actions">
|
| 188 |
<div class="sq-action">
|
| 341 |
<div class="row">
|
| 342 |
<div class="three columns sq_text"><?php _e('OG Title', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 343 |
<div class="nine columns">
|
| 344 |
+
<div class="<?php echo (SQ_Classes_Tools::getOption('sq_auto_pattern') ? 'sq_pattern_field' : '') ?>">
|
| 345 |
<input type="text" autocomplete="off" name="sq_og_title" id="sq_og_title" value="<?php echo SQ_Classes_Tools::clearTitle($view->post->sq_adm->og_title) ?>"/>
|
| 346 |
</div>
|
| 347 |
<div class="row">
|
| 354 |
<div class="row">
|
| 355 |
<div class="three columns sq_text"><?php _e('OG Description', _SQ_PLUGIN_NAME_) ?>:</div>
|
| 356 |
<div class="nine columns">
|
| 357 |
+
<div class="<?php echo (SQ_Classes_Tools::getOption('sq_auto_pattern') ? 'sq_pattern_field' : '') ?>">
|
| 358 |
<textarea style="color: black;" name="sq_og_description" id="sq_og_description"><?php echo SQ_Classes_Tools::clearDescription($view->post->sq_adm->og_description) ?></textarea>
|
| 359 |
</div>
|
| 360 |
<div class="row">
|
| 481 |
<div class="row">
|
| 482 |
<div class="three columns sq_text"><?php _e('Twitter Card Title', _SQ_PLUGIN_NAME_) ?></div>
|
| 483 |
<div class="nine columns">
|
| 484 |
+
<div class="<?php echo (SQ_Classes_Tools::getOption('sq_auto_pattern') ? 'sq_pattern_field' : '') ?>">
|
| 485 |
<input type="text" autocomplete="off" name="sq_tw_title" id="sq_tw_title" value="<?php echo SQ_Classes_Tools::clearTitle($view->post->sq_adm->tw_title) ?>"/>
|
| 486 |
</div>
|
| 487 |
<div class="row">
|
| 494 |
<div class="row">
|
| 495 |
<div class="three columns sq_text"><?php _e('Twitter Card Description', _SQ_PLUGIN_NAME_) ?></div>
|
| 496 |
<div class="nine columns">
|
| 497 |
+
<div class="<?php echo (SQ_Classes_Tools::getOption('sq_auto_pattern') ? 'sq_pattern_field' : '') ?>">
|
| 498 |
<textarea style="color: black;" name="sq_tw_description" id="sq_tw_description"><?php echo SQ_Classes_Tools::clearDescription($view->post->sq_adm->tw_description) ?></textarea>
|
| 499 |
</div>
|
| 500 |
<div class="row">
|
view/js/blockpatterns.js
CHANGED
|
@@ -13,8 +13,23 @@
|
|
| 13 |
$this.find('.show_hide.sqhome').show();
|
| 14 |
|
| 15 |
$this.find('#sq_auto_pattern.deactivated').on('click', function () {
|
|
|
|
| 16 |
$this.find('#sq_auto_pattern').removeClass('deactivated');
|
| 17 |
$this.find('input#sq_auto_pattern_on').attr('checked', true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
});
|
| 19 |
|
| 20 |
};
|
| 13 |
$this.find('.show_hide.sqhome').show();
|
| 14 |
|
| 15 |
$this.find('#sq_auto_pattern.deactivated').on('click', function () {
|
| 16 |
+
$this.find('#sq_auto_pattern.deactivated').off('click');
|
| 17 |
$this.find('#sq_auto_pattern').removeClass('deactivated');
|
| 18 |
$this.find('input#sq_auto_pattern_on').attr('checked', true);
|
| 19 |
+
$this.find('input[name=sq_auto_pattern]').trigger('change');
|
| 20 |
+
});
|
| 21 |
+
|
| 22 |
+
$('input[name=sq_auto_pattern]').on('change', function () {
|
| 23 |
+
$.post(
|
| 24 |
+
sqQuery.ajaxurl,
|
| 25 |
+
{
|
| 26 |
+
action: 'sq_savepatters_option',
|
| 27 |
+
sq_auto_pattern: $(this).val(),
|
| 28 |
+
nonce: sqQuery.nonce
|
| 29 |
+
}
|
| 30 |
+
).done(function () {
|
| 31 |
+
$.sq_showMessage().addClass('sq_success');
|
| 32 |
+
}, 'json');
|
| 33 |
});
|
| 34 |
|
| 35 |
};
|
view/js/blockpatterns.min.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
| 2 |
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
|
| 3 |
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
|
| 4 |
-
(function(a){a.fn.sq_blocksettings=function(){var b=this;a.sq_getHash()||a.sq_setHash("patterns");b.find("#sq_post_types").on("change",function(){b.find(".show_hide").hide();b.find(".show_hide.sq"+a(this).val()).show()});b.find(".show_hide.sqhome").show();b.find("#sq_auto_pattern.deactivated").on("click",function(){b.find("#sq_auto_pattern").removeClass("deactivated");b.find("input#sq_auto_pattern_on").attr("checked",!0)
|
|
|
| 1 |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
| 2 |
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
|
| 3 |
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
|
| 4 |
+
(function(a){a.fn.sq_blocksettings=function(){var b=this;a.sq_getHash()||a.sq_setHash("patterns");b.find("#sq_post_types").on("change",function(){b.find(".show_hide").hide();b.find(".show_hide.sq"+a(this).val()).show()});b.find(".show_hide.sqhome").show();b.find("#sq_auto_pattern.deactivated").on("click",function(){b.find("#sq_auto_pattern.deactivated").off("click");b.find("#sq_auto_pattern").removeClass("deactivated");b.find("input#sq_auto_pattern_on").attr("checked",!0);b.find("input[name=sq_auto_pattern]").trigger("change")});
|
| 5 |
+
a("input[name=sq_auto_pattern]").on("change",function(){a.post(sqQuery.ajaxurl,{action:"sq_savepatters_option",sq_auto_pattern:a(this).val(),nonce:sqQuery.nonce}).done(function(){a.sq_showMessage().addClass("sq_success")},"json")})};0<a("#sq_settings").length?a("#sq_settings").sq_blocksettings():a(document).ready(function(){a("#sq_settings").sq_blocksettings()})})(jQuery);
|
view/js/blocksettingsseo.js
CHANGED
|
@@ -438,7 +438,7 @@
|
|
| 438 |
$.sq_getSnippet();
|
| 439 |
}, 'json');
|
| 440 |
}
|
| 441 |
-
}
|
| 442 |
|
| 443 |
if ($('#sq_settings').length > 0) {
|
| 444 |
$('#sq_settings').sq_blocksettingsseo();
|
| 438 |
$.sq_getSnippet();
|
| 439 |
}, 'json');
|
| 440 |
}
|
| 441 |
+
};
|
| 442 |
|
| 443 |
if ($('#sq_settings').length > 0) {
|
| 444 |
$('#sq_settings').sq_blocksettingsseo();
|
view/js/frontmenu.js
CHANGED
|
@@ -953,9 +953,9 @@
|
|
| 953 |
|
| 954 |
$this.showSaved = function (time, tab) {
|
| 955 |
if (tab === 'tab4') {
|
| 956 |
-
$this.find('
|
| 957 |
} else {
|
| 958 |
-
$this.find('
|
| 959 |
}
|
| 960 |
if (typeof time !== 'undefined') {
|
| 961 |
setTimeout(function () {
|
|
@@ -965,7 +965,7 @@
|
|
| 965 |
};
|
| 966 |
|
| 967 |
$this.showError = function (time) {
|
| 968 |
-
$this.find('
|
| 969 |
if (typeof time !== 'undefined') {
|
| 970 |
setTimeout(function () {
|
| 971 |
jQuery('.sq_savenotice').hide();
|
| 953 |
|
| 954 |
$this.showSaved = function (time, tab) {
|
| 955 |
if (tab === 'tab4') {
|
| 956 |
+
$this.find('#sq_settings_body_content').prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_success">' + settings.__sq_save_message + '</span></div>');
|
| 957 |
} else {
|
| 958 |
+
$this.find('#sq_settings_body_content').prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_success">' + settings.__sq_save_message_preview + '</span></div>');
|
| 959 |
}
|
| 960 |
if (typeof time !== 'undefined') {
|
| 961 |
setTimeout(function () {
|
| 965 |
};
|
| 966 |
|
| 967 |
$this.showError = function (time) {
|
| 968 |
+
$this.find('#sq_settings_body_content').prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_warning">ERROR! Could not save the data. Please refresh</span></div>');
|
| 969 |
if (typeof time !== 'undefined') {
|
| 970 |
setTimeout(function () {
|
| 971 |
jQuery('.sq_savenotice').hide();
|
view/js/frontmenu.min.js
CHANGED
|
@@ -29,8 +29,8 @@ a.find("#sq_tab_"+$li.find("a").text().toString().toLowerCase()).show();$li.addC
|
|
| 29 |
a.escapeHtml(c.sq_canonical.val()):!1,sq_noindex:0<c.sq_noindex.length?parseInt(a.find("input[name=sq_noindex]:checked").val()):!1,sq_nofollow:0<c.sq_nofollow.length?parseInt(a.find("input[name=sq_nofollow]:checked").val()):!1,sq_nositemap:0<c.sq_nositemap.length?parseInt(a.find("input[name=sq_nositemap]:checked").val()):!1,sq_tw_title:0<c.sq_tw_title.length?a.escapeHtml(c.sq_tw_title.val()):!1,sq_tw_description:0<c.sq_tw_description.length?a.escapeHtml(c.sq_tw_description.val()):!1,sq_tw_media:0<
|
| 30 |
c.sq_tw_media.length?c.sq_tw_media.val():!1,sq_og_title:0<c.sq_og_title.length?a.escapeHtml(c.sq_og_title.val()):!1,sq_og_description:0<c.sq_og_description.length?a.escapeHtml(c.sq_og_description.val()):!1,sq_og_type:0<c.sq_og_type.length?c.sq_og_type.find("option:selected").val():"website",sq_og_author:0<c.sq_og_author.length?a.escapeHtml(c.sq_og_author.val()):!1,sq_og_media:0<c.sq_og_media.length?c.sq_og_media.val():!1,sq_url:0<c.sq_url.length?a.escapeHtml(c.sq_url.val()):!1,sq_hash:e.val(),post_id:0<
|
| 31 |
b("input[name=sq_post_id]").length?b("input[name=sq_post_id]").val():0,term_taxonomy_id:0<b("input[name=sq_term_taxonomy_id]").length?b("input[name=sq_term_taxonomy_id]").val():0,taxonomy:0<b("input[name=sq_taxonomy]").length?b("input[name=sq_taxonomy]").val():0,sq_doseo:parseInt(a.find("input[name=sq_doseo]:checked").val()),nonce:sqQuery.nonce},function(){}).done(function(e){c.saveButton.removeClass("sq_minloading");if("undefined"!==typeof e.saved){if("undefined"!==typeof e)if("undefined"!==typeof e.html){var f=
|
| 32 |
-
a.find("#sq_tabs").find("li.active a").data("tab");a.find("#sq_settings_body").replaceWith(e.html);a.sq_TopMenu({called:"ajax"});a.find("#sq_tabs").find("li a."+f).trigger("click");b("#sq_blocksnippet").trigger("sq_snippet_loaded")}else location.reload();else c.saveButton.removeClass("sq_minloading"),a.showError(2E3);a.showSaved(2E3,f)}else a.showError(2E3)}).fail(function(){c.saveButton.removeClass("sq_minloading");a.showError(2E3)})};a.showSaved=function(b,f){"tab4"===f?a.find("
|
| 33 |
-
c.__sq_save_message+"</span></div>"):a.find("
|
| 34 |
b)};a.populateInputs=function(){var e=b(document).find("head title").text();e||(e="");var f=b('meta[name="description"]').attr("content");f||(f="");0<a.find(".sq-title-value").length?(0==b("#sq_blocksnippet").length&&0<a.find(".sq-title-value").parents(".sq_disabled").length&&(a.find(".sq-title-value").text(e),a.find(".sq-title-value").attr("title",e),a.find("#sq_tab_meta").find("#sq_snippet_title").text(e)),a.find(".sq-value.sq-title-value").sq_checkMax()):0<a.find("#sq_title").length&&a.find("#sq_title").sq_checkMax();
|
| 35 |
0<a.find(".sq-description-value").length?(0==b("#sq_blocksnippet").length&&0<a.find(".sq-description-value").parents(".sq_disabled").length&&(a.find(".sq-description-value").text(f),a.find(".sq-description-value").attr("title",f),a.find("#sq_tab_meta").find("#sq_snippet_description").text(f)),a.find(".sq-value.sq-description-value").sq_checkMax()):0<a.find("#sq_description").length&&a.find("#sq_description").sq_checkMax();0<a.find("#sq_tab_facebook").find(".sq_disabled").length&&(a.find("#sq_tab_facebook").find("#sq_snippet_title").text(a.find("#sq_tab_meta").find("#sq_snippet_title").text()),
|
| 36 |
a.find("#sq_tab_facebook").find("#sq_snippet_description").text(a.find("#sq_tab_meta").find("#sq_snippet_description").text()));0<a.find("#sq_tab_twitter").find(".sq_disabled").length&&(a.find("#sq_tab_twitter").find("#sq_snippet_title").text(a.find("#sq_tab_meta").find("#sq_snippet_title").text()),a.find("#sq_tab_twitter").find("#sq_snippet_description").text(a.find("#sq_tab_meta").find("#sq_snippet_description").text()));c.sq_og_media_preview&&""!==c.sq_og_media.val()&&(c.sq_og_media_preview.attr("src",
|
| 29 |
a.escapeHtml(c.sq_canonical.val()):!1,sq_noindex:0<c.sq_noindex.length?parseInt(a.find("input[name=sq_noindex]:checked").val()):!1,sq_nofollow:0<c.sq_nofollow.length?parseInt(a.find("input[name=sq_nofollow]:checked").val()):!1,sq_nositemap:0<c.sq_nositemap.length?parseInt(a.find("input[name=sq_nositemap]:checked").val()):!1,sq_tw_title:0<c.sq_tw_title.length?a.escapeHtml(c.sq_tw_title.val()):!1,sq_tw_description:0<c.sq_tw_description.length?a.escapeHtml(c.sq_tw_description.val()):!1,sq_tw_media:0<
|
| 30 |
c.sq_tw_media.length?c.sq_tw_media.val():!1,sq_og_title:0<c.sq_og_title.length?a.escapeHtml(c.sq_og_title.val()):!1,sq_og_description:0<c.sq_og_description.length?a.escapeHtml(c.sq_og_description.val()):!1,sq_og_type:0<c.sq_og_type.length?c.sq_og_type.find("option:selected").val():"website",sq_og_author:0<c.sq_og_author.length?a.escapeHtml(c.sq_og_author.val()):!1,sq_og_media:0<c.sq_og_media.length?c.sq_og_media.val():!1,sq_url:0<c.sq_url.length?a.escapeHtml(c.sq_url.val()):!1,sq_hash:e.val(),post_id:0<
|
| 31 |
b("input[name=sq_post_id]").length?b("input[name=sq_post_id]").val():0,term_taxonomy_id:0<b("input[name=sq_term_taxonomy_id]").length?b("input[name=sq_term_taxonomy_id]").val():0,taxonomy:0<b("input[name=sq_taxonomy]").length?b("input[name=sq_taxonomy]").val():0,sq_doseo:parseInt(a.find("input[name=sq_doseo]:checked").val()),nonce:sqQuery.nonce},function(){}).done(function(e){c.saveButton.removeClass("sq_minloading");if("undefined"!==typeof e.saved){if("undefined"!==typeof e)if("undefined"!==typeof e.html){var f=
|
| 32 |
+
a.find("#sq_tabs").find("li.active a").data("tab");a.find("#sq_settings_body").replaceWith(e.html);a.sq_TopMenu({called:"ajax"});a.find("#sq_tabs").find("li a."+f).trigger("click");b("#sq_blocksnippet").trigger("sq_snippet_loaded")}else location.reload();else c.saveButton.removeClass("sq_minloading"),a.showError(2E3);a.showSaved(2E3,f)}else a.showError(2E3)}).fail(function(){c.saveButton.removeClass("sq_minloading");a.showError(2E3)})};a.showSaved=function(b,f){"tab4"===f?a.find("#sq_settings_body_content").prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_success">'+
|
| 33 |
+
c.__sq_save_message+"</span></div>"):a.find("#sq_settings_body_content").prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_success">'+c.__sq_save_message_preview+"</span></div>");"undefined"!==typeof b&&setTimeout(function(){jQuery(".sq_savenotice").hide()},b)};a.showError=function(b){a.find("#sq_settings_body_content").prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_warning">ERROR! Could not save the data. Please refresh</span></div>');"undefined"!==typeof b&&setTimeout(function(){jQuery(".sq_savenotice").hide()},
|
| 34 |
b)};a.populateInputs=function(){var e=b(document).find("head title").text();e||(e="");var f=b('meta[name="description"]').attr("content");f||(f="");0<a.find(".sq-title-value").length?(0==b("#sq_blocksnippet").length&&0<a.find(".sq-title-value").parents(".sq_disabled").length&&(a.find(".sq-title-value").text(e),a.find(".sq-title-value").attr("title",e),a.find("#sq_tab_meta").find("#sq_snippet_title").text(e)),a.find(".sq-value.sq-title-value").sq_checkMax()):0<a.find("#sq_title").length&&a.find("#sq_title").sq_checkMax();
|
| 35 |
0<a.find(".sq-description-value").length?(0==b("#sq_blocksnippet").length&&0<a.find(".sq-description-value").parents(".sq_disabled").length&&(a.find(".sq-description-value").text(f),a.find(".sq-description-value").attr("title",f),a.find("#sq_tab_meta").find("#sq_snippet_description").text(f)),a.find(".sq-value.sq-description-value").sq_checkMax()):0<a.find("#sq_description").length&&a.find("#sq_description").sq_checkMax();0<a.find("#sq_tab_facebook").find(".sq_disabled").length&&(a.find("#sq_tab_facebook").find("#sq_snippet_title").text(a.find("#sq_tab_meta").find("#sq_snippet_title").text()),
|
| 36 |
a.find("#sq_tab_facebook").find("#sq_snippet_description").text(a.find("#sq_tab_meta").find("#sq_snippet_description").text()));0<a.find("#sq_tab_twitter").find(".sq_disabled").length&&(a.find("#sq_tab_twitter").find("#sq_snippet_title").text(a.find("#sq_tab_meta").find("#sq_snippet_title").text()),a.find("#sq_tab_twitter").find("#sq_snippet_description").text(a.find("#sq_tab_meta").find("#sq_snippet_description").text()));c.sq_og_media_preview&&""!==c.sq_og_media.val()&&(c.sq_og_media_preview.attr("src",
|
