Platinum SEO Pack - Version 2.3.8

Version Description

Download this release

Release Info

Developer Rajesh Babu
Plugin Icon 128x128 Platinum SEO Pack
Version 2.3.8
Comparing to
See all releases

Code changes from version 2.3.7 to 2.3.8

Changelog.txt CHANGED
@@ -1,5 +1,8 @@
 
 
 
1
  = 2.3.7=
2
- 2021-04-24 - Platinum SEO is now integrated with WordPress REST API. You can now GET the SEO meta data for any Post/Page?Taxonomy/Home from the plugin asa filed psp_head included in responses to requests via the built-in WordPress REST API Enpoints like those for Posts, Types, etc. The other way to retrieve the SEO meta data is through the plugin's own custom Endpoint. You may find the details in the blog post.
3
 
4
  = 2.3.6=
5
  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.
1
+ = 2.3.8=
2
+ 2021-04-27 - A change has been made to accomodate JSON schema even if entered with the script tag. The plugin will sanitize and save the schema. Multiple schemas can simply be entered as comma separated script tags and the plugin will automatically combine them and use them to generate schema correctly.
3
+
4
  = 2.3.7=
5
+ 2021-04-25 - Platinum SEO is now integrated with WordPress REST API. You can now GET the SEO meta data for any Post/Page/Taxonomy/Home from the plugin as a field psp_head included in responses to requests via the built-in WordPress REST API Endpoints like those for Posts, Types, etc. The other way to retrieve the SEO meta data is through the plugin's own custom Endpoint. You may find the details in the blog post.
6
 
7
  = 2.3.6=
8
  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.
platinum-seo-pack.php CHANGED
@@ -72,7 +72,7 @@ global $psp;
72
  $psp = PspMain::get_instance();
73
 
74
  global $psp_version;
75
- $psp_version = '2.3.7';
76
 
77
  global $psp_db_version;
78
  $psp_db_version = '2.1.0';
72
  $psp = PspMain::get_instance();
73
 
74
  global $psp_version;
75
+ $psp_version = '2.3.8';
76
 
77
  global $psp_db_version;
78
  $psp_db_version = '2.1.0';
