Version Description
Download this release
Release Info
Developer | Rajesh Babu |
Plugin | Platinum SEO Pack |
Version | 2.3.6 |
Comparing to | |
See all releases |
Code changes from version 2.3.5 to 2.3.6
- Changelog.txt +3 -0
- platinum-seo-pack.php +1 -1
- psp-include/generators/psp_pts_seo_metas.php +121 -8
- psp-include/settings/js/snippetpreview.js +1 -1
- psp-include/settings/psp_settings.php +16 -16
- psp-include/utilities/psp_helper.php +1 -1
- psp_main.php +6 -3
- readme.txt +6 -3
Changelog.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
= 2.3.5=
|
2 |
2021-02-27 - In focus keyword analysis, when a multiple word keyphrase is entered, the count of the phrase in content and its density was calculated wrongly. It has been corrected in this version.
|
3 |
|
1 |
+
= 2.3.6=
|
2 |
+
2021-03-10 - Removed the meta tag added by the newly introduced robots api in wordPress 5.7. Added the ability to specify currentyear to title and description formats. You can also directly add the tag variables in the title field and the meta description field. While the title description formats allow you to add the tag variables only towards the beginning or end, you can now add the tag variables anywhere in between the meta title or description text. You can add the tag variable manually to these Platinum SEO meta fields in Post types.
|
3 |
+
|
4 |
= 2.3.5=
|
5 |
2021-02-27 - In focus keyword analysis, when a multiple word keyphrase is entered, the count of the phrase in content and its density was calculated wrongly. It has been corrected in this version.
|
6 |
|
platinum-seo-pack.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Platinum SEO Pack
|
5 |
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
6 |
Description: Complete SEO and Social optimization solution for your Wordpress blog/site. It is Simple, Uncomplicated and User friendly with several useful features.
|
7 |
-
Version: 2.3.
|
8 |
Author: Techblissonline.com (Rajesh)
|
9 |
Author URI: https://techblissonline.com/
|
10 |
Text Domain: platinum-seo-pack
|
4 |
Plugin Name: Platinum SEO Pack
|
5 |
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
6 |
Description: Complete SEO and Social optimization solution for your Wordpress blog/site. It is Simple, Uncomplicated and User friendly with several useful features.
|
7 |
+
Version: 2.3.6
|
8 |
Author: Techblissonline.com (Rajesh)
|
9 |
Author URI: https://techblissonline.com/
|
10 |
Text Domain: platinum-seo-pack
|
psp-include/generators/psp_pts_seo_metas.php
CHANGED
@@ -944,6 +944,24 @@ class PspPtsSeoMetas {
|
|
944 |
//$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
945 |
}
|
946 |
$title = stripcslashes(trim($title));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
//if (!$psp_notitleformat) {
|
948 |
|
949 |
$authordata = get_userdata($post->post_author);
|
@@ -996,24 +1014,24 @@ class PspPtsSeoMetas {
|
|
996 |
|
997 |
//$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? htmlentities($this->psp_sitewide_settings['separator']) : '';
|
998 |
|
999 |
-
|
1000 |
global $pagenow;
|
1001 |
if (is_admin()) $screen = get_current_screen();
|
1002 |
if (( $pagenow == 'post.php' ) && ($screen->parent_base == 'edit')) {
|
1003 |
//if (isset($_GET['post']) && (isset($_GET['action']) && $_GET['action'] == 'edit')) {
|
1004 |
-
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
1005 |
-
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
1006 |
} else {
|
1007 |
if($post->post_status=="publish"){
|
1008 |
|
1009 |
-
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%seo_title%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
1010 |
-
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
1011 |
} else {
|
1012 |
|
1013 |
//$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
1014 |
//$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
1015 |
-
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%seo_title%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
1016 |
-
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
1017 |
}
|
1018 |
|
1019 |
}
|
@@ -1028,6 +1046,8 @@ class PspPtsSeoMetas {
|
|
1028 |
$this->post_type_title = $title;
|
1029 |
|
1030 |
if ($psparr) {
|
|
|
|
|
1031 |
|
1032 |
$sitedescription = !empty($sitedescription) ? $sitedescription : '';
|
1033 |
$autogendesc = !empty($this->psp_sitewide_settings['autogenerate_description']) ? $this->psp_sitewide_settings['autogenerate_description'] : '';
|
@@ -1037,7 +1057,9 @@ class PspPtsSeoMetas {
|
|
1037 |
$original_wp_title = !empty($original_wp_title) ? $original_wp_title : '';
|
1038 |
$psp_title_separator = !empty($psp_title_separator) ? $psp_title_separator : '';
|
1039 |
|
1040 |
-
$psp_post_format_arr = array('autogendesc' => $autogendesc, 'site_name' => $sitename, 'site_description' => $sitedescription, 'category' => $categoryname, 'title' => $title, 'seo_title' => $title, 'wp_title' => $original_wp_title, 'sep' => $psp_title_separator);
|
|
|
|
|
1041 |
|
1042 |
return $psp_post_format_arr;
|
1043 |
|
@@ -1049,6 +1071,97 @@ class PspPtsSeoMetas {
|
|
1049 |
|
1050 |
} // end get_pt_psp_title
|
1051 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1052 |
public function get_preferred_taxonomy_for_bc() {
|
1053 |
return $this->preferred_taxonomy_for_bc;
|
1054 |
} //get_preferred_taxonomy_for_bc
|
944 |
//$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
945 |
}
|
946 |
$title = stripcslashes(trim($title));
|
947 |
+
$woo_variables_array = $this->get_woo_variables();
|
948 |
+
|
949 |
+
$woo_search_format = array();
|
950 |
+
$woo_replace_format = array();
|
951 |
+
|
952 |
+
if (!empty($woo_variables_array) ) {
|
953 |
+
$woo_search_format = $woo_variables_array[0];
|
954 |
+
$woo_replace_format = $woo_variables_array[1];
|
955 |
+
$woo_search_replace_format = $woo_variables_array[2];
|
956 |
+
$title = str_replace($search_format, $replaced_format, $title);
|
957 |
+
}
|
958 |
+
|
959 |
+
$title = str_replace('%currentyear%', date('Y'), $title);
|
960 |
+
$currentyear = date('Y');
|
961 |
+
//$title = str_replace('%currentdate%', date_i18n(get_option('date_format')),, $title);
|
962 |
+
$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? $this->psp_sitewide_settings['separator'] : '';
|
963 |
+
$title = str_replace('%sep%', $psp_title_separator, $title);
|
964 |
+
|
965 |
//if (!$psp_notitleformat) {
|
966 |
|
967 |
$authordata = get_userdata($post->post_author);
|
1014 |
|
1015 |
//$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? htmlentities($this->psp_sitewide_settings['separator']) : '';
|
1016 |
|
1017 |
+
//$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? $this->psp_sitewide_settings['separator'] : '';
|
1018 |
global $pagenow;
|
1019 |
if (is_admin()) $screen = get_current_screen();
|
1020 |
if (( $pagenow == 'post.php' ) && ($screen->parent_base == 'edit')) {
|
1021 |
//if (isset($_GET['post']) && (isset($_GET['action']) && $_GET['action'] == 'edit')) {
|
1022 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%', '%seo_title%', '%currentyear%');
|
1023 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator, $title, $currentyear);
|
1024 |
} else {
|
1025 |
if($post->post_status=="publish"){
|
1026 |
|
1027 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%seo_title%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%', '%currentyear%');
|
1028 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator, $currentyear);
|
1029 |
} else {
|
1030 |
|
1031 |
//$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
1032 |
//$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
1033 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%seo_title%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%', '%currentyear%');
|
1034 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator, $currentyear);
|
1035 |
}
|
1036 |
|
1037 |
}
|
1046 |
$this->post_type_title = $title;
|
1047 |
|
1048 |
if ($psparr) {
|
1049 |
+
|
1050 |
+
//$title = str_replace('%currentyear%', date('Y'), $title);
|
1051 |
|
1052 |
$sitedescription = !empty($sitedescription) ? $sitedescription : '';
|
1053 |
$autogendesc = !empty($this->psp_sitewide_settings['autogenerate_description']) ? $this->psp_sitewide_settings['autogenerate_description'] : '';
|
1057 |
$original_wp_title = !empty($original_wp_title) ? $original_wp_title : '';
|
1058 |
$psp_title_separator = !empty($psp_title_separator) ? $psp_title_separator : '';
|
1059 |
|
1060 |
+
$psp_post_format_arr = array('autogendesc' => $autogendesc, 'site_name' => $sitename, 'site_description' => $sitedescription, 'category' => $categoryname, 'title' => $title, 'seo_title' => $title, 'wp_title' => $original_wp_title, 'sep' => $psp_title_separator, 'currentyear' => $currentyear);
|
1061 |
+
|
1062 |
+
$psp_post_format_arr = !empty($woo_search_replace_format) ? wp_parse_args( $woo_search_replace_format, $psp_post_format_arr) : $psp_post_format_arr;
|
1063 |
|
1064 |
return $psp_post_format_arr;
|
1065 |
|
1071 |
|
1072 |
} // end get_pt_psp_title
|
1073 |
|
1074 |
+
private function get_woo_variables() {
|
1075 |
+
|
1076 |
+
//WooCommerce
|
1077 |
+
$woo_single_cat_html = '';
|
1078 |
+
$woo_single_tag_html = '';
|
1079 |
+
$woo_single_price = '';
|
1080 |
+
$woo_single_price_exc_tax = '';
|
1081 |
+
$woo_single_sku = '';
|
1082 |
+
|
1083 |
+
include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
1084 |
+
if (is_plugin_active('woocommerce/woocommerce.php')) {
|
1085 |
+
if (is_singular(['product'])) {
|
1086 |
+
//Woo Cat product
|
1087 |
+
$woo_single_cats = get_the_terms($post->ID, 'product_cat');
|
1088 |
+
|
1089 |
+
if ($woo_single_cats && ! is_wp_error($woo_single_cats)) {
|
1090 |
+
$woo_single_cat = [];
|
1091 |
+
|
1092 |
+
foreach ($woo_single_cats as $term) {
|
1093 |
+
$woo_single_cat[$term->term_id] = $term->name;
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
$woo_single_cat = apply_filters('seopress_titles_product_cat', $woo_single_cat);
|
1097 |
+
|
1098 |
+
$woo_single_cat_html = stripslashes_deep(wp_filter_nohtml_kses(join(', ', $woo_single_cat)));
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
//Woo Tag product
|
1102 |
+
$woo_single_tags = get_the_terms($post->ID, 'product_tag');
|
1103 |
+
|
1104 |
+
if ($woo_single_tags && ! is_wp_error($woo_single_tags)) {
|
1105 |
+
$woo_single_tag = [];
|
1106 |
+
|
1107 |
+
foreach ($woo_single_tags as $term) {
|
1108 |
+
$woo_single_tag[$term->term_id] = $term->name;
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
$woo_single_tag = apply_filters('seopress_titles_product_tag', $woo_single_tag);
|
1112 |
+
|
1113 |
+
$woo_single_tag_html = stripslashes_deep(wp_filter_nohtml_kses(join(', ', $woo_single_tag)));
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
//Woo Price
|
1117 |
+
$product = wc_get_product($post->ID);
|
1118 |
+
$woo_single_price = wc_get_price_including_tax($product);
|
1119 |
+
|
1120 |
+
//Woo Price tax excluded
|
1121 |
+
$product = wc_get_product($post->ID);
|
1122 |
+
$woo_single_price_exc_tax = wc_get_price_excluding_tax($product);
|
1123 |
+
|
1124 |
+
//Woo SKU Number
|
1125 |
+
$product = wc_get_product($post->ID);
|
1126 |
+
$woo_single_sku = $product->get_sku();
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
$woo_variables_arr = [
|
1130 |
+
'%woo_single_cat%',
|
1131 |
+
'%woo_single_tag%',
|
1132 |
+
'%woo_single_price%',
|
1133 |
+
'%woo_single_price_exc_tax%',
|
1134 |
+
'%woo_sku%'
|
1135 |
+
];
|
1136 |
+
|
1137 |
+
$psp_titles_template_var_array = apply_filters('psp_titles_template_variables_array', $woo_variables_arr);
|
1138 |
+
|
1139 |
+
$psp_titles_template_var_replace_array = [
|
1140 |
+
$woo_single_cat_html,
|
1141 |
+
$woo_single_tag_html,
|
1142 |
+
$woo_single_price,
|
1143 |
+
$woo_single_price_exc_tax,
|
1144 |
+
$woo_single_sku
|
1145 |
+
];
|
1146 |
+
|
1147 |
+
$psp_titles_template_var_replace_array = apply_filters('psp_titles_template_var_replace_array', $psp_titles_template_var_replace_array);
|
1148 |
+
|
1149 |
+
$psp_titles_template_var_search_replace_arr = [
|
1150 |
+
'woo_single_cat' => $woo_single_cat_html,
|
1151 |
+
'woo_single_tag' => $woo_single_tag_html,
|
1152 |
+
'woo_single_price' => $woo_single_price,
|
1153 |
+
'woo_single_price_exc_tax' => $woo_single_price_exc_tax,
|
1154 |
+
'woo_sku' => $woo_single_sku,
|
1155 |
+
];
|
1156 |
+
|
1157 |
+
return array($psp_titles_template_var_array, $psp_titles_template_var_replace_array, $psp_titles_template_var_search_replace_arr);
|
1158 |
+
|
1159 |
+
} else {
|
1160 |
+
return array();
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
}
|
1164 |
+
|
1165 |
public function get_preferred_taxonomy_for_bc() {
|
1166 |
return $this->preferred_taxonomy_for_bc;
|
1167 |
} //get_preferred_taxonomy_for_bc
|
psp-include/settings/js/snippetpreview.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function wordCount(e){var t=e.match(/\S+/g);return t?t.length:0}function isPspGutenbergActive(){return document.body.classList.contains("block-editor-page")}function arraysEqual(e,t){if(void 0===e||void 0===t)return!1;if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!=t.length)return!1;e=e.sort(),t=t.sort();for(var s=0;s<e.length;++s)if(e[s]!==t[s])return!1;return!0}function pspContainsPT(e){if(jQuery("#psp_seo_meta\\[preferred_term\\]").val()>0){var t=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text();return!(e&&jQuery.inArray(t,e)>-1)&&(alert("Make sure that you change the preferred term before saving as you have deselected "+t),jQuery("#psp_seo_meta\\[preferred_term\\]").val(""),!0)}}function pspSelectedTerms(e,t){var s=[],r=jQuery("#psp_terms_json_str").val();r=r.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/""/g,'"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f");var i,a=JSON.parse(r);return jQuery.each(a,function(r,a){r===t&&(i=0,jQuery.each(a,function(t,r){jQuery.inArray(parseInt(r.id),e)>-1&&(s[i]=r.name.trim(),i++)}))}),s.sort(),s}function pspSelectedTermsClassic(e){var t=[];return jQuery('input[name="'+e+'"]:checked').each(function(){t.push(jQuery(this).parent("label").text().trim().replace(/\"/g,""))}),t.sort(),t}function isTermSelected(){var e=jQuery("#psp_seo_meta\\[preferred_tax\\]"),t=jQuery("#psp_seo_meta\\[preferred_term\\]"),s=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text(),r=jQuery("#psp_seo_meta\\[preferred_term\\]").val();if(r){var i,a="categories",n="post_category[]",l="category",o=t.attr("oldValue"),p=!1;isPspGutenbergActive()&&(p=!0),e&&e.val()&&"category"!==(l=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text())&&(a=l,n="tax_input["+l+"][]"),p&&wp.data&&wp.data.select?(taxarray=wp.data.select("core/editor").getEditedPostAttribute(a),i=pspSelectedTerms(taxarray,l)):i=pspSelectedTermsClassic(n),r&&(i.length>0?jQuery.inArray(s.trim(),i)>-1||""===r||(alert("Select this Term "+s+" if you want to set it as preferred term"),t.val(o)):(alert("Select this Term "+s+" if you want to set it as preferred term"),t.val("")))}}function pspPopulateTerms(){preferredTaxElem=jQuery("#psp_seo_meta\\[preferred_tax\\]"),preferredTermElem=jQuery("#psp_seo_meta\\[preferred_term\\]");var e=preferredTaxElem.val();jQuery("#psp_seo_meta\\[preferred_term\\]").html("");var t=jQuery("#psp_terms_json_str").val();t=t.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/""/g,'"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f");var s=JSON.parse(t);preferredTermElem.append('<option value="">Select a Term</option>'),jQuery.each(s,function(t,s){t===e&&jQuery.each(s,function(e,t){preferredTermElem.append('<option value="'+t.id+'">'+t.name+"</option>")})})}function boldWords(e){var t=e,s=jQuery("#psp_seo_meta\\[keywords\\]").val().match(/\S+/g);if(s)for(i=0;i<s.length;i++)t=(t=t.replace(new RegExp("(^|[\\W])("+escapeRegExp(s[i])+")([\\W]|$)","gi"),"$1<b>$2</b>$3")).replace(new RegExp("(^|[\\W])("+escapeRegExp(s[i])+")([\\W]|$)","gi"),"$1<b>$2</b>$3");return t}function boldText(e){var t=e,s=jQuery("#psp_seo_meta\\[keywords\\]").val().match(/\S+/g);if(s)for(i=0;i<s.length;i++)t=t.replace(new RegExp("("+escapeRegExp(s[i])+")","gi"),"<b>$1</b>");return t}function htmlEncode(e){return jQuery("<div/>").text(e).html()}function setGtbUrlPreview(e){var t="";(t=e)&&(t=t.replace(/^https?\:\/\//i,""));var s=htmlEncode(t),r=(s=s.replace(/\/$/,"")).length;jQuery("#permalinkSizer").html(s);var i=s=s.replace(/([^https?:\/\/])(\/)/g,"$1 > ");t=s,jQuery("#urlSizer").html(s),jQuery("#murlSizer").html(i);var a=new RegExp("W(.*)$");for(trimmed=!1;jQuery("#urlSizer").width()>566;){var n=s;n=(n=(n=(n=n.substring(0,n.length-1)).trim()).replace(/\>$/,"")).trim(),jQuery("#urlSizer").html(n),s=n,trimmed=!0}trimmed&&(s+=" ...",jQuery("#urlSizer").html(s)),info=r+" characters, ",jQuery("#urlInfo").html(s.length+" characters, "+jQuery("#urlSizer").width()+" pixels"),jQuery("#urlSizer").width()<=584?jQuery("#urlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"):jQuery("#urlInfo").html(info+'<span style="color:red;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetUrl").html(s),mtrimmed=!1;for(var l=i;i.length>42;)i=jQuery.trim(i.replace(" ...","")),(l=(l=(l=jQuery.trim(l.replace(a,""))).trim()).replace(/\>$/,"")).length>=42&&(l=(l=jQuery.trim(i.replace(" ...",""))).substring(0,l.length-1)),l=l.trim(),i=l+=" ...",mtrimmed=!0;mtrimmed&&jQuery("#murlSizer").html(i),info=i.length+" characters, ",jQuery("#murlInfo").html(i.length+" characters, "+jQuery("#murlSizer").width()+" pixels"),jQuery("#murlSizer").width()<=282?jQuery("#murlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+" pixels</span>"):jQuery("#murlInfo").html(info+'<span style="color:red;">'+jQuery("#murlSizer").width()+" pixels</span>"),jQuery("#techblissonlineMSnippetUrl").html(i)}function setUrlPreview(){var e=jQuery.trim(jQuery("#pspHomePermalink").text())+"slug-name/";if(isPspGutenbergActive()&&!0,jQuery("#editable-post-name").length){e=jQuery.trim(jQuery("#sample-permalink").text());var t=jQuery.trim(jQuery("#editable-post-name").text());e=(e=e.replace(t,"")).replace(/\/$/g,"")}else jQuery("#name").length?e=jQuery.trim(jQuery("#pspPostPermalink").text()):jQuery("#slug").length&&(e=jQuery.trim(jQuery("#pspPostPermalink").text()));if(jQuery("#new-post-slug").length>0)e+=jQuery("#new-post-slug").val();else if(jQuery("#editable-post-name-full").length){e+=jQuery("#editable-post-name-full").text()}e&&(e=e.replace(/^https?\:\/\//i,""));var s=htmlEncode(e),r=s.length;r=(s=s.replace(/\/$/,"")).length;jQuery("#permalinkSizer").html(s);var i=s=s.replace(/([^https?:\/\/])(\/)/g,"$1 > ");e=s,jQuery("#urlSizer").html(s),jQuery("#murlSizer").html(i);var a=new RegExp("W(.*)$");for(trimmed=!1;jQuery("#urlSizer").width()>584;){var n=s;n=(n=(n=(n=n.substring(0,n.length-1)).trim()).replace(/\>$/,"")).trim(),jQuery("#urlSizer").html(n),s=n,trimmed=!0}trimmed&&(s+=" ..."),info=r+" characters, ",jQuery("#urlInfo").html(r+" characters, "+jQuery("#urlSizer").width()+" pixels"),jQuery("#urlSizer").width()<=584?jQuery("#urlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"):jQuery("#urlInfo").html(info+'<span style="color:red;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetUrl").html(s),mtrimmed=!1;for(var l=i;l.length>42;)i=jQuery.trim(i.replace(" ...","")),(l=(l=(l=jQuery.trim(l.replace(a,""))).trim()).replace(/\>$/,"")).length>=42&&(l=(l=jQuery.trim(i.replace(" ...",""))).substring(0,l.length-1)),l=l.trim(),i=l+=" ...",mtrimmed=!0;mtrimmed&&jQuery("#murlSizer").html(i),info=i.length+" characters, ",jQuery("#murlInfo").html(i.length+" characters, "+jQuery("#murlSizer").width()+" pixels"),jQuery("#murlSizer").width()<=282?jQuery("#murlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+" pixels</span>"):jQuery("#murlInfo").html(info+'<span style="color:red;">'+jQuery("#murlSizer").width()+" pixels</span>"),jQuery("#techblissonlineMSnippetUrl").html(i)}function stripTrailingSlash(e){return"/"==e.substr(-1)?e.substr(0,e.length-1):e}function setGtbTitlePreview(e,t){var s=jQuery("#psp_seo_meta\\[titleformat\\]").val(),r=!1,i=!1;jQuery("#psp_seo_meta\\[disable_title_format\\]:checked").length>0&&(r=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(i=!0),r&&(s="%seo_title%"),i&&(s="%wp_title%");var a=jQuery("#pspPostTypeArrayFormat").text(),n=JSON.parse(a),l=jQuery("#psp_seo_meta\\[title\\]"),o=s.replace("%seo_title%",e);if(""===e&&(o=o.replace("%seo_title%",l.attr("placeholder"))),o=(o=(o=(o=(o=(o=o.replace("%wp_title%",n.wp_title)).replace("%site_name%",n.site_name)).replace("%site_description%",n.site_description)).replace("%category%",t)).replace("%taxonomy%",t)).replace(/%sep%/g,n.sep),""!==(o=(o=jQuery.trim(o)).trim(n.sep))){var p=htmlEncode(o),c=p;jQuery("#titleSizer").html(p),jQuery("#actualTitleSizer").html(p);var u=new RegExp("sw+(.*)$");trimmed=!1;for(var d=p;jQuery("#titleSizer").width()>584;)p=jQuery.trim(p.replace(" ...","")),(d=jQuery.trim(d.replace(u,""))).length>=p.length&&(d=d.substring(0,d.length-1)),p=d+" ...",jQuery("#titleSizer").html(p),trimmed=!0;trimmed,jQuery("#titleSizer").html(p),mtrimmed=!1;for(var h=c;h.length>78;)c=jQuery.trim(c.replace(" ...","")),(h=jQuery.trim(h.replace(u,""))).length>=78&&(h=(h=jQuery.trim(h.replace(" ...",""))).substring(0,h.length-1)),c=h+=" ...",mtrimmed=!0;mtrimmed,jQuery("#mtitleSizer").html(c),info=jQuery("<textarea />").html(p).text().length+" characters, "+wordCount(p)+" words ",jQuery("#titleInfo").html(p.length+" characters, "+jQuery("#titleSizer").width()+" pixels, "+wordCount(p)+" words"),jQuery("#titleSizer").width()<=584?jQuery("#titleInfo").html(info+'<span style="color:green;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"):jQuery("#titleInfo").html(info+'<span style="color:red;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"),minfo=jQuery("<textarea />").html(c).text().length+" characters/ 78 characters "+wordCount(c)+" words ",jQuery("#mtitleInfo").html(c.length+" characters, "+jQuery("#mtitleSizer").width()+" pixels, "+wordCount(c)+" words"),c.length<=78?jQuery("#mtitleInfo").html('<span style="color:green;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"):jQuery("#mtitleInfo").html('<span style="color:red;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"),jQuery("#techblissonlineSnippetTitle").html(p),jQuery("#techblissonlineMSnippetTitle").html(c),setPSPSeoAnalysis()}}function setTitlePreview(){var e,t,s="",r="",i="",a=!1,n="",l=[];isPspGutenbergActive()&&(a=!0);var o=jQuery("#pspPostTypeArrayFormat").text(),p=JSON.parse(o),c=jQuery("#psp_seo_meta\\[titleformat\\]").val(),u=!1,d=!1,h=!1;jQuery("#psp_seo_meta\\[disable_title_format\\]:checked").length>0&&(u=!0),jQuery("#psp_seo_meta\\[disable_title\\]:checked").length>0&&(d=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(h=!0);n=p.category,c.toLowerCase().indexOf("%wp_title%");var m=jQuery("#title"),y=jQuery("#psp_seo_meta\\[title\\]");r=y.attr("placeholder");var g=jQuery("#psp_seo_meta\\[preferred_tax\\]"),j=jQuery("#psp_seo_meta\\[preferred_term\\]"),Q="categories",f="post_category[]",v="category";if(g&&g.val()&&"category"!==(v=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text())&&(Q=v,f="tax_input["+v+"][]"),!a&&m&&(pspContainsPT(l=pspSelectedTermsClassic(f)),n=j&&j.val()?jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():l&&l.length>0?l[0]:"%"+v+"%"),!y.val()||d||h?(jQuery("#title").val()?r=jQuery.trim(jQuery("#title").val()):jQuery("#name").val()?r=jQuery.trim(jQuery("#name").val()):a&&wp.data&&wp.data.select&&(n=p.category,j&&j.val()&&(n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text()),""===(r=wp.data.select("core/editor").getEditedPostAttribute("title"))&&(r=y.attr("placeholder")),n||(n="%"+v+"%"),void 0===(t=wp.data.select("core/editor").getEditedPostAttribute(Q))&&(n="%"+v+"%"),void 0!==t&&0===t.length&&(n="%"+v+"%",pspContainsPT(t)),void 0!==t&&t.length>0&&(pspContainsPT(l=pspSelectedTerms(t,v)),j&&j.val()?n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():l.length>0&&(n=l[0]))),s=r,(u||h)&&(c="%wp_title%"),s=(s=(s=(s=(s=(s=(s=c.replace("%seo_title%",r)).replace("%wp_title%",r)).replace("%site_name%",p.site_name)).replace("%site_description%",p.site_description)).replace("%taxonomy%",n)).replace("%category%",n)).replace(/%sep%/g,p.sep),s=(s=jQuery.trim(s)).trim(p.sep)):(s=y.val(),i=y.val(),jQuery("#title").val()?r=jQuery.trim(jQuery("#title").val()):jQuery("#name").val()?r=jQuery.trim(jQuery("#name").val()):a&&wp.data&&wp.data.select&&(n=p.category,j&&j.val()&&(n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text()),r=wp.data.select("core/editor").getEditedPostAttribute("title"),n||(n="%"+v+"%"),void 0===(e=wp.data.select("core/editor").getEditedPostAttribute(Q))&&(n="%"+v+"%"),void 0!==e&&0===e.length&&(n="%"+v+"%",pspContainsPT(l)),void 0!==e&&e.length>0&&(pspContainsPT(l=pspSelectedTerms(e,v)),j&&j.val()?n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():l.length>0&&(n=l[0]))),u&&(c="%seo_title%"),s=(s=(s=(s=(s=(s=(s=c.replace("%seo_title%",i)).replace("%wp_title%",r)).replace("%site_name%",p.site_name)).replace("%site_description%",p.site_description)).replace("%taxonomy%",n)).replace("%category%",n)).replace(/%sep%/g,p.sep),s=(s=jQuery.trim(s)).trim(p.sep)),""!==s){""===r||a||r;var _=htmlEncode(s),w=_;jQuery("#titleSizer").html(_),jQuery("#actualTitleSizer").html(_);var S=new RegExp("sw+(.*)$"),x=_;for(trimmed=!1;jQuery("#titleSizer").width()>584;)_=jQuery.trim(_.replace(" ...","")),(x=jQuery.trim(x.replace(S,""))).length>=_.length&&(x=x.substring(0,x.length-1)),_=x+" ...",jQuery("#titleSizer").text(_),trimmed=!0;trimmed,jQuery("#titleSizer").text(_),jQuery("body").append(jQuery("#titleSizer")).width(),jQuery("body#titleSizer").remove(),info=jQuery("<textarea />").html(_).text().length+" characters, "+wordCount(_)+" words ",jQuery("#titleInfo").html(_.length+" characters, "+jQuery("#titleSizer").width()+" pixels, "+wordCount(_)+" words"),jQuery("#titleSizer").width()<=584?jQuery("#titleInfo").html(info+'<span style="color:green;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"):jQuery("#titleInfo").html(info+'<span style="color:red;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetTitle").html(_);var b=w;for(mtrimmed=!1;b.length>78;)w=jQuery.trim(w.replace(" ...","")),(b=jQuery.trim(b.replace(S,""))).length>=78&&(b=(b=jQuery.trim(b.replace(" ...",""))).substring(0,b.length-1)),w=b+=" ...",mtrimmed=!0;mtrimmed,jQuery("#mtitleSizer").text(w),jQuery("body").append(jQuery("#mtitleSizer")).width(),jQuery("body#mtitleSizer").remove(),minfo=jQuery("<textarea />").html(w).text().length+" characters/ 78 characters "+wordCount(w)+" words ",jQuery("#mtitleInfo").html(w.length+" characters, "+jQuery("#mtitleSizer").width()+" pixels, "+wordCount(w)+" words"),w.length<=78?jQuery("#mtitleInfo").html('<span style="color:green;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"):jQuery("#mtitleInfo").html('<span style="color:red;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"),jQuery("#techblissonlineMSnippetTitle").html(w),setPSPSeoAnalysis()}}function setDescriptionPreview(){var e,t=!1,s=jQuery("#psp_seo_meta\\[description\\]");isPspGutenbergActive()&&(t=!0);var r=jQuery.trim(jQuery("#psp_seo_meta\\[maxsnippet\\]").val()),i=r;parseInt(r)<0&&(r=230,i=285),jQuery.inArray(parseInt(r),[-1,0,1,2,3,4])>-1&&(r=230,i=285),""===r&&(r=230,i=285),r=parseInt(r),i=parseInt(i);var a="",n=!1,l=!1,o=jQuery("#pspPostTypeArrayFormat").text();if(e=JSON.parse(o).autogendesc,jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(n=!0),jQuery("#psp_seo_meta\\[disable_description\\]:checked").length>0&&(l=!0),""!==a||n||l||(a=jQuery.trim(jQuery("#psp_seo_meta\\[description\\]").val())),""===a){if(""===a&&t&&wp.data&&wp.data.select){var p=wp.data.select("core/editor").getEditedPostContent();return""!==e&&(a=(a=p.replace(/(<([^>]+)>)/gi,"")).substring(0,i)),a||(a=s.attr("placeholder")),void setGTBDescPreview(a)}var c=jQuery.trim(jQuery("#content").val());if(!s.val()||n||l)return""!==e&&(a=(a=c.replace(/(<([^>]+)>)/gi,"")).substring(0,i)),a||(a=s.attr("placeholder")),void setGTBDescPreview(a)}return a?void setGTBDescPreview(a):void 0}function setGTBDescPreview(e){jQuery("#psp_seo_meta\\[description\\]");var t=e;placeholder_desc=e;var s=jQuery.trim(jQuery("#psp_seo_meta\\[maxsnippet\\]").val()),r=s;parseInt(s)<0&&(s=230,r=285),jQuery.inArray(parseInt(s),[-1,0,1,2,3,4])>-1&&(s=230,r=285),""===s&&(s=230,r=285),s=parseInt(s),r=parseInt(r);var i=htmlEncode(t),a=i+=" ...";jQuery("#descriptionSizer").html(i),jQuery("#mdescriptionSizer").html(a);for(var n=new RegExp("sw+(.*)$"),l=i;l.length>s;)i=jQuery.trim(i.replace(" ...","")),l=jQuery.trim(l.replace(n,"")),t=jQuery.trim(t.replace(n,"")),l.length>=s&&(l=(l=jQuery.trim(l.replace(" ...",""))).substring(0,l.length-1),t=t.substring(0,t.length-1)),l+=" ...";i=l,jQuery("#descriptionSizer").html(i);for(var o=a;o.length>r;)a=jQuery.trim(a.replace(" ...","")),(o=jQuery.trim(o.replace(n,""))).length>=r&&(o=(o=jQuery.trim(o.replace(" ...",""))).substring(0,o.length-1)),o+=" ...";a=o,jQuery("#descriptionSizer").html(a),jQuery("body").append(jQuery("#descriptionSizer")).width(),jQuery("body").append(jQuery("#mdescriptionSizer")).width(),jQuery("body").remove("#descriptionSizer"),jQuery("body").remove("#mdescriptionSizer"),jQuery("#descriptionInfo").html(i.length+" characters, "+jQuery("#descriptionSizer").width()+" pixels, "+wordCount(i)+" words"),info=jQuery("#descriptionSizer").width()+" pixels, "+wordCount(i)+" words ",jQuery("#mdescriptionInfo").html(a.length+" characters, "+jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(a)+" words"),minfo=jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(a)+" words ",i.length<=146?jQuery("#descriptionInfo").html(info+'<span style="color:green;">'+i.length+"/~170 characters"):i.length<=160?jQuery("#descriptionInfo").html(info+'<span style="color:orange;">'+i.length+"/~170 characters</span>"):i.length<=166?jQuery("#descriptionInfo").html(info+'<span style="color:purple;">'+i.length+"/~170 characters</span>"):jQuery("#descriptionInfo").html(info+'<span style="color:red;">'+i.length+"/~170 characters</span>"),a.length<=146?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:green;">'+a.length+"/~170 characters"):a.length<=160?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:orange;">'+a.length+"/~170 characters</span>"):a.length<=166?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:purple;">'+a.length+"/~170 characters</span>"):jQuery("#mdescriptionInfo").html(minfo+'<span style="color:red;">'+a.length+"/~170 characters</span>"),jQuery("#techblissonlineSnippetDescription").html(i),jQuery("#techblissonlineMSnippetDescription").html(a)}function pspSubscribe(){var e=!1;if(isPspGutenbergActive()&&(e=!0),e){var t,s=jQuery("#psp_seo_meta\\[title\\]"),r=jQuery("#psp_seo_meta\\[preferred_tax\\]"),i=jQuery("#psp_seo_meta\\[preferred_term\\]"),a=!1,n=!1,l="",o="",p=[],c=[],u="category",d="categories",h=!0,m=!0,y=jQuery.trim(jQuery("#pspHomePermalink").text())+"slug-name/",g="",j=!1,Q="",f=[];wp.data.subscribe(function(){if(l=s.val(),g=wp.data.select("core/editor").getPermalink(),permalink_change=!0,y===g&&(permalink_change=!1),y=g,g&&permalink_change)setGtbUrlPreview(g);else if(jQuery("#psp_seo_meta\\[disable_title\\]:checked").length>0&&(a=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(n=!0),r&&r.val()?(u=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text(),d="category"!==u?u:"categories"):d="categories",c=wp.data.select("core/editor").getEditedPostAttribute(d),arraysEqual(p,c)&&(h=!1),!l||a||n||h){if(!l||a||n){if(o=wp.data.select("core/editor").getEditedPostAttribute("title"),t===o&&(m=!1),!m&&!h)return m=!0,void(h=!0);t=o,m=!0}h=!0,p=c,Q="%"+u+"%",j||void 0===c||0!==c.length||(j=pspContainsPT(c)),void 0!==c&&c.length>0&&(f=pspSelectedTerms(c,u),j=pspContainsPT(f),i&&i.val()?Q=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():f.length>0&&(Q=f[0])),(!l||a||n)&&(void 0===o&&(s=jQuery("#psp_seo_meta\\[title\\]"),o=s.attr("placeholder")),""===o&&(s=jQuery("#psp_seo_meta\\[title\\]"),o=s.attr("placeholder")),o&&Q&&setGtbTitlePreview(o,Q)),!l||a||n||Q&&setGtbTitlePreview(l,Q)}else h=!0})}}function updateDateText(){var e=htmlEncode(jQuery.trim(jQuery("#DateText").val()));e.length>0?jQuery("#resultDateText").html(e+" - "):jQuery("#resultDateText").html("")}function setPSPSeoAnalysis(){var e,t=!1,s="",r="";isPspGutenbergActive()&&(t=!0),t&&wp.data&&wp.data.select?(""==(r=wp.data.select("core/editor").getEditedPostContent())&&(r=wp.data.select("core/editor").getEditedPostAttribute("content")),s=wp.data.select("core/editor").getEditedPostAttribute("title")):(r=jQuery.trim(jQuery("#content").val()),s=jQuery.trim(jQuery("#title").val()));var i=[],a=0;e=r,""!=r&&(i=(r=(r=(r=(r=r.replace(/(<([^>]+)>)/gi,"")).replace(/['"]+/g,"")).replace(/[^a-zA-Z]+/g," ")).toLowerCase()).split(/[\/\s]+/),a=i.length);var n,l=window.location.hostname,o=!1,p=!1;n=jQuery("<div />",{html:e}).find("a").map(function(){if(jQuery(this).attr("href")&&(-1==jQuery(this).attr("href").indexOf(l)&&(o=!0),-1!==jQuery(this).attr("href").indexOf(l)&&(p=!0)),""!==jQuery(this).text())return jQuery(this).text()}).get();var c;c=jQuery("<div />",{html:e}).find("img").map(function(){if(jQuery(this).attr("alt")&&""!==jQuery(this).attr("alt"))return jQuery(this).attr("alt")}).get();var u=!1,d=jQuery("<div />",{html:e}).find("img");void 0!==d&&d.length>0&&(u=!0);var h=!1,m=jQuery("<div />",{html:e}).find("h2, h3, h4, h5, h6");void 0!==m&&m.length>0&&(h=!0);var y;y=jQuery("<div />",{html:e}).find("h1").map(function(){if(""!==jQuery(this).text())return jQuery(this).text()}).get();var g;g=jQuery("<div />",{html:e}).find("h2").map(function(){if(""!==jQuery(this).text())return jQuery(this).text()}).get();var j=jQuery("#urlSizer").html(),Q=jQuery("#techblissonlineSnippetTitle").html(),f=jQuery("#techblissonlineSnippetDescription").val(),v=jQuery("#psp_seo_meta\\[description\\]").val(),_=jQuery("#psp_seo_meta\\[schema_string\\]").val(),w=!1,S=!1;""!==v&&(S=!0),""!==_&&"Invalid JSON Schema"!==_&&(w=!0);var x=jQuery.trim(jQuery("#permalinkSizer").html()),b=jQuery.trim(jQuery("#actualTitleSizer").html());jQuery("#actualTitleSizers").html(b);var T=0,P=0,z=0;""!==x&&(T=x.length),""!==x&&jQuery("#permalinkSizer").width(),""!==b&&(P=jQuery("<textarea />").html(b).text().length),""!==b&&(z=jQuery("#actualTitleSizer").width()),0==z&&(z=jQuery("#actualTitleSizers").width()-1),""!==j&&(j=j.trim());var k=0,E=0,I=0,C=0,A="",U=[0,2,4],O=[1,3,4],D=[],R=jQuery("#psp_seo_meta\\[keywords\\]").val();if(void 0!==R&&(D=R.split(",")),A+='<div class="psp-bs">',A+='<div class="container-fluid">',A+="<h1>Platinum SEO Analysis</h1>",A+='<p>This is a basic content analysis of this page and your focus keywords. Assigning a score does not mean anything and so we do not do that. Rather, make sure that all these basic recommendations are adhered to. We also recommend you to try our <a href="https://techblissonline.com/tools/" target="_blank">Techblissonline SEO Tools</a> for a detailed analysis of your pages and your competitor pages for your focus keywords, co-occuring words (related entities) and improve your content accordingly. </p>',A+='<div class="panel-group">',A+='<div class="row"><div class="col-sm-12">',A+='<div class="panel panel-primary">',A+='<div class="panel-heading">General</div>',A+='<div class="panel-body">',A+="<ul>",T>0&&T<75?A=A+'<li><span class="dashicons dashicons-yes-alt"></span> URL Length is '+T+" characters </li>":T>75&&(A=A+'<li><span class="psp-info dashicons dashicons-info"></span> URL lLength is '+T+' characters <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="URL might get truncated in Google SERPS if it is more than 75 characters wide. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>'),P>0&&P<70?A=A+'<li><span class="dashicons dashicons-yes-alt"></span> SEO Title lLength is '+P+" characters </li>":P>70&&(A=A+'<li><span class="dashicons dashicons-dismiss"></span> Actual SEO Title lLength is '+P+' characters. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Title might get truncated in Google SERPS if it is more than 70 characters wide. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>'),z>0&&z<574?A=A+'<li><span class="dashicons dashicons-yes-alt"></span> SEO Title pixel width is '+z+" pixels </li>":z>574&&(A=A+'<li><span class="dashicons dashicons-dismiss"></span> SEO Title pixel width is '+z+' pixels including Title format. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Title might get truncated in Google SERPS if it is more than 574 pixels wide. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>'),A+=S?'<li><span class="dashicons dashicons-yes-alt"></span> Platinum SEO Description is used </li>':'<li><span class="dashicons dashicons-dismiss"></span> Platinum SEO Description field is not filled in. You may have an auto-generated description. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Using optimized description improves CTR from search and social engines"><sup><span class="dashicons dashicons-info"></span></sup></a></li>',A+=w?'<li><span class="dashicons dashicons-yes-alt"></span> Json Schema is used on this page using Platinum SEO </li>':'<li><span class="dashicons dashicons-dismiss"></span> Json Schema is not used on this page using Platinum SEO <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Using Json Schema has a positive impact on Google. Use our Schema generator tool to generate and add one in the Advanced SEO section."><sup><span class="dashicons dashicons-info"></span></sup></a></li>',""!=r&&(A=a>0&&a>500?A+'<li><span class="dashicons dashicons-yes-alt"></span> Total number of words in Content is '+a+' <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Content length does not matter as long as user intent is matched for the topic covered. Write related articles and link them internally "><sup><span class="dashicons dashicons-info"></span></sup></a></li>':A+'<li><span class="psp-info dashicons dashicons-info"></span> Total number of words in Content is '+a+' <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Content length does not matter as long as user intent is matched for the topic covered. Write related articles and link them internally "><sup><span class="dashicons dashicons-info"></span></sup></a></li>',A+=u?'<li><span class="dashicons dashicons-yes-alt"></span> Images used in Content </li>':'<li><span class="dashicons dashicons-dismiss"></span> Images not used in Content <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Using relevant high quality images can increase user engagement and bring in more traffic"><sup><span class="dashicons dashicons-info"></span></sup></a></li>',A+=p?'<li><span class="dashicons dashicons-yes-alt"></span> Internal links used in content. </li>':'<li><span class="dashicons dashicons-dismiss"></span> Internal links not used in Content <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Linking to other relevant internal resources improves Time on site. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>',A+=o?'<li><span class="dashicons dashicons-yes-alt"></span> External links found in content. Referring to an authoritative source on which the underlying research for the content was done or linking to the creator of the product the page is about, is always a good practice that improves trust. </li>':'<li><span class="psp-info dashicons dashicons-info"></span> External links not found in Content.Referring to an authoritative source on which the underlying research for the content was done or linking to the creator of the product this page is about, is always a good practice that improves trust. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Linking to other relevant external resources as references improves trust on content. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>',h&&(A+='<li><span class="dashicons dashicons-yes-alt"></span> Subheaders like h2 are used in Content </li>')),A+="</ul>",A+="</div>",A+="</div>",A+="</div></div>",(void 0!==D||D.length<1)&&""==R)return A+="</div>",A+="</div></div>",void jQuery("#techblissonlineseoanalysis").html(A);jQuery.each(D,function(e,t){if(k=0,E=0,I=0,C=0,searchlc=t.toLowerCase().trim(),!(""==searchlc||e>4)){if(jQuery.each([y,g,c,n],function(e,t){jQuery.each(t,function(t,s){-1!==s.toLowerCase().trim().indexOf(searchlc)&&(0==e&&(k+=1),1==e&&(E+=1),2==e&&(I+=1),3==e&&(C+=1))})}),jQuery.inArray(parseInt(e),U)>-1&&(A+='<div class="row">'),A+='<div class="col-sm-6">',A=(A+='<div class="panel panel-primary">')+'<div class="panel-heading">'+t+"</div>",A+='<div class="panel-body">',A+="<ul>",j&&(searchlcurl=searchlc.replace(/ /g,"-"),-1!==j.search(searchlcurl)?A+='<li><span class="dashicons dashicons-yes-alt"></span> Used in URL </li>':A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in URL </li>'),Q&&(psplctitle=Q.toLowerCase().trim(),-1!==psplctitle.search(searchlc)?(A+='<li><span class="dashicons dashicons-yes-alt"></span> Used in Title </li>',psplctitle.indexOf(searchlc)<20?A+='<li><span class="dashicons dashicons-yes-alt"></span> Found in the beginning of Title </li>':A+='<li><span class="dashicons dashicons-dismiss"></span> Not found in the beginning of Title </li>'):A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in Title </li>'),f&&(psplcdesc=f.toLowerCase().trim(),-1!==psplcdesc.search(searchlc)?(psplcdesc,A+='<li><span class="dashicons dashicons-yes-alt"></span> Used in Meta Description </li>'):A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in Meta Description </li>'),s&&(psplcwptitle=s.toLowerCase().trim(),-1!==psplcwptitle.search(searchlc)?A+='<li><span class="dashicons dashicons-yes-alt"></span> Used in h1 tag (Wordpress Title) </li>':A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in h1 tag (Wordpress Title) </li>'),A+="</ul>",""==r)return A+="</div>",A+="</div>",A+="</div>",void(jQuery.inArray(parseInt(e),O)>-1&&(A+="</div>"));var i,l=[];i=pspGetOccurences(searchlc,r,!1),pspsearchlcarr=searchlc.split(/[\/\s]+/),pspsearchlccount=pspsearchlcarr.length,l=i[1],pspkd=0,pspkeycounter=0,a>0&&l&&(pspkd=l.length*pspsearchlccount/a*100);var o=i[0];o&&(pspkeycounter=o.length),A+="<ul>",l.length>0?(A=pspkd.toFixed(2)<3?A+'<li><span class="dashicons dashicons-yes-alt"></span> Used in content '+l.length+" time(s) </li>":A+'<li><span class="dashicons dashicons-dismiss"></span> Used in content '+l.length+" time(s) </li>",pspkeycounter>0&&pspkeycounter<6?A=A+'<li><li><span class="dashicons dashicons-yes-alt"></span> Found in first 100 words of content '+pspkeycounter+" time(s) </li>":0==pspkeycounter?A+='<li><span class="dashicons dashicons-dismiss"></span> Not found in first 100 words of content </li>':A=A+'<li><span class="dashicons dashicons-dismiss"></span> Found in first 100 words of content '+pspkeycounter+" time(s) </li>",A=pspkd.toFixed(2)<3?A+'<li><span class="dashicons dashicons-yes-alt"></span> Keyword Density of '+t+" is "+pspkd.toFixed(2):A+'<li><span class="dashicons dashicons-dismiss"></span> Keyword Density of '+t+" is "+pspkd.toFixed(2)):A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in Content </li>',k>0&&(A=A+'<li><span class="dashicons dashicons-yes-alt"></span> Used in other h1 tags '+k+" time(s) </li>"),E>0?A=A+'<li><span class="dashicons dashicons-yes-alt"></span> Used in h2 tags '+E+" time(s) </li>":A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in h2 tags </li>',I>0?A=A+'<li><span class="dashicons dashicons-yes-alt"></span> Used in image alt attributes '+I+" time(s) </li>":A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in image alt attributes </li>',C>0?A=A+'<li><span class="dashicons dashicons-yes-alt"></span> Used in anchor texts '+C+" time(s) </li>":A+='<li><span class="dashicons dashicons-dismiss"></span> Not used in anchor texts </li>',A+="</ul>",A+="</div>",A+="</div>",A+="</div>",jQuery.inArray(parseInt(e),O)>-1&&(A+="</div>")}}),A+="</div>",A+="</div></div>",jQuery("#techblissonlineseoanalysis").html(A)}function getFirstWords(e){return e.split(/\s+/).slice(0,100).join(" ")}function pspGetOccurences(e,t,s){var r=e.length;if(0==r)return[];var i,a,n=getFirstWords(t),l=0,o=[],p=0,c=[];for(s||(t=t.toLowerCase(),e=e.toLowerCase());(i=t.indexOf(e,l))>-1;)o.push(i),l=i+r;for(;(a=n.indexOf(e,p))>-1;)c.push(a),p=a+r;return[c,o]}function pspGetCounOfIndices(e,t,s){if(0==e.length)return[];var r,i=[],a=[],n=[];s||(e=e.toLowerCase()),r=t.length;for(let n=0;n<r;n++)str=t[n],str&&(s||(str=str.toLowerCase()),str.indexOf(e,0)>-1&&(a.push(str),n<100&&i.push(str)));return n.push(i),n.push(a),n}function updateAll(){setUrlPreview(),setTitlePreview(),setDescriptionPreview()}String.prototype.trimEnd=function(e){e=e||" ";for(var t=this.length-1;t>=0&&this.charAt(t)==e;t--);return this.substring(0,t+1)},jQuery(document).ready(function(){jQuery("#URL").keyup(function(){setUrlPreview()}),jQuery(document).on("keyup","#new-post-slug",function(){setUrlPreview()}),jQuery(document).on("click",".cancel, .save",function(){setUrlPreview()}),jQuery('input[name="post_category[]"]').click(function(){setTitlePreview()}),jQuery("input[name^='tax_input[']").click(function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[title\\]").keyup(function(){setTitlePreview()}),jQuery("#title").keyup(function(){setTitlePreview()}),jQuery("#name").keyup(function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[titleformat\\]").bind("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[titleformat\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[preferred_tax\\]").on("change",function(){pspPopulateTerms(),setTitlePreview()}),jQuery("#psp_seo_meta\\[preferred_term\\]").on("focus",function(){previousTerm=jQuery(this).val(),jQuery(this).attr("oldValue",previousTerm)}).on("change",function(){isTermSelected(),setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_title_format\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_title\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_psp\\]").on("change",function(){setTitlePreview(),setDescriptionPreview()}),jQuery("#psp_seo_meta\\[disable_description\\]").on("change",function(){setDescriptionPreview()}),jQuery("#psp_seo_meta\\[description\\]").keyup(function(){setDescriptionPreview()}),jQuery("#content").keyup(function(){setDescriptionPreview()}),jQuery("#psp_seo_meta\\[maxsnippet\\]").on("change",function(){setDescriptionPreview()}),jQuery("#DateText").keyup(function(){updateDateText()}),jQuery("#psp_seo_meta\\[keywords\\]").keyup(function(){setPSPSeoAnalysis()}),jQuery("#psp_analyse_btn").on("click",function(){setPSPSeoAnalysis()}),updateAll(),pspSubscribe()});
|
1 |
+
function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function wordCount(e){var t=e.match(/\S+/g);return t?t.length:0}function isPspGutenbergActive(){return document.body.classList.contains("block-editor-page")}function arraysEqual(e,t){if(void 0===e||void 0===t)return!1;if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!=t.length)return!1;e=e.sort(),t=t.sort();for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}function pspContainsPT(e){if(jQuery("#psp_seo_meta\\[preferred_term\\]").val()>0){var t=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text();return!(e&&jQuery.inArray(t,e)>-1)&&(alert("Make sure that you change the preferred term before saving as you have deselected "+t),jQuery("#psp_seo_meta\\[preferred_term\\]").val(""),!0)}}function pspSelectedTerms(e,t){var r=[],s=jQuery("#psp_terms_json_str").val();s=s.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/""/g,'"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f");var i,a=JSON.parse(s);return jQuery.each(a,function(s,a){s===t&&(i=0,jQuery.each(a,function(t,s){jQuery.inArray(parseInt(s.id),e)>-1&&(r[i]=s.name.trim(),i++)}))}),r.sort(),r}function pspSelectedTermsClassic(e){var t=[];return jQuery('input[name="'+e+'"]:checked').each(function(){t.push(jQuery(this).parent("label").text().trim().replace(/\"/g,""))}),t.sort(),t}function isTermSelected(){var e=jQuery("#psp_seo_meta\\[preferred_tax\\]"),t=jQuery("#psp_seo_meta\\[preferred_term\\]"),r=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text(),s=jQuery("#psp_seo_meta\\[preferred_term\\]").val();if(s){var i,a="categories",n="post_category[]",l="category",o=t.attr("oldValue"),p=!1;isPspGutenbergActive()&&(p=!0),e&&e.val()&&"category"!==(l=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text())&&(a=l,n="tax_input["+l+"][]"),p&&wp.data&&wp.data.select?(taxarray=wp.data.select("core/editor").getEditedPostAttribute(a),i=pspSelectedTerms(taxarray,l)):i=pspSelectedTermsClassic(n),s&&(i.length>0?jQuery.inArray(r.trim(),i)>-1||""===s||(alert("Select this Term "+r+" if you want to set it as preferred term"),t.val(o)):(alert("Select this Term "+r+" if you want to set it as preferred term"),t.val("")))}}function pspPopulateTerms(){preferredTaxElem=jQuery("#psp_seo_meta\\[preferred_tax\\]"),preferredTermElem=jQuery("#psp_seo_meta\\[preferred_term\\]");var e=preferredTaxElem.val();jQuery("#psp_seo_meta\\[preferred_term\\]").html("");var t=jQuery("#psp_terms_json_str").val();t=t.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/""/g,'"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f");var r=JSON.parse(t);preferredTermElem.append('<option value="">Select a Term</option>'),jQuery.each(r,function(t,r){t===e&&jQuery.each(r,function(e,t){preferredTermElem.append('<option value="'+t.id+'">'+t.name+"</option>")})})}function boldWords(e){var t=e,r=jQuery("#psp_seo_meta\\[keywords\\]").val().match(/\S+/g);if(r)for(i=0;i<r.length;i++)t=(t=t.replace(new RegExp("(^|[\\W])("+escapeRegExp(r[i])+")([\\W]|$)","gi"),"$1<b>$2</b>$3")).replace(new RegExp("(^|[\\W])("+escapeRegExp(r[i])+")([\\W]|$)","gi"),"$1<b>$2</b>$3");return t}function boldText(e){var t=e,r=jQuery("#psp_seo_meta\\[keywords\\]").val().match(/\S+/g);if(r)for(i=0;i<r.length;i++)t=t.replace(new RegExp("("+escapeRegExp(r[i])+")","gi"),"<b>$1</b>");return t}function htmlEncode(e){return jQuery("<div/>").text(e).html()}function setGtbUrlPreview(e){var t="";(t=e)&&(t=t.replace(/^https?\:\/\//i,""));var r=htmlEncode(t),s=(r=r.replace(/\/$/,"")).length;jQuery("#permalinkSizer").html(r);var i=r=r.replace(/([^https?:\/\/])(\/)/g,"$1 > ");t=r,jQuery("#urlSizer").html(r),jQuery("#murlSizer").html(i);var a=new RegExp("W(.*)$");for(trimmed=!1;jQuery("#urlSizer").width()>566;){var n=r;n=(n=(n=(n=n.substring(0,n.length-1)).trim()).replace(/\>$/,"")).trim(),jQuery("#urlSizer").html(n),r=n,trimmed=!0}trimmed&&(r+=" ...",jQuery("#urlSizer").html(r)),info=s+" characters, ",jQuery("#urlInfo").html(r.length+" characters, "+jQuery("#urlSizer").width()+" pixels"),jQuery("#urlSizer").width()<=584?jQuery("#urlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"):jQuery("#urlInfo").html(info+'<span style="color:red;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetUrl").html(r),mtrimmed=!1;for(var l=i;i.length>42;)i=jQuery.trim(i.replace(" ...","")),(l=(l=(l=jQuery.trim(l.replace(a,""))).trim()).replace(/\>$/,"")).length>=42&&(l=(l=jQuery.trim(i.replace(" ...",""))).substring(0,l.length-1)),l=l.trim(),i=l+=" ...",mtrimmed=!0;mtrimmed&&jQuery("#murlSizer").html(i),info=i.length+" characters, ",jQuery("#murlInfo").html(i.length+" characters, "+jQuery("#murlSizer").width()+" pixels"),jQuery("#murlSizer").width()<=282?jQuery("#murlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+" pixels</span>"):jQuery("#murlInfo").html(info+'<span style="color:red;">'+jQuery("#murlSizer").width()+" pixels</span>"),jQuery("#techblissonlineMSnippetUrl").html(i)}function setUrlPreview(){var e=jQuery.trim(jQuery("#pspHomePermalink").text())+"slug-name/";if(isPspGutenbergActive()&&!0,jQuery("#editable-post-name").length){e=jQuery.trim(jQuery("#sample-permalink").text());var t=jQuery.trim(jQuery("#editable-post-name").text());e=(e=e.replace(t,"")).replace(/\/$/g,"")}else jQuery("#name").length?e=jQuery.trim(jQuery("#pspPostPermalink").text()):jQuery("#slug").length&&(e=jQuery.trim(jQuery("#pspPostPermalink").text()));if(jQuery("#new-post-slug").length>0)e+=jQuery("#new-post-slug").val();else if(jQuery("#editable-post-name-full").length){e+=jQuery("#editable-post-name-full").text()}e&&(e=e.replace(/^https?\:\/\//i,""));var r=htmlEncode(e),s=r.length;s=(r=r.replace(/\/$/,"")).length;jQuery("#permalinkSizer").html(r);var i=r=r.replace(/([^https?:\/\/])(\/)/g,"$1 > ");e=r,jQuery("#urlSizer").html(r),jQuery("#murlSizer").html(i);var a=new RegExp("W(.*)$");for(trimmed=!1;jQuery("#urlSizer").width()>584;){var n=r;n=(n=(n=(n=n.substring(0,n.length-1)).trim()).replace(/\>$/,"")).trim(),jQuery("#urlSizer").html(n),r=n,trimmed=!0}trimmed&&(r+=" ..."),info=s+" characters, ",jQuery("#urlInfo").html(s+" characters, "+jQuery("#urlSizer").width()+" pixels"),jQuery("#urlSizer").width()<=584?jQuery("#urlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"):jQuery("#urlInfo").html(info+'<span style="color:red;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetUrl").html(r),mtrimmed=!1;for(var l=i;l.length>42;)i=jQuery.trim(i.replace(" ...","")),(l=(l=(l=jQuery.trim(l.replace(a,""))).trim()).replace(/\>$/,"")).length>=42&&(l=(l=jQuery.trim(i.replace(" ...",""))).substring(0,l.length-1)),l=l.trim(),i=l+=" ...",mtrimmed=!0;mtrimmed&&jQuery("#murlSizer").html(i),info=i.length+" characters, ",jQuery("#murlInfo").html(i.length+" characters, "+jQuery("#murlSizer").width()+" pixels"),jQuery("#murlSizer").width()<=282?jQuery("#murlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+" pixels</span>"):jQuery("#murlInfo").html(info+'<span style="color:red;">'+jQuery("#murlSizer").width()+" pixels</span>"),jQuery("#techblissonlineMSnippetUrl").html(i)}function stripTrailingSlash(e){return"/"==e.substr(-1)?e.substr(0,e.length-1):e}function setGtbTitlePreview(e,t){var r=jQuery("#psp_seo_meta\\[titleformat\\]").val(),s=!1,i=!1;jQuery("#psp_seo_meta\\[disable_title_format\\]:checked").length>0&&(s=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(i=!0),s&&(r="%seo_title%"),i&&(r="%wp_title%");var a=jQuery("#pspPostTypeArrayFormat").text(),n=JSON.parse(a),l=jQuery("#psp_seo_meta\\[title\\]"),o=r.replaceAll("%seo_title%",e);if(""===e&&(o=o.replaceAll("%seo_title%",l.attr("placeholder"))),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.replaceAll("%wp_title%",n.wp_title)).replaceAll("%site_name%",n.site_name)).replaceAll("%site_description%",n.site_description)).replaceAll("%currentyear%",n.currentyear)).replaceAll("%woo_single_cat%",n.woo_single_cat)).replaceAll("%woo_single_tag%",n.woo_single_tag)).replaceAll("%woo_single_price%",n.woo_single_price)).replaceAll("%woo_single_price_exc_tax%",n.woo_single_price_exc_tax)).replaceAll("%woo_sku%",n.woo_sku)).replaceAll("%category%",t)).replaceAll("%taxonomy%",t)).replace(/%sep%/g,n.sep),""!==(o=(o=jQuery.trim(o)).trim(n.sep))){var p=htmlEncode(o),c=p;jQuery("#titleSizer").html(p),jQuery("#actualTitleSizer").html(p);var u=new RegExp("sw+(.*)$");trimmed=!1;for(var d=p;jQuery("#titleSizer").width()>584;)p=jQuery.trim(p.replace(" ...","")),(d=jQuery.trim(d.replace(u,""))).length>=p.length&&(d=d.substring(0,d.length-1)),p=d+" ...",jQuery("#titleSizer").html(p),trimmed=!0;trimmed,jQuery("#titleSizer").html(p),mtrimmed=!1;for(var h=c;h.length>78;)c=jQuery.trim(c.replace(" ...","")),(h=jQuery.trim(h.replace(u,""))).length>=78&&(h=(h=jQuery.trim(h.replace(" ...",""))).substring(0,h.length-1)),c=h+=" ...",mtrimmed=!0;mtrimmed,jQuery("#mtitleSizer").html(c),info=jQuery("<textarea />").html(p).text().length+" characters, "+wordCount(p)+" words ",jQuery("#titleInfo").html(p.length+" characters, "+jQuery("#titleSizer").width()+" pixels, "+wordCount(p)+" words"),jQuery("#titleSizer").width()<=584?jQuery("#titleInfo").html(info+'<span style="color:green;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"):jQuery("#titleInfo").html(info+'<span style="color:red;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"),minfo=jQuery("<textarea />").html(c).text().length+" characters/ 78 characters "+wordCount(c)+" words ",jQuery("#mtitleInfo").html(c.length+" characters, "+jQuery("#mtitleSizer").width()+" pixels, "+wordCount(c)+" words"),c.length<=78?jQuery("#mtitleInfo").html('<span style="color:green;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"):jQuery("#mtitleInfo").html('<span style="color:red;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"),jQuery("#techblissonlineSnippetTitle").html(p),jQuery("#techblissonlineMSnippetTitle").html(c),setPSPSeoAnalysis()}}function setTitlePreview(){var e,t,r="",s="",i="",a=!1,n="",l=[];isPspGutenbergActive()&&(a=!0);var o=jQuery("#pspPostTypeArrayFormat").text(),p=JSON.parse(o),c=jQuery("#psp_seo_meta\\[titleformat\\]").val(),u=!1,d=!1,h=!1;jQuery("#psp_seo_meta\\[disable_title_format\\]:checked").length>0&&(u=!0),jQuery("#psp_seo_meta\\[disable_title\\]:checked").length>0&&(d=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(h=!0);n=p.category,c.toLowerCase().indexOf("%wp_title%");var m=jQuery("#title"),y=jQuery("#psp_seo_meta\\[title\\]");s=y.attr("placeholder");var g=jQuery("#psp_seo_meta\\[preferred_tax\\]"),j=jQuery("#psp_seo_meta\\[preferred_term\\]"),Q="categories",f="post_category[]",_="category";if(g&&g.val()&&"category"!==(_=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text())&&(Q=_,f="tax_input["+_+"][]"),!a&&m&&(pspContainsPT(l=pspSelectedTermsClassic(f)),n=j&&j.val()?jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():l&&l.length>0?l[0]:"%"+_+"%"),!y.val()||d||h?(jQuery("#title").val()?s=jQuery.trim(jQuery("#title").val()):jQuery("#name").val()?s=jQuery.trim(jQuery("#name").val()):a&&wp.data&&wp.data.select&&(n=p.category,j&&j.val()&&(n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text()),""===(s=wp.data.select("core/editor").getEditedPostAttribute("title"))&&(s=y.attr("placeholder")),n||(n="%"+_+"%"),void 0===(t=wp.data.select("core/editor").getEditedPostAttribute(Q))&&(n="%"+_+"%"),void 0!==t&&0===t.length&&(n="%"+_+"%",pspContainsPT(t)),void 0!==t&&t.length>0&&(pspContainsPT(l=pspSelectedTerms(t,_)),j&&j.val()?n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():l.length>0&&(n=l[0]))),r=s,(u||h)&&(c="%wp_title%"),r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=c.replace("%seo_title%",s)).replaceAll("%wp_title%",s)).replaceAll("%site_name%",p.site_name)).replaceAll("%site_description%",p.site_description)).replaceAll("%currentyear%",p.currentyear)).replaceAll("%woo_single_cat%",p.woo_single_cat)).replaceAll("%woo_single_tag%",p.woo_single_tag)).replaceAll("%woo_single_price%",p.woo_single_price)).replaceAll("%woo_single_price_exc_tax%",p.woo_single_price_exc_tax)).replaceAll("%woo_sku%",p.woo_sku)).replace("%taxonomy%",n)).replace("%category%",n)).replace(/%sep%/g,p.sep),r=(r=jQuery.trim(r)).trim(p.sep)):(r=y.val(),i=y.val(),jQuery("#title").val()?s=jQuery.trim(jQuery("#title").val()):jQuery("#name").val()?s=jQuery.trim(jQuery("#name").val()):a&&wp.data&&wp.data.select&&(n=p.category,j&&j.val()&&(n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text()),s=wp.data.select("core/editor").getEditedPostAttribute("title"),n||(n="%"+_+"%"),void 0===(e=wp.data.select("core/editor").getEditedPostAttribute(Q))&&(n="%"+_+"%"),void 0!==e&&0===e.length&&(n="%"+_+"%",pspContainsPT(l)),void 0!==e&&e.length>0&&(pspContainsPT(l=pspSelectedTerms(e,_)),j&&j.val()?n=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():l.length>0&&(n=l[0]))),u&&(c="%seo_title%"),r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=c.replaceAll("%seo_title%",i)).replaceAll("%wp_title%",s)).replaceAll("%site_name%",p.site_name)).replaceAll("%site_description%",p.site_description)).replaceAll("%currentyear%",p.currentyear)).replaceAll("%woo_single_cat%",p.woo_single_cat)).replaceAll("%woo_single_tag%",p.woo_single_tag)).replaceAll("%woo_single_price%",p.woo_single_price)).replaceAll("%woo_single_price_exc_tax%",p.woo_single_price_exc_tax)).replaceAll("%woo_sku%",p.woo_sku)).replaceAll("%taxonomy%",n)).replaceAll("%category%",n)).replaceAll(/%sep%/g,p.sep),r=(r=jQuery.trim(r)).trim(p.sep)),""!==r){""===s||a||s;var v=htmlEncode(r),w=v;jQuery("#titleSizer").html(v),jQuery("#actualTitleSizer").html(v);var S=new RegExp("sw+(.*)$"),x=v;for(trimmed=!1;jQuery("#titleSizer").width()>584;)v=jQuery.trim(v.replace(" ...","")),(x=jQuery.trim(x.replace(S,""))).length>=v.length&&(x=x.substring(0,x.length-1)),v=x+" ...",jQuery("#titleSizer").text(v),trimmed=!0;trimmed,jQuery("#titleSizer").text(v),jQuery("body").append(jQuery("#titleSizer")).width(),jQuery("body#titleSizer").remove(),info=jQuery("<textarea />").html(v).text().length+" characters, "+wordCount(v)+" words ",jQuery("#titleInfo").html(v.length+" characters, "+jQuery("#titleSizer").width()+" pixels, "+wordCount(v)+" words"),jQuery("#titleSizer").width()<=584?jQuery("#titleInfo").html(info+'<span style="color:green;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"):jQuery("#titleInfo").html(info+'<span style="color:red;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetTitle").html(v);var b=w;for(mtrimmed=!1;b.length>78;)w=jQuery.trim(w.replace(" ...","")),(b=jQuery.trim(b.replace(S,""))).length>=78&&(b=(b=jQuery.trim(b.replace(" ...",""))).substring(0,b.length-1)),w=b+=" ...",mtrimmed=!0;mtrimmed,jQuery("#mtitleSizer").text(w),jQuery("body").append(jQuery("#mtitleSizer")).width(),jQuery("body#mtitleSizer").remove(),minfo=jQuery("<textarea />").html(w).text().length+" characters/ 78 characters "+wordCount(w)+" words ",jQuery("#mtitleInfo").html(w.length+" characters, "+jQuery("#mtitleSizer").width()+" pixels, "+wordCount(w)+" words"),w.length<=78?jQuery("#mtitleInfo").html('<span style="color:green;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"):jQuery("#mtitleInfo").html('<span style="color:red;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"),jQuery("#techblissonlineMSnippetTitle").html(w),setPSPSeoAnalysis()}}function setDescriptionPreview(){var e,t=!1,r=jQuery("#psp_seo_meta\\[description\\]");isPspGutenbergActive()&&(t=!0);var s=jQuery.trim(jQuery("#psp_seo_meta\\[maxsnippet\\]").val()),i=s;parseInt(s)<0&&(s=230,i=285),jQuery.inArray(parseInt(s),[-1,0,1,2,3,4])>-1&&(s=230,i=285),""===s&&(s=230,i=285),s=parseInt(s),i=parseInt(i);var a="",n=!1,l=!1,o=jQuery("#pspPostTypeArrayFormat").text();if(e=JSON.parse(o).autogendesc,jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(n=!0),jQuery("#psp_seo_meta\\[disable_description\\]:checked").length>0&&(l=!0),""!==a||n||l||(a=jQuery.trim(jQuery("#psp_seo_meta\\[description\\]").val())),""===a){if(""===a&&t&&wp.data&&wp.data.select){var p=wp.data.select("core/editor").getEditedPostContent();return""!==e&&(a=(a=p.replace(/(<([^>]+)>)/gi,"")).substring(0,i)),a||(a=r.attr("placeholder")),void setGTBDescPreview(a)}var c=jQuery.trim(jQuery("#content").val());if(!r.val()||n||l)return""!==e&&(a=(a=c.replace(/(<([^>]+)>)/gi,"")).substring(0,i)),a||(a=r.attr("placeholder")),void setGTBDescPreview(a)}return a?void setGTBDescPreview(a):void 0}function setGTBDescPreview(e){jQuery("#psp_seo_meta\\[description\\]");var t=e;placeholder_desc=e;var r=jQuery.trim(jQuery("#psp_seo_meta\\[maxsnippet\\]").val()),s=r;parseInt(r)<0&&(r=230,s=285),jQuery.inArray(parseInt(r),[-1,0,1,2,3,4])>-1&&(r=230,s=285),""===r&&(r=230,s=285),r=parseInt(r),s=parseInt(s);var i=htmlEncode(t),a=i+=" ...";jQuery("#descriptionSizer").html(i),jQuery("#mdescriptionSizer").html(a);for(var n=new RegExp("sw+(.*)$"),l=i;l.length>r;)i=jQuery.trim(i.replace(" ...","")),l=jQuery.trim(l.replace(n,"")),t=jQuery.trim(t.replace(n,"")),l.length>=r&&(l=(l=jQuery.trim(l.replace(" ...",""))).substring(0,l.length-1),t=t.substring(0,t.length-1)),l+=" ...";i=l,jQuery("#descriptionSizer").html(i);for(var o=a;o.length>s;)a=jQuery.trim(a.replace(" ...","")),(o=jQuery.trim(o.replace(n,""))).length>=s&&(o=(o=jQuery.trim(o.replace(" ...",""))).substring(0,o.length-1)),o+=" ...";a=o,jQuery("#descriptionSizer").html(a),jQuery("body").append(jQuery("#descriptionSizer")).width(),jQuery("body").append(jQuery("#mdescriptionSizer")).width(),jQuery("body").remove("#descriptionSizer"),jQuery("body").remove("#mdescriptionSizer"),jQuery("#descriptionInfo").html(i.length+" characters, "+jQuery("#descriptionSizer").width()+" pixels, "+wordCount(i)+" words"),info=jQuery("#descriptionSizer").width()+" pixels, "+wordCount(i)+" words ",jQuery("#mdescriptionInfo").html(a.length+" characters, "+jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(a)+" words"),minfo=jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(a)+" words ",i.length<=146?jQuery("#descriptionInfo").html(info+'<span style="color:green;">'+i.length+"/~170 characters"):i.length<=160?jQuery("#descriptionInfo").html(info+'<span style="color:orange;">'+i.length+"/~170 characters</span>"):i.length<=166?jQuery("#descriptionInfo").html(info+'<span style="color:purple;">'+i.length+"/~170 characters</span>"):jQuery("#descriptionInfo").html(info+'<span style="color:red;">'+i.length+"/~170 characters</span>"),a.length<=146?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:green;">'+a.length+"/~170 characters"):a.length<=160?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:orange;">'+a.length+"/~170 characters</span>"):a.length<=166?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:purple;">'+a.length+"/~170 characters</span>"):jQuery("#mdescriptionInfo").html(minfo+'<span style="color:red;">'+a.length+"/~170 characters</span>"),jQuery("#techblissonlineSnippetDescription").html(i),jQuery("#techblissonlineMSnippetDescription").html(a)}function pspSubscribe(){var e=!1;if(isPspGutenbergActive()&&(e=!0),e){var t,r=jQuery("#psp_seo_meta\\[title\\]"),s=jQuery("#psp_seo_meta\\[preferred_tax\\]"),i=jQuery("#psp_seo_meta\\[preferred_term\\]"),a=!1,n=!1,l="",o="",p=[],c=[],u="category",d="categories",h=!0,m=!0,y=jQuery.trim(jQuery("#pspHomePermalink").text())+"slug-name/",g="",j=!1,Q="",f=[];wp.data.subscribe(function(){if(l=r.val(),g=wp.data.select("core/editor").getPermalink(),permalink_change=!0,y===g&&(permalink_change=!1),y=g,g&&permalink_change)setGtbUrlPreview(g);else if(jQuery("#psp_seo_meta\\[disable_title\\]:checked").length>0&&(a=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(n=!0),s&&s.val()?(u=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text(),d="category"!==u?u:"categories"):d="categories",c=wp.data.select("core/editor").getEditedPostAttribute(d),arraysEqual(p,c)&&(h=!1),!l||a||n||h){if(!l||a||n){if(o=wp.data.select("core/editor").getEditedPostAttribute("title"),t===o&&(m=!1),!m&&!h)return m=!0,void(h=!0);t=o,m=!0}h=!0,p=c,Q="%"+u+"%",j||void 0===c||0!==c.length||(j=pspContainsPT(c)),void 0!==c&&c.length>0&&(f=pspSelectedTerms(c,u),j=pspContainsPT(f),i&&i.val()?Q=jQuery("#psp_seo_meta\\[preferred_term\\] option:selected").text():f.length>0&&(Q=f[0])),(!l||a||n)&&(void 0===o&&(r=jQuery("#psp_seo_meta\\[title\\]"),o=r.attr("placeholder")),""===o&&(r=jQuery("#psp_seo_meta\\[title\\]"),o=r.attr("placeholder")),o&&Q&&setGtbTitlePreview(o,Q)),!l||a||n||Q&&setGtbTitlePreview(l,Q)}else h=!0})}}function updateDateText(){var e=htmlEncode(jQuery.trim(jQuery("#DateText").val()));e.length>0?jQuery("#resultDateText").html(e+" - "):jQuery("#resultDateText").html("")}function setPSPSeoAnalysis(){var e,t=!1,r="",s="";isPspGutenbergActive()&&(t=!0),t&&wp.data&&wp.data.select?(""==(s=wp.data.select("core/editor").getEditedPostContent())&&(s=wp.data.select("core/editor").getEditedPostAttribute("content")),r=wp.data.select("core/editor").getEditedPostAttribute("title")):(s=jQuery.trim(jQuery("#content").val()),r=jQuery.trim(jQuery("#title").val()));var i=[],a=0;e=s,""!=s&&(i=(s=(s=(s=(s=s.replace(/(<([^>]+)>)/gi,"")).replace(/['"]+/g,"")).replace(/[^a-zA-Z]+/g," ")).toLowerCase()).split(/[\/\s]+/),a=i.length);var n,l=window.location.hostname,o=!1,p=!1;n=jQuery("<div />",{html:e}).find("a").map(function(){if(jQuery(this).attr("href")&&(-1==jQuery(this).attr("href").indexOf(l)&&(o=!0),-1!==jQuery(this).attr("href").indexOf(l)&&(p=!0)),""!==jQuery(this).text())return jQuery(this).text()}).get();var c;c=jQuery("<div />",{html:e}).find("img").map(function(){if(jQuery(this).attr("alt")&&""!==jQuery(this).attr("alt"))return jQuery(this).attr("alt")}).get();var u=!1,d=jQuery("<div />",{html:e}).find("img");void 0!==d&&d.length>0&&(u=!0);var h=!1,m=jQuery("<div />",{html:e}).find("h2, h3, h4, h5, h6");void 0!==m&&m.length>0&&(h=!0);var y;y=jQuery("<div />",{html:e}).find("h1").map(function(){if(""!==jQuery(this).text())return jQuery(this).text()}).get();var g;g=jQuery("<div />",{html:e}).find("h2").map(function(){if(""!==jQuery(this).text())return jQuery(this).text()}).get();var j=jQuery("#urlSizer").html(),Q=jQuery("#techblissonlineSnippetTitle").html(),f=jQuery("#techblissonlineSnippetDescription").val(),_=jQuery("#psp_seo_meta\\[description\\]").val(),v=jQuery("#psp_seo_meta\\[schema_string\\]").val(),w=!1,S=!1;""!==_&&(S=!0),""!==v&&"Invalid JSON Schema"!==v&&(w=!0);var x=jQuery.trim(jQuery("#permalinkSizer").html()),b=jQuery.trim(jQuery("#actualTitleSizer").html());jQuery("#actualTitleSizers").html(b);var T=0,P=0,z=0;""!==x&&(T=x.length),""!==x&&jQuery("#permalinkSizer").width(),""!==b&&(P=jQuery("<textarea />").html(b).text().length),""!==b&&(z=jQuery("#actualTitleSizer").width()),0==z&&(z=jQuery("#actualTitleSizers").width()-1),""!==j&&(j=j.trim());var k=0,A=0,E=0,I=0,C="",U=[0,2,4],O=[1,3,4],D=[],R=jQuery("#psp_seo_meta\\[keywords\\]").val();if(void 0!==R&&(D=R.split(",")),C+='<div class="psp-bs">',C+='<div class="container-fluid">',C+="<h1>Platinum SEO Analysis</h1>",C+='<p>This is a basic content analysis of this page and your focus keywords. Assigning a score does not mean anything and so we do not do that. Rather, make sure that all these basic recommendations are adhered to. We also recommend you to try our <a href="https://techblissonline.com/tools/" target="_blank">Techblissonline SEO Tools</a> for a detailed analysis of your pages and your competitor pages for your focus keywords, co-occuring words (related entities) and improve your content accordingly. </p>',C+='<div class="panel-group">',C+='<div class="row"><div class="col-sm-12">',C+='<div class="panel panel-primary">',C+='<div class="panel-heading">General</div>',C+='<div class="panel-body">',C+="<ul>",T>0&&T<75?C=C+'<li><span class="dashicons dashicons-yes-alt"></span> URL Length is '+T+" characters </li>":T>75&&(C=C+'<li><span class="psp-info dashicons dashicons-info"></span> URL lLength is '+T+' characters <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="URL might get truncated in Google SERPS if it is more than 75 characters wide. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>'),P>0&&P<70?C=C+'<li><span class="dashicons dashicons-yes-alt"></span> SEO Title lLength is '+P+" characters </li>":P>70&&(C=C+'<li><span class="dashicons dashicons-dismiss"></span> Actual SEO Title lLength is '+P+' characters. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Title might get truncated in Google SERPS if it is more than 70 characters wide. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>'),z>0&&z<574?C=C+'<li><span class="dashicons dashicons-yes-alt"></span> SEO Title pixel width is '+z+" pixels </li>":z>574&&(C=C+'<li><span class="dashicons dashicons-dismiss"></span> SEO Title pixel width is '+z+' pixels including Title format. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Title might get truncated in Google SERPS if it is more than 574 pixels wide. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>'),C+=S?'<li><span class="dashicons dashicons-yes-alt"></span> Platinum SEO Description is used </li>':'<li><span class="dashicons dashicons-dismiss"></span> Platinum SEO Description field is not filled in. You may have an auto-generated description. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Using optimized description improves CTR from search and social engines"><sup><span class="dashicons dashicons-info"></span></sup></a></li>',C+=w?'<li><span class="dashicons dashicons-yes-alt"></span> Json Schema is used on this page using Platinum SEO </li>':'<li><span class="dashicons dashicons-dismiss"></span> Json Schema is not used on this page using Platinum SEO <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Using Json Schema has a positive impact on Google. Use our Schema generator tool to generate and add one in the Advanced SEO section."><sup><span class="dashicons dashicons-info"></span></sup></a></li>',""!=s&&(C=a>0&&a>500?C+'<li><span class="dashicons dashicons-yes-alt"></span> Total number of words in Content is '+a+' <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Content length does not matter as long as user intent is matched for the topic covered. Write related articles and link them internally "><sup><span class="dashicons dashicons-info"></span></sup></a></li>':C+'<li><span class="psp-info dashicons dashicons-info"></span> Total number of words in Content is '+a+' <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Content length does not matter as long as user intent is matched for the topic covered. Write related articles and link them internally "><sup><span class="dashicons dashicons-info"></span></sup></a></li>',C+=u?'<li><span class="dashicons dashicons-yes-alt"></span> Images used in Content </li>':'<li><span class="dashicons dashicons-dismiss"></span> Images not used in Content <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Using relevant high quality images can increase user engagement and bring in more traffic"><sup><span class="dashicons dashicons-info"></span></sup></a></li>',C+=p?'<li><span class="dashicons dashicons-yes-alt"></span> Internal links used in content. </li>':'<li><span class="dashicons dashicons-dismiss"></span> Internal links not used in Content <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Linking to other relevant internal resources improves Time on site. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>',C+=o?'<li><span class="dashicons dashicons-yes-alt"></span> External links found in content. Referring to an authoritative source on which the underlying research for the content was done or linking to the creator of the product the page is about, is always a good practice that improves trust. </li>':'<li><span class="psp-info dashicons dashicons-info"></span> External links not found in Content.Referring to an authoritative source on which the underlying research for the content was done or linking to the creator of the product this page is about, is always a good practice that improves trust. <a href="#" class="psptip" data-toggle="tooltip" data-placement="top" title="Linking to other relevant external resources as references improves trust on content. "><sup><span class="dashicons dashicons-info"></span></sup></a></li>',h&&(C+='<li><span class="dashicons dashicons-yes-alt"></span> Subheaders like h2 are used in Content </li>')),C+="</ul>",C+="</div>",C+="</div>",C+="</div></div>",(void 0!==D||D.length<1)&&""==R)return C+="</div>",C+="</div></div>",void jQuery("#techblissonlineseoanalysis").html(C);jQuery.each(D,function(e,t){if(k=0,A=0,E=0,I=0,searchlc=t.toLowerCase().trim(),!(""==searchlc||e>4)){if(jQuery.each([y,g,c,n],function(e,t){jQuery.each(t,function(t,r){-1!==r.toLowerCase().trim().indexOf(searchlc)&&(0==e&&(k+=1),1==e&&(A+=1),2==e&&(E+=1),3==e&&(I+=1))})}),jQuery.inArray(parseInt(e),U)>-1&&(C+='<div class="row">'),C+='<div class="col-sm-6">',C=(C+='<div class="panel panel-primary">')+'<div class="panel-heading">'+t+"</div>",C+='<div class="panel-body">',C+="<ul>",j&&(searchlcurl=searchlc.replace(/ /g,"-"),-1!==j.search(searchlcurl)?C+='<li><span class="dashicons dashicons-yes-alt"></span> Used in URL </li>':C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in URL </li>'),Q&&(psplctitle=Q.toLowerCase().trim(),-1!==psplctitle.search(searchlc)?(C+='<li><span class="dashicons dashicons-yes-alt"></span> Used in Title </li>',psplctitle.indexOf(searchlc)<20?C+='<li><span class="dashicons dashicons-yes-alt"></span> Found in the beginning of Title </li>':C+='<li><span class="dashicons dashicons-dismiss"></span> Not found in the beginning of Title </li>'):C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in Title </li>'),f&&(psplcdesc=f.toLowerCase().trim(),-1!==psplcdesc.search(searchlc)?(psplcdesc,C+='<li><span class="dashicons dashicons-yes-alt"></span> Used in Meta Description </li>'):C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in Meta Description </li>'),r&&(psplcwptitle=r.toLowerCase().trim(),-1!==psplcwptitle.search(searchlc)?C+='<li><span class="dashicons dashicons-yes-alt"></span> Used in h1 tag (Wordpress Title) </li>':C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in h1 tag (Wordpress Title) </li>'),C+="</ul>",""==s)return C+="</div>",C+="</div>",C+="</div>",void(jQuery.inArray(parseInt(e),O)>-1&&(C+="</div>"));var i,l=[];i=pspGetOccurences(searchlc,s,!1),pspsearchlcarr=searchlc.split(/[\/\s]+/),pspsearchlccount=pspsearchlcarr.length,l=i[1],pspkd=0,pspkeycounter=0,a>0&&l&&(pspkd=l.length*pspsearchlccount/a*100);var o=i[0];o&&(pspkeycounter=o.length),C+="<ul>",l.length>0?(C=pspkd.toFixed(2)<3?C+'<li><span class="dashicons dashicons-yes-alt"></span> Used in content '+l.length+" time(s) </li>":C+'<li><span class="dashicons dashicons-dismiss"></span> Used in content '+l.length+" time(s) </li>",pspkeycounter>0&&pspkeycounter<6?C=C+'<li><li><span class="dashicons dashicons-yes-alt"></span> Found in first 100 words of content '+pspkeycounter+" time(s) </li>":0==pspkeycounter?C+='<li><span class="dashicons dashicons-dismiss"></span> Not found in first 100 words of content </li>':C=C+'<li><span class="dashicons dashicons-dismiss"></span> Found in first 100 words of content '+pspkeycounter+" time(s) </li>",C=pspkd.toFixed(2)<3?C+'<li><span class="dashicons dashicons-yes-alt"></span> Keyword Density of '+t+" is "+pspkd.toFixed(2):C+'<li><span class="dashicons dashicons-dismiss"></span> Keyword Density of '+t+" is "+pspkd.toFixed(2)):C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in Content </li>',k>0&&(C=C+'<li><span class="dashicons dashicons-yes-alt"></span> Used in other h1 tags '+k+" time(s) </li>"),A>0?C=C+'<li><span class="dashicons dashicons-yes-alt"></span> Used in h2 tags '+A+" time(s) </li>":C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in h2 tags </li>',E>0?C=C+'<li><span class="dashicons dashicons-yes-alt"></span> Used in image alt attributes '+E+" time(s) </li>":C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in image alt attributes </li>',I>0?C=C+'<li><span class="dashicons dashicons-yes-alt"></span> Used in anchor texts '+I+" time(s) </li>":C+='<li><span class="dashicons dashicons-dismiss"></span> Not used in anchor texts </li>',C+="</ul>",C+="</div>",C+="</div>",C+="</div>",jQuery.inArray(parseInt(e),O)>-1&&(C+="</div>")}}),C+="</div>",C+="</div></div>",jQuery("#techblissonlineseoanalysis").html(C)}function getFirstWords(e){return e.split(/\s+/).slice(0,100).join(" ")}function pspGetOccurences(e,t,r){var s=e.length;if(0==s)return[];var i,a,n=getFirstWords(t),l=0,o=[],p=0,c=[];for(r||(t=t.toLowerCase(),e=e.toLowerCase());(i=t.indexOf(e,l))>-1;)o.push(i),l=i+s;for(;(a=n.indexOf(e,p))>-1;)c.push(a),p=a+s;return[c,o]}function pspGetCounOfIndices(e,t,r){if(0==e.length)return[];var s,i=[],a=[],n=[];r||(e=e.toLowerCase()),s=t.length;for(let n=0;n<s;n++)str=t[n],str&&(r||(str=str.toLowerCase()),str.indexOf(e,0)>-1&&(a.push(str),n<100&&i.push(str)));return n.push(i),n.push(a),n}function updateAll(){setUrlPreview(),setTitlePreview(),setDescriptionPreview()}String.prototype.trimEnd=function(e){e=e||" ";for(var t=this.length-1;t>=0&&this.charAt(t)==e;t--);return this.substring(0,t+1)},jQuery(document).ready(function(){jQuery("#URL").keyup(function(){setUrlPreview()}),jQuery(document).on("keyup","#new-post-slug",function(){setUrlPreview()}),jQuery(document).on("click",".cancel, .save",function(){setUrlPreview()}),jQuery('input[name="post_category[]"]').click(function(){setTitlePreview()}),jQuery("input[name^='tax_input[']").click(function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[title\\]").keyup(function(){setTitlePreview()}),jQuery("#title").keyup(function(){setTitlePreview()}),jQuery("#name").keyup(function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[titleformat\\]").bind("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[titleformat\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[preferred_tax\\]").on("change",function(){pspPopulateTerms(),setTitlePreview()}),jQuery("#psp_seo_meta\\[preferred_term\\]").on("focus",function(){previousTerm=jQuery(this).val(),jQuery(this).attr("oldValue",previousTerm)}).on("change",function(){isTermSelected(),setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_title_format\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_title\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_psp\\]").on("change",function(){setTitlePreview(),setDescriptionPreview()}),jQuery("#psp_seo_meta\\[disable_description\\]").on("change",function(){setDescriptionPreview()}),jQuery("#psp_seo_meta\\[description\\]").keyup(function(){setDescriptionPreview()}),jQuery("#content").keyup(function(){setDescriptionPreview()}),jQuery("#psp_seo_meta\\[maxsnippet\\]").on("change",function(){setDescriptionPreview()}),jQuery("#DateText").keyup(function(){updateDateText()}),jQuery("#psp_seo_meta\\[keywords\\]").keyup(function(){setPSPSeoAnalysis()}),jQuery("#psp_analyse_btn").on("click",function(){setPSPSeoAnalysis()}),updateAll(),pspSubscribe()});
|
psp-include/settings/psp_settings.php
CHANGED
@@ -2494,10 +2494,10 @@ class PspSettings {
|
|
2494 |
|
2495 |
//available tags array
|
2496 |
//$availableTags = ['seo_title', 'wp_title', 'category', 'site_name', 'site_description'];
|
2497 |
-
$availableTags = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'site_description'];
|
2498 |
|
2499 |
if ($posttype_name == 'page') {
|
2500 |
-
$availableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
2501 |
}
|
2502 |
|
2503 |
$title_field = array (
|
@@ -2511,9 +2511,9 @@ class PspSettings {
|
|
2511 |
|
2512 |
//available tags array
|
2513 |
//$availableTagsDesc = ['seo_title', 'wp_title', 'category', 'site_name', 'seo_description', 'site_description'];
|
2514 |
-
$availableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description'];
|
2515 |
if ($posttype_name == 'page') {
|
2516 |
-
$availableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description'];
|
2517 |
}
|
2518 |
|
2519 |
$desc_field = array (
|
@@ -2625,7 +2625,7 @@ class PspSettings {
|
|
2625 |
$settings['title'] = sanitize_text_field( $settings['title'] );
|
2626 |
|
2627 |
$psp_title_format = explode(" ", $settings['title']);
|
2628 |
-
$titleformats = array('%seo_title%', '%wp_title%', '%sep%', '%site_name%', '%site_description%');
|
2629 |
if(!empty($psp_title_format)) {
|
2630 |
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
2631 |
$settings['title'] = '';
|
@@ -2637,7 +2637,7 @@ class PspSettings {
|
|
2637 |
$settings['description'] = sanitize_text_field( $settings['description'] );
|
2638 |
|
2639 |
$psp_desc_format = explode(" ", $settings['description']);
|
2640 |
-
$descformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%seo_description%', '%site_name%', '%site_description%');
|
2641 |
if(!empty($psp_desc_format)) {
|
2642 |
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
2643 |
$settings['description'] = '';
|
@@ -2698,7 +2698,7 @@ class PspSettings {
|
|
2698 |
function section_others_desc() { esc_html_e('Set the title format for search result pages.', 'platinum-seo-pack'); }
|
2699 |
function section_404_desc() { esc_html_e('Set the title format for 404 page.', 'platinum-seo-pack'); }
|
2700 |
function section_nofollow_desc() { esc_html_e('These Nofollow settings are applied throughout the site wherever appropriate.', 'platinum-seo-pack'); }
|
2701 |
-
function section_permalinks_desc() { echo esc_html__('These settings, if checked, will remove the base from taxonomies like Category and other custom taxonomies, if any. If "Remove base" is chosen for Category then the corresponding base will be removed from the permalink structure for categories.', 'platinum-seo-pack'). ' i.e. <code>Category</code>'; }
|
2702 |
function section_redirections_desc() {echo esc_html__('Manage your Redirection ', 'platinum-seo-pack'). '<a id="404errors" href="'.get_admin_url(get_current_blog_id()).'admin.php?page=redirectionmanager">'.esc_html__('here ', 'platinum-seo-pack').'</a>'; }
|
2703 |
function section_404errors_desc() {echo esc_html__('Manage your 404 errors ', 'platinum-seo-pack'). '<a id="404errors" href="'.get_admin_url(get_current_blog_id()).'admin.php?page=manager404">'.esc_html__('here ', 'platinum-seo-pack').'</a>'; }
|
2704 |
function section_cleanup_head_desc() { echo esc_html__('Remove unwanted links from HTML', 'platinum-seo-pack'). ' <code><head></head></code>'.
|
@@ -2978,7 +2978,7 @@ class PspSettings {
|
|
2978 |
wp_enqueue_media();
|
2979 |
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array( 'jquery-ui-tabs') );
|
2980 |
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
2981 |
-
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ),'', '2.3.
|
2982 |
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
2983 |
//wp_enqueue_script( 'psp-cm', plugins_url( '/js/cm.js', __FILE__ ), array(), false, true);
|
2984 |
|
@@ -3224,7 +3224,7 @@ class PspSettings {
|
|
3224 |
//wp_enqueue_media();
|
3225 |
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array( 'jquery-ui-tabs') );
|
3226 |
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
3227 |
-
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ), '', '2.3.
|
3228 |
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
3229 |
|
3230 |
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
@@ -3469,7 +3469,7 @@ class PspSettings {
|
|
3469 |
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
3470 |
|
3471 |
if ( $this->psp_helper->user_has_access('metabox') ) {
|
3472 |
-
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ), '', '2.3.
|
3473 |
}
|
3474 |
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
3475 |
wp_localize_script('psp-meta-box', 'psp_cm_json_settings', $psp_cm_json_settings);
|
@@ -3854,15 +3854,15 @@ class PspSettings {
|
|
3854 |
|
3855 |
//available tags array
|
3856 |
//$pspavailableTags = ['seo_title', 'wp_title', 'category', 'site_name', 'site_description'];
|
3857 |
-
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'site_description'];
|
3858 |
//available tags array
|
3859 |
//$pspavailableTagsDesc = ['seo_title', 'wp_title', 'category', 'site_name', 'seo_description', 'site_description'];
|
3860 |
-
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'seo_description', 'site_description'];
|
3861 |
|
3862 |
if ($post->post_type == 'page') {
|
3863 |
-
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
3864 |
//available tags array
|
3865 |
-
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description'];
|
3866 |
}
|
3867 |
|
3868 |
?>
|
@@ -4838,7 +4838,7 @@ class PspSettings {
|
|
4838 |
$psp_sanitized_seo_data['titleformat'] = sanitize_text_field( $psp_seo_data['titleformat'] );
|
4839 |
|
4840 |
$psp_title_format = explode(" ", $psp_sanitized_seo_data['titleformat']);
|
4841 |
-
$titleformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%site_name%','%site_description%');
|
4842 |
if(!empty($psp_title_format)) {
|
4843 |
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
4844 |
$psp_sanitized_seo_data['titleformat'] = '';
|
@@ -4856,7 +4856,7 @@ class PspSettings {
|
|
4856 |
$psp_sanitized_seo_data['descformat'] = sanitize_text_field( $psp_seo_data['descformat'] );
|
4857 |
|
4858 |
$psp_desc_format = explode(" ", $psp_sanitized_seo_data['descformat']);
|
4859 |
-
$descformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%seo_description%', '%site_name%', '%site_description%');
|
4860 |
if(!empty($psp_desc_format)) {
|
4861 |
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
4862 |
$psp_sanitized_seo_data['descformat'] = '';
|
2494 |
|
2495 |
//available tags array
|
2496 |
//$availableTags = ['seo_title', 'wp_title', 'category', 'site_name', 'site_description'];
|
2497 |
+
$availableTags = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'site_description', 'currentyear'];
|
2498 |
|
2499 |
if ($posttype_name == 'page') {
|
2500 |
+
$availableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description', 'currentyear'];
|
2501 |
}
|
2502 |
|
2503 |
$title_field = array (
|
2511 |
|
2512 |
//available tags array
|
2513 |
//$availableTagsDesc = ['seo_title', 'wp_title', 'category', 'site_name', 'seo_description', 'site_description'];
|
2514 |
+
$availableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description', 'currentyear'];
|
2515 |
if ($posttype_name == 'page') {
|
2516 |
+
$availableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description', 'currentyear'];
|
2517 |
}
|
2518 |
|
2519 |
$desc_field = array (
|
2625 |
$settings['title'] = sanitize_text_field( $settings['title'] );
|
2626 |
|
2627 |
$psp_title_format = explode(" ", $settings['title']);
|
2628 |
+
$titleformats = array('%seo_title%', '%wp_title%', '%sep%', '%site_name%', '%site_description%', '%currentyear%');
|
2629 |
if(!empty($psp_title_format)) {
|
2630 |
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
2631 |
$settings['title'] = '';
|
2637 |
$settings['description'] = sanitize_text_field( $settings['description'] );
|
2638 |
|
2639 |
$psp_desc_format = explode(" ", $settings['description']);
|
2640 |
+
$descformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%seo_description%', '%site_name%', '%site_description%', '%currentyear%');
|
2641 |
if(!empty($psp_desc_format)) {
|
2642 |
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
2643 |
$settings['description'] = '';
|
2698 |
function section_others_desc() { esc_html_e('Set the title format for search result pages.', 'platinum-seo-pack'); }
|
2699 |
function section_404_desc() { esc_html_e('Set the title format for 404 page.', 'platinum-seo-pack'); }
|
2700 |
function section_nofollow_desc() { esc_html_e('These Nofollow settings are applied throughout the site wherever appropriate.', 'platinum-seo-pack'); }
|
2701 |
+
function section_permalinks_desc() { echo esc_html__('These settings, if checked, will remove the base from taxonomies like Category and other custom taxonomies, if any. If "Remove base" is chosen for Category then the corresponding base will be removed from the permalink structure for categories.', 'platinum-seo-pack'). ' i.e. the base word <code>Category</code> will be removed from your category URLs.'; }
|
2702 |
function section_redirections_desc() {echo esc_html__('Manage your Redirection ', 'platinum-seo-pack'). '<a id="404errors" href="'.get_admin_url(get_current_blog_id()).'admin.php?page=redirectionmanager">'.esc_html__('here ', 'platinum-seo-pack').'</a>'; }
|
2703 |
function section_404errors_desc() {echo esc_html__('Manage your 404 errors ', 'platinum-seo-pack'). '<a id="404errors" href="'.get_admin_url(get_current_blog_id()).'admin.php?page=manager404">'.esc_html__('here ', 'platinum-seo-pack').'</a>'; }
|
2704 |
function section_cleanup_head_desc() { echo esc_html__('Remove unwanted links from HTML', 'platinum-seo-pack'). ' <code><head></head></code>'.
|
2978 |
wp_enqueue_media();
|
2979 |
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array( 'jquery-ui-tabs') );
|
2980 |
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
2981 |
+
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ),'', '2.3.6');
|
2982 |
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
2983 |
//wp_enqueue_script( 'psp-cm', plugins_url( '/js/cm.js', __FILE__ ), array(), false, true);
|
2984 |
|
3224 |
//wp_enqueue_media();
|
3225 |
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array( 'jquery-ui-tabs') );
|
3226 |
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
3227 |
+
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ), '', '2.3.6');
|
3228 |
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
3229 |
|
3230 |
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
3469 |
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
3470 |
|
3471 |
if ( $this->psp_helper->user_has_access('metabox') ) {
|
3472 |
+
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ), '', '2.3.6');
|
3473 |
}
|
3474 |
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
3475 |
wp_localize_script('psp-meta-box', 'psp_cm_json_settings', $psp_cm_json_settings);
|
3854 |
|
3855 |
//available tags array
|
3856 |
//$pspavailableTags = ['seo_title', 'wp_title', 'category', 'site_name', 'site_description'];
|
3857 |
+
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'site_description', 'currentyear'];
|
3858 |
//available tags array
|
3859 |
//$pspavailableTagsDesc = ['seo_title', 'wp_title', 'category', 'site_name', 'seo_description', 'site_description'];
|
3860 |
+
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'seo_description', 'site_description', 'currentyear'];
|
3861 |
|
3862 |
if ($post->post_type == 'page') {
|
3863 |
+
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description', 'currentyear'];
|
3864 |
//available tags array
|
3865 |
+
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description', 'currentyear'];
|
3866 |
}
|
3867 |
|
3868 |
?>
|
4838 |
$psp_sanitized_seo_data['titleformat'] = sanitize_text_field( $psp_seo_data['titleformat'] );
|
4839 |
|
4840 |
$psp_title_format = explode(" ", $psp_sanitized_seo_data['titleformat']);
|
4841 |
+
$titleformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%site_name%','%site_description%', '%currentyear%');
|
4842 |
if(!empty($psp_title_format)) {
|
4843 |
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
4844 |
$psp_sanitized_seo_data['titleformat'] = '';
|
4856 |
$psp_sanitized_seo_data['descformat'] = sanitize_text_field( $psp_seo_data['descformat'] );
|
4857 |
|
4858 |
$psp_desc_format = explode(" ", $psp_sanitized_seo_data['descformat']);
|
4859 |
+
$descformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%seo_description%', '%site_name%', '%site_description%', '%currentyear%');
|
4860 |
if(!empty($psp_desc_format)) {
|
4861 |
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
4862 |
$psp_sanitized_seo_data['descformat'] = '';
|
psp-include/utilities/psp_helper.php
CHANGED
@@ -19,7 +19,7 @@ class PspHelper {
|
|
19 |
* as description. Touch only if you know what you're doing
|
20 |
*/
|
21 |
private $min_description_length = 1;
|
22 |
-
private $version = "2.3.
|
23 |
|
24 |
public $sitename = "";
|
25 |
public $sitedescription = "";
|
19 |
* as description. Touch only if you know what you're doing
|
20 |
*/
|
21 |
private $min_description_length = 1;
|
22 |
+
private $version = "2.3.6";
|
23 |
|
24 |
public $sitename = "";
|
25 |
public $sitedescription = "";
|
psp_main.php
CHANGED
@@ -272,6 +272,9 @@ class PspMain {
|
|
272 |
|
273 |
//v2.2.1
|
274 |
add_action('admin_init', array($this, 'psp_redirect_to_wizard'));
|
|
|
|
|
|
|
275 |
}
|
276 |
//v2.1.0
|
277 |
public function platinum_seo_notice_dismissed() {
|
@@ -287,14 +290,14 @@ class PspMain {
|
|
287 |
$user_id = get_current_user_id();
|
288 |
// Add the meta so that the notice is permanently dismissed.
|
289 |
//delete_user_meta( $user_id, 'psp_ignore_notice_v_209' );
|
290 |
-
update_user_meta( $user_id, 'psp_ignore_notice', "
|
291 |
};
|
292 |
};
|
293 |
}
|
294 |
|
295 |
public function platinum_seo_admin_notice__success() {
|
296 |
$user_id = get_current_user_id();
|
297 |
-
if ( "
|
298 |
global $pagenow;
|
299 |
$psp_pages = array('platinum-seo-social-pack-by-techblissonline', 'psp-social-by-techblissonline', 'psp-tools-by-techblissonline', 'pspp-licenses');
|
300 |
if ('index.php' === $pagenow || ( $pagenow == 'admin.php' && in_array(sanitize_key($_GET['page']), $psp_pages))) {
|
@@ -304,7 +307,7 @@ class PspMain {
|
|
304 |
'psp_ignore_notice' => '1',
|
305 |
'action' => 'psp_delete_adminnotice',
|
306 |
'nonce' => wp_create_nonce('psp_delete_adminnotice'),
|
307 |
-
] ) ) .'" style="float:right; display:block; border:none;">'.esc_html__( 'Dismiss permanently', 'platinum-seo-pack' ) .'</a>'.'<br>'. esc_html__( 'See What has Changed in this', 'platinum-seo-pack' ).'<a href="https://techblissonline.com/platinum-wordpress-seo-plugin/#what-is-new" target="_blank" rel="noopener"> '.esc_html__( ' Version ', 'platinum-seo-pack' ).'2.3.
|
308 |
</div>
|
309 |
<?php
|
310 |
}
|
272 |
|
273 |
//v2.2.1
|
274 |
add_action('admin_init', array($this, 'psp_redirect_to_wizard'));
|
275 |
+
|
276 |
+
//v2.3.6
|
277 |
+
remove_filter( 'wp_robots', 'wp_robots_max_image_preview_large' );
|
278 |
}
|
279 |
//v2.1.0
|
280 |
public function platinum_seo_notice_dismissed() {
|
290 |
$user_id = get_current_user_id();
|
291 |
// Add the meta so that the notice is permanently dismissed.
|
292 |
//delete_user_meta( $user_id, 'psp_ignore_notice_v_209' );
|
293 |
+
update_user_meta( $user_id, 'psp_ignore_notice', "v_236" );
|
294 |
};
|
295 |
};
|
296 |
}
|
297 |
|
298 |
public function platinum_seo_admin_notice__success() {
|
299 |
$user_id = get_current_user_id();
|
300 |
+
if ( "v_236" === trim(get_user_meta( $user_id, 'psp_ignore_notice', true ) )) return;
|
301 |
global $pagenow;
|
302 |
$psp_pages = array('platinum-seo-social-pack-by-techblissonline', 'psp-social-by-techblissonline', 'psp-tools-by-techblissonline', 'pspp-licenses');
|
303 |
if ('index.php' === $pagenow || ( $pagenow == 'admin.php' && in_array(sanitize_key($_GET['page']), $psp_pages))) {
|
307 |
'psp_ignore_notice' => '1',
|
308 |
'action' => 'psp_delete_adminnotice',
|
309 |
'nonce' => wp_create_nonce('psp_delete_adminnotice'),
|
310 |
+
] ) ) .'" style="float:right; display:block; border:none;">'.esc_html__( 'Dismiss permanently', 'platinum-seo-pack' ) .'</a>'.'<br>'. esc_html__( 'See What has Changed in this', 'platinum-seo-pack' ).'<a href="https://techblissonline.com/platinum-wordpress-seo-plugin/#what-is-new" target="_blank" rel="noopener"> '.esc_html__( ' Version ', 'platinum-seo-pack' ).'2.3.6'.esc_html__( ' and earlier Versions!', 'platinum-seo-pack' ) .'</a>'.'<br>'.esc_html__( 'Like this Plugin? Pls. give it a rating on WordPress', 'platinum-seo-pack' ).'<a href="https://wordpress.org/support/plugin/platinum-seo-pack/reviews/#new-post" target="_blank" rel="noopener">'.esc_html__(' here','platinum-seo-pack' ).'</a>'; ?></p></strong>
|
311 |
</div>
|
312 |
<?php
|
313 |
}
|
readme.txt
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
Contributors: Rajesh Babu, Techblissonline (Rajesh)
|
3 |
Donate link: https://www.patreon.com/join/techblissonline
|
4 |
Plugin link: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
5 |
-
Tags: seo, wordpress seo,
|
6 |
Requires at least: 4.0
|
7 |
-
Tested up to: 5.
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 2.3.
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -76,6 +76,9 @@ Please read these **[FAQs](https://techblissonline.com/platinum-seo-pack-faq/)**
|
|
76 |
4. Social Settings for Facebook, Twitter, Pinterest and LinkedIn. Generates Open Grah Tags and Twitter compatible Tags.
|
77 |
|
78 |
== Changelog ==
|
|
|
|
|
|
|
79 |
= 2.3.5=
|
80 |
2021-02-27 - In focus keyword analysis, when a multiple word keyphrase is entered, the count of the phrase in content and its density was calculated wrongly. It has been corrected in this version.
|
81 |
|
2 |
Contributors: Rajesh Babu, Techblissonline (Rajesh)
|
3 |
Donate link: https://www.patreon.com/join/techblissonline
|
4 |
Plugin link: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
5 |
+
Tags: seo, wordpress seo, 301 redirects, google seo, platinum seo, redirection, schema markup, Json schema
|
6 |
Requires at least: 4.0
|
7 |
+
Tested up to: 5.7
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 2.3.6
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
76 |
4. Social Settings for Facebook, Twitter, Pinterest and LinkedIn. Generates Open Grah Tags and Twitter compatible Tags.
|
77 |
|
78 |
== Changelog ==
|
79 |
+
= 2.3.6=
|
80 |
+
2021-03-10 - Removed the meta tag added by the newly introduced robots api in wordPress 5.7. Added the ability to specify currentyear to title and description formats. You can also directly add the tag variables in the title field and the meta description field. While the title description formats allow you to add the tag variables only towards the beginning or end, you can now add the tag variables anywhere in between the meta title or description text. You can add the tag variable manually to these Platinum SEO meta fields in Post types.
|
81 |
+
|
82 |
= 2.3.5=
|
83 |
2021-02-27 - In focus keyword analysis, when a multiple word keyphrase is entered, the count of the phrase in content and its density was calculated wrongly. It has been corrected in this version.
|
84 |
|