psp-include/settings/psp_settings.php CHANGED
@@ -547,14 +547,18 @@ class PspSettings {
547
 
548
  if ( isset( $settings['schema'] ) ) {
549
 
550
- $json_schema_str = ( $settings['schema'] );
 
 
 
 
551
  $schema_obj = json_decode(stripcslashes($json_schema_str));
552
  //validate it is a json object
553
  if($schema_obj === null) {
554
  // $schema_obj is null because the json cannot be decoded
555
  $settings['schema'] = '';
556
  } else {
557
- $settings['schema'] = sanitize_textarea_field( htmlentities($settings['schema']) );
558
 
559
  }
560
  }
@@ -4955,6 +4959,10 @@ class PspSettings {
4955
  if ( isset( $psp_seo_data['schema_string'] ) ) {
4956
  //$psp_seo_data['schema_string'] = sanitize_textarea_field( $psp_seo_data['schema_string'] );
4957
  $json_schema_str = ($psp_seo_data['schema_string']);
 
 
 
 
4958
  //error_log("Invalid JSON ".$json_schema_str);
4959
  //validate it is a json object
4960
  $schema_obj = json_decode(stripcslashes($json_schema_str));
@@ -4963,7 +4971,7 @@ class PspSettings {
4963
  $psp_sanitized_seo_data['schema_string'] = 'Invalid JSON Schema';
4964
  //$psp_seo_data['schema_string'] = sanitize_textarea_field( $psp_seo_data['schema_string'] );
4965
  } else {
4966
- $psp_sanitized_seo_data['schema_string'] = sanitize_textarea_field( htmlentities($psp_seo_data['schema_string']) );
4967
  //$psp_seo_data['schema_string'] = 'acde';
4968
  //$psp_seo_data['schema_string'] = json_encode($psp_seo_data['schema_string']);
4969
  }
547
 
548
  if ( isset( $settings['schema'] ) ) {
549
 
550
+ $json_schema_str = ( $settings['schema'] );
551
+ $json_schema_str = strip_tags($json_schema_str, '<br>');
552
+ if ( "[" !== mb_substr($json_schema_str, 0, 1) ) {
553
+ $json_schema_str = "[". $json_schema_str."]";
554
+ }
555
  $schema_obj = json_decode(stripcslashes($json_schema_str));
556
  //validate it is a json object
557
  if($schema_obj === null) {
558
  // $schema_obj is null because the json cannot be decoded
559
  $settings['schema'] = '';
560
  } else {
561
+ $settings['schema'] = sanitize_textarea_field( htmlentities($json_schema_str) );
562
 
563
  }
564
  }
4959
  if ( isset( $psp_seo_data['schema_string'] ) ) {
4960
  //$psp_seo_data['schema_string'] = sanitize_textarea_field( $psp_seo_data['schema_string'] );
4961
  $json_schema_str = ($psp_seo_data['schema_string']);
4962
+ $json_schema_str = strip_tags($json_schema_str, '<br>');
4963
+ if ( "[" !== mb_substr($json_schema_str, 0, 1) ) {
4964
+ $json_schema_str = "[". $json_schema_str."]";
4965
+ }
4966
  //error_log("Invalid JSON ".$json_schema_str);
4967
  //validate it is a json object
4968
  $schema_obj = json_decode(stripcslashes($json_schema_str));
4971
  $psp_sanitized_seo_data['schema_string'] = 'Invalid JSON Schema';
4972
  //$psp_seo_data['schema_string'] = sanitize_textarea_field( $psp_seo_data['schema_string'] );
4973
  } else {
4974
+ $psp_sanitized_seo_data['schema_string'] = sanitize_textarea_field( htmlentities($json_schema_str) );
4975
  //$psp_seo_data['schema_string'] = 'acde';
4976
  //$psp_seo_data['schema_string'] = json_encode($psp_seo_data['schema_string']);
4977
  }
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.7";
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.8";
23
 
24
  public $sitename = "";
25
  public $sitedescription = "";
psp_main.php CHANGED
@@ -299,14 +299,14 @@ class PspMain {
299
  $user_id = get_current_user_id();
300
  // Add the meta so that the notice is permanently dismissed.
301
  //delete_user_meta( $user_id, 'psp_ignore_notice_v_209' );
302
- update_user_meta( $user_id, 'psp_ignore_notice', "v_237" );
303
  };
304
  };
305
  }
306
 
307
  public function platinum_seo_admin_notice__success() {
308
  $user_id = get_current_user_id();
309
- if ( "v_237" === trim(get_user_meta( $user_id, 'psp_ignore_notice', true ) )) return;
310
  global $pagenow;
311
  $psp_pages = array('platinum-seo-social-pack-by-techblissonline', 'psp-social-by-techblissonline', 'psp-tools-by-techblissonline', 'pspp-licenses');
312
  if ('index.php' === $pagenow || ( $pagenow == 'admin.php' && in_array(sanitize_key($_GET['page']), $psp_pages))) {
@@ -316,7 +316,7 @@ class PspMain {
316
  'psp_ignore_notice' => '1',
317
  'action' => 'psp_delete_adminnotice',
318
  'nonce' => wp_create_nonce('psp_delete_adminnotice'),
319
- ] ) ) .'" 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.7'.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>
320
  </div>
321
  <?php
322
  }
@@ -1841,7 +1841,7 @@ class PspMain {
1841
  return;
1842
  }
1843
 
1844
- if ( $psp_version == "2.3.7") {
1845
  $psp_settings = get_option("psp_sitewide_settings");
1846
  if ( !isset($psp_settings['enable_schema']) || empty($psp_settings['enable_schema']) ) $psp_settings['enable_schema'] = 1;
1847
  if ( !isset($psp_settings['enable_psp']) || empty($psp_settings['enable_psp']) ) $psp_settings['enable_psp'] = 1;
299
  $user_id = get_current_user_id();
300
  // Add the meta so that the notice is permanently dismissed.
301
  //delete_user_meta( $user_id, 'psp_ignore_notice_v_209' );
302
+ update_user_meta( $user_id, 'psp_ignore_notice', "v_238" );
303
  };
304
  };
305
  }
306
 
307
  public function platinum_seo_admin_notice__success() {
308
  $user_id = get_current_user_id();
309
+ if ( "v_238" === trim(get_user_meta( $user_id, 'psp_ignore_notice', true ) )) return;
310
  global $pagenow;
311
  $psp_pages = array('platinum-seo-social-pack-by-techblissonline', 'psp-social-by-techblissonline', 'psp-tools-by-techblissonline', 'pspp-licenses');
312
  if ('index.php' === $pagenow || ( $pagenow == 'admin.php' && in_array(sanitize_key($_GET['page']), $psp_pages))) {
316
  'psp_ignore_notice' => '1',
317
  'action' => 'psp_delete_adminnotice',
318
  'nonce' => wp_create_nonce('psp_delete_adminnotice'),
319
+ ] ) ) .'" 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.8'.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>
320
  </div>
321
  <?php
322
  }
1841
  return;
1842
  }
1843
 
1844
+ if ( $psp_version == "2.3.8") {
1845
  $psp_settings = get_option("psp_sitewide_settings");
1846
  if ( !isset($psp_settings['enable_schema']) || empty($psp_settings['enable_schema']) ) $psp_settings['enable_schema'] = 1;
1847
  if ( !isset($psp_settings['enable_psp']) || empty($psp_settings['enable_psp']) ) $psp_settings['enable_psp'] = 1;
readme.txt CHANGED
@@ -4,9 +4,9 @@ Donate link: https://www.patreon.com/join/techblissonline
4
  Plugin link: https://techblissonline.com/wordpress-seo/
5
  Tags: seo, wordpress seo, 301 redirects, xml sitemap, schema, 404 Errors, Redirection, content analysis
6
  Requires at least: 4.0
7
- Tested up to: 5.7
8
  Requires PHP: 5.6
9
- Stable tag: 2.3.7
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -99,8 +99,11 @@ Please read these **[FAQs](https://techblissonline.com/platinum-seo-pack-faq/)**
99
  4. Social Settings for Facebook, Twitter, Pinterest and LinkedIn. Generates Open Grah Tags and Twitter compatible Tags.
100
 
101
  == Changelog ==
 
 
 
102
  = 2.3.7=
103
- 2021-04-24 - Platinum SEO is now integrated with WordPress REST API. You can now GET the SEO meta data for any Post/Page?Taxonomy/Home from the plugin asa filed psp_head included in responses to requests via the built-in WordPress REST API Enpoints like those for Posts, Types, etc. The other way to retrieve the SEO meta data is through the plugin's own custom Endpoint. You may find the details in the blog post.
104
 
105
  = 2.3.6=
106
  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.
4
  Plugin link: https://techblissonline.com/wordpress-seo/
5
  Tags: seo, wordpress seo, 301 redirects, xml sitemap, schema, 404 Errors, Redirection, content analysis
6
  Requires at least: 4.0
7
+ Tested up to: 5.7.1
8
  Requires PHP: 5.6
9
+ Stable tag: 2.3.8
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
99
  4. Social Settings for Facebook, Twitter, Pinterest and LinkedIn. Generates Open Grah Tags and Twitter compatible Tags.
100
 
101
  == Changelog ==
102
+ = 2.3.8=
103
+ 2021-04-27 - A change has been made to accomodate JSON schema even if entered with the script tag. The plugin will sanitize and save the schema. Multiple schemas can simply be entered as comma separated script tags and the plugin will automatically combine them and use them to generate schema correctly.
104
+
105
  = 2.3.7=
106
+ 2021-04-25 - Platinum SEO is now integrated with WordPress REST API. You can now GET the SEO meta data for any Post/Page/Taxonomy/Home from the plugin as a field psp_head included in responses to requests via the built-in WordPress REST API Endpoints like those for Posts, Types, etc. The other way to retrieve the SEO meta data is through the plugin's own custom Endpoint. You may find the details in the blog post.
107
 
108
  = 2.3.6=
109
  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.