Platinum SEO Pack - Version 2.2.7

Version Description

2020-12-23 - in the export import utility, added a message to indicate the number of rows imported. This will help users to know whether all the rows in the file have been imported. Further, added translational options for the various headers and messages.

Download this release

Release Info

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

Code changes from version 2.2.6 to 2.2.7

Changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 2.2.6 =
2
  2020-12-20 - The plugin now has an Export/Import Utility to export Platinum SEO Options (Sitewide Settings) and platinum SEO Meta Data (of all Post types). You may find this utility in Platinum SEO and social Pack -> Tools.
3
 
1
+ = 2.2.7 =
2
+ 2020-12-23 - in the export import utility, added a message to indicate the number of rows imported. This will help users to know whether all the rows in the file have been imported. Further, added translational options for the various headers and messages.
3
+
4
  = 2.2.6 =
5
  2020-12-20 - The plugin now has an Export/Import Utility to export Platinum SEO Options (Sitewide Settings) and platinum SEO Meta Data (of all Post types). You may find this utility in Platinum SEO and social Pack -> Tools.
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.2.6
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.2.7
8
  Author: Techblissonline.com (Rajesh)
9
  Author URI: https://techblissonline.com/
10
  Text Domain: platinum-seo-pack
psp-include/settings/psp_tools_renderer.php CHANGED
@@ -18,36 +18,55 @@ do {
18
 
19
  $psp_meta_file_uploaded = false;
20
  $psp_options_file_uploaded = false;
21
- if( isset($_FILES['pspmetafile']) && strpos( $_FILES['pspmetafile']['name'], 'platinumseometa' ) !== false) {
 
 
 
 
 
 
 
22
 
23
- if (!isset( $_POST['psp_import_meta_nonce'] ) || !wp_verify_nonce( sanitize_key($_POST['psp_import_meta_nonce']), 'do_psp_importmeta_action' )) {
24
-
25
- //raise error;
26
- $message = esc_html__( 'The nonce key does not exist or validate. Import of Meta Data Failed!' , 'platinum-seo-pack');
27
- add_settings_error('psp_tools_renderer', 'nonce_error', esc_html($message), 'error');
28
- break;
29
- }
30
- $psp_meta_file_uploaded = 'pspmetafile';
 
 
31
 
32
  }
33
- if( isset($_FILES['optionsfile']) && strpos( $_FILES['optionsfile']['name'], 'platinumseooptions' ) !== false) {
 
 
 
 
 
34
 
35
- if (!isset( $_POST['psp_import_options_nonce'] ) || !wp_verify_nonce( sanitize_key($_POST['psp_import_options_nonce']), 'do_psp_importoptions_action' )) {
36
-
37
- //raise error;
38
- $message = esc_html__( 'The nonce key does not exist or validate. Import of Options Data Failed!' , 'platinum-seo-pack');
39
- add_settings_error('psp_tools_renderer', 'nonce_error', esc_html($message), 'error');
40
- break;
41
- }
42
- $psp_options_file_uploaded = 'optionsfile';
 
 
43
 
44
  }
45
 
46
  $options_file_type = [];
47
  if ($psp_options_file_uploaded) {
48
- $options_file_type = wp_check_filetype($_FILES['optionsfile']['name']);
 
 
49
  } else if ($psp_meta_file_uploaded) {
50
- $options_file_type = wp_check_filetype($_FILES['pspmetafile']['name']);
 
51
  } else {
52
  //raise error;
53
  $message = esc_html__( 'The file you are trying to upload should have the same name and be of the same type as the exported file. Import Failed!' , 'platinum-seo-pack');
@@ -168,7 +187,7 @@ do {
168
  $psp_query .= implode(', ', $place_holders);
169
  $wpdb->query( $wpdb->prepare("$psp_query", $psp_values));
170
 
171
- $message = esc_html__( 'Platinum SEO Meta Data successfully imported!' , 'platinum-seo-pack');
172
  add_settings_error('psp_tools_renderer', 'success', esc_html( $message), 'success');
173
  break;
174
  } else if ($psp_options_file_uploaded) {
@@ -178,14 +197,22 @@ do {
178
  $psp_query .= implode(', ', $place_holders);
179
  $wpdb->query( $wpdb->prepare("$psp_query", $psp_values));
180
 
181
- $message = esc_html__( 'Platinum SEO Options Data successfully imported!' , 'platinum-seo-pack');
182
  add_settings_error('psp_tools_renderer', 'success', esc_html( $message), 'success');
183
  break;
184
 
185
  }
186
  }
 
 
187
 
188
- }
 
 
 
 
 
 
189
  } while (0);
190
  settings_errors( 'psp_tools_renderer' );
191
  ?>
@@ -196,11 +223,11 @@ settings_errors( 'psp_tools_renderer' );
196
  <div class="clearfix"></div>
197
 
198
  <div class="container bg-info" id="header" style="width:90%">
199
- <h2 class="btn-success"> Import Platinum SEO Data </h2>
200
- <h4 class="col-sm-12"> Import Platinum SEO Options Data </h4>
201
  <form action="" method="post" enctype="multipart/form-data">
202
  <div class="form-group">
203
- <div class="col-sm-2"><h4>Select csv File to Upload:</h4> </div>
204
  <div class="col-sm-10">
205
  <input type="file" class="form-control" name="optionsfile" id="optionsfile"/>
206
  </div>
@@ -215,10 +242,10 @@ settings_errors( 'psp_tools_renderer' );
215
  wp_nonce_field( 'do_psp_importoptions_action', 'psp_import_options_nonce' );
216
  ?>
217
  </form>
218
- <h4 class="col-sm-12"> Import Platinum SEO Meta Data </h4>
219
  <form action="" method="post" enctype="multipart/form-data">
220
  <div class="form-group">
221
- <div class="col-sm-2"><h4>Select csv File to Upload:</h4> </div>
222
  <div class="col-sm-10">
223
  <input type="file" class="form-control" name="pspmetafile" id="pspmetafile"/>
224
  </div>
@@ -226,7 +253,7 @@ settings_errors( 'psp_tools_renderer' );
226
  <div class="form-group">
227
  <div class="col-sm-offset-2 col-sm-10">
228
  <input type="hidden" value="wp_handle_upload" name="action" />
229
- <input type="submit" value="<?php _e('Submit'); ?>" name="submitit" class="btn btn-success" />
230
  </div>
231
  </div>
232
  <?php
@@ -236,11 +263,11 @@ settings_errors( 'psp_tools_renderer' );
236
  </div>
237
  <div class="clearfix"></div>
238
  <div class="container bg-info" id="header" style="width:90%">
239
- <h2 class="btn-success"> Export Platinum SEO Data </h2>
240
  <div class="clearfix"></div>
241
  <br />
242
  <div class="row vertical-align">
243
- <div class="col-sm-6"><h4>Export Platinum SEO Meta Data:</h4> </div>
244
  <div class="col-sm-6">
245
  <a href="<?php echo admin_url( 'admin.php?page=psp-seo-tools-by-techblissonline' ) ?>&action=psp_meta_download_csv&_wpnonce=<?php echo wp_create_nonce( 'psp_meta_download_csv' )?>" class="btn btn-default btn-success"><?php _e('Export to CSV','platinum-seo-pack');?></a>
246
  </div>
@@ -248,7 +275,7 @@ settings_errors( 'psp_tools_renderer' );
248
  <div class="clearfix"></div>
249
  <br />
250
  <div class="row vertical-align">
251
- <div class="col-sm-6"><h4>Export Platinum SEO Option Data:</h4> </div>
252
  <div class="col-sm-6">
253
  <a href="<?php echo admin_url( 'admin.php?page=psp-seo-tools-by-techblissonline' ) ?>&action=psp_options_download_csv&_wpnonce=<?php echo wp_create_nonce( 'psp_options_download_csv' )?>" class="btn btn-default btn-success"><?php _e('Export to CSV','platinum-seo-pack');?></a>
254
  </div>
@@ -259,8 +286,8 @@ settings_errors( 'psp_tools_renderer' );
259
 
260
 
261
  <div class="container bg-success" id="header" style="width:90%">
262
- <h1 class="btn-success"> Tools </h1>
263
- <p> These are premium tools available as SaaS on Techblissonline.com. You can subscribe to them for just 9$ Google NLP Entity Analyser is available for subscribers who pay 14$. If you buy Platinum SEO Premium, you get a free subscription to use these Tools for one month. Subscribe <a href="https://techblissonline.com/tools/" target="_blank">here</a></p>
264
  </div>
265
  <div class="clearfix"></div>
266
  <div class="container-fluid bg-info form-group" id="tools" style="width:90%">
18
 
19
  $psp_meta_file_uploaded = false;
20
  $psp_options_file_uploaded = false;
21
+ $psp_filename = "";
22
+ //sanitize_file_name($_FILES['pspmetafile']['name']);
23
+ //if( isset($_FILES['pspmetafile']) && strpos( sanitize_file_name($_FILES['pspmetafile']['name']), 'platinumseometa' ) !== false) {
24
+ if( isset($_FILES['pspmetafile']) ) {
25
+
26
+ $psp_filename = sanitize_file_name($_FILES['pspmetafile']['name']);
27
+
28
+ if ( strpos( $psp_filename, 'platinumseometa' ) !== false ) {
29
 
30
+ if (!isset( $_POST['psp_import_meta_nonce'] ) || !wp_verify_nonce( sanitize_key($_POST['psp_import_meta_nonce']), 'do_psp_importmeta_action' )) {
31
+
32
+ //raise error;
33
+ $message = esc_html__( 'The nonce key does not exist or validate. Import of Meta Data Failed!' , 'platinum-seo-pack');
34
+ add_settings_error('psp_tools_renderer', 'nonce_error', esc_html($message), 'error');
35
+ break;
36
+ }
37
+ $psp_meta_file_uploaded = 'pspmetafile';
38
+
39
+ }
40
 
41
  }
42
+ //if( isset($_FILES['optionsfile']) && strpos( sanitize_file_name( $_FILES['optionsfile']['name'] ), 'platinumseooptions' ) !== false) {
43
+ if( isset($_FILES['optionsfile']) ) {
44
+
45
+ $psp_filename = sanitize_file_name($_FILES['optionsfile']['name']);
46
+
47
+ if ( strpos( $psp_filename, 'platinumseooptions' ) !== false ) {
48
 
49
+ if (!isset( $_POST['psp_import_options_nonce'] ) || !wp_verify_nonce( sanitize_key($_POST['psp_import_options_nonce']), 'do_psp_importoptions_action' )) {
50
+
51
+ //raise error;
52
+ $message = esc_html__( 'The nonce key does not exist or validate. Import of Options Data Failed!' , 'platinum-seo-pack');
53
+ add_settings_error('psp_tools_renderer', 'nonce_error', esc_html($message), 'error');
54
+ break;
55
+ }
56
+ $psp_options_file_uploaded = 'optionsfile';
57
+
58
+ }
59
 
60
  }
61
 
62
  $options_file_type = [];
63
  if ($psp_options_file_uploaded) {
64
+ //$options_file_type = wp_check_filetype($_FILES['optionsfile']['name']);
65
+ $options_file_type = wp_check_filetype( $psp_filename );
66
+
67
  } else if ($psp_meta_file_uploaded) {
68
+ //$options_file_type = wp_check_filetype($_FILES['pspmetafile']['name']);
69
+ $options_file_type = wp_check_filetype( $psp_filename );
70
  } else {
71
  //raise error;
72
  $message = esc_html__( 'The file you are trying to upload should have the same name and be of the same type as the exported file. Import Failed!' , 'platinum-seo-pack');
187
  $psp_query .= implode(', ', $place_holders);
188
  $wpdb->query( $wpdb->prepare("$psp_query", $psp_values));
189
 
190
+ $message = esc_html__( 'Platinum SEO Meta Data of '. count($place_holders) . ' Rows successfully imported!', 'platinum-seo-pack');
191
  add_settings_error('psp_tools_renderer', 'success', esc_html( $message), 'success');
192
  break;
193
  } else if ($psp_options_file_uploaded) {
197
  $psp_query .= implode(', ', $place_holders);
198
  $wpdb->query( $wpdb->prepare("$psp_query", $psp_values));
199
 
200
+ $message = esc_html__( 'Platinum SEO Options Data of '. count($place_holders) . ' Rows successfully imported!', 'platinum-seo-pack');
201
  add_settings_error('psp_tools_renderer', 'success', esc_html( $message), 'success');
202
  break;
203
 
204
  }
205
  }
206
+
207
+ unlink( $file['file'] );
208
 
209
+ } else {
210
+
211
+ //raise error;
212
+ //$message = esc_html__( 'No file had been selected to upload!' , 'platinum-seo-pack');
213
+ //add_settings_error('psp_tools_renderer', 'nonce_error', esc_html($message), 'error');
214
+ //break;
215
+ }
216
  } while (0);
217
  settings_errors( 'psp_tools_renderer' );
218
  ?>
223
  <div class="clearfix"></div>
224
 
225
  <div class="container bg-info" id="header" style="width:90%">
226
+ <h2 class="btn-success"> <?php esc_html_e('Import Platinum SEO Data', 'platinum-seo-pack'); ?> </h2>
227
+ <h4 class="col-sm-12"> <?php esc_html_e('Import Platinum SEO Options Data', 'platinum-seo-pack'); ?> </h4>
228
  <form action="" method="post" enctype="multipart/form-data">
229
  <div class="form-group">
230
+ <div class="col-sm-2"><h5><?php esc_html_e('Select csv File to Upload:', 'platinum-seo-pack'); ?></h5> </div>
231
  <div class="col-sm-10">
232
  <input type="file" class="form-control" name="optionsfile" id="optionsfile"/>
233
  </div>
242
  wp_nonce_field( 'do_psp_importoptions_action', 'psp_import_options_nonce' );
243
  ?>
244
  </form>
245
+ <h4 class="col-sm-12"> <?php esc_html_e('Import Platinum SEO Meta Data', 'platinum-seo-pack'); ?> </h4>
246
  <form action="" method="post" enctype="multipart/form-data">
247
  <div class="form-group">
248
+ <div class="col-sm-2"><h5><?php esc_html_e('Select csv File to Upload:', 'platinum-seo-pack'); ?></h5> </div>
249
  <div class="col-sm-10">
250
  <input type="file" class="form-control" name="pspmetafile" id="pspmetafile"/>
251
  </div>
253
  <div class="form-group">
254
  <div class="col-sm-offset-2 col-sm-10">
255
  <input type="hidden" value="wp_handle_upload" name="action" />
256
+ <input type="submit" value="<?php esc_html_e('Submit', 'platinum-seo-pack'); ?>" name="submitit" class="btn btn-success" />
257
  </div>
258
  </div>
259
  <?php
263
  </div>
264
  <div class="clearfix"></div>
265
  <div class="container bg-info" id="header" style="width:90%">
266
+ <h2 class="btn-success"> <?php esc_html_e('Export Platinum SEO Data', 'platinum-seo-pack'); ?> </h2>
267
  <div class="clearfix"></div>
268
  <br />
269
  <div class="row vertical-align">
270
+ <div class="col-sm-6"><h4><?php esc_html_e('Export Platinum SEO Meta Data:', 'platinum-seo-pack'); ?></h4> </div>
271
  <div class="col-sm-6">
272
  <a href="<?php echo admin_url( 'admin.php?page=psp-seo-tools-by-techblissonline' ) ?>&action=psp_meta_download_csv&_wpnonce=<?php echo wp_create_nonce( 'psp_meta_download_csv' )?>" class="btn btn-default btn-success"><?php _e('Export to CSV','platinum-seo-pack');?></a>
273
  </div>
275
  <div class="clearfix"></div>
276
  <br />
277
  <div class="row vertical-align">
278
+ <div class="col-sm-6"><h4><?php esc_html_e('Export Platinum SEO Option Data:', 'platinum-seo-pack'); ?></h4> </div>
279
  <div class="col-sm-6">
280
  <a href="<?php echo admin_url( 'admin.php?page=psp-seo-tools-by-techblissonline' ) ?>&action=psp_options_download_csv&_wpnonce=<?php echo wp_create_nonce( 'psp_options_download_csv' )?>" class="btn btn-default btn-success"><?php _e('Export to CSV','platinum-seo-pack');?></a>
281
  </div>
286
 
287
 
288
  <div class="container bg-success" id="header" style="width:90%">
289
+ <h1 class="btn-success"> <?php esc_html_e('Tools', 'platinum-seo-pack'); ?> </h1>
290
+ <p> <?php echo esc_html__('These are premium tools available as SaaS on Techblissonline.com. You can subscribe to them for just 9$ Google NLP Entity Analyser is available for subscribers who pay 14$. If you buy Platinum SEO Premium, you get a free subscription to use these Tools for one month. Subscribe ', 'platinum-seo-pack').' <a href="https://techblissonline.com/tools/" target="_blank" rel="noopener">'.esc_html__('here', 'platinum-seo-pack').'</a>'; ?></p>
291
  </div>
292
  <div class="clearfix"></div>
293
  <div class="container-fluid bg-info form-group" id="tools" style="width:90%">
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.2.6";
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.2.7";
23
 
24
  public $sitename = "";
25
  public $sitedescription = "";
psp_main.php CHANGED
@@ -287,14 +287,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', "v_226" );
291
  };
292
  };
293
  }
294
 
295
  public function platinum_seo_admin_notice__success() {
296
  $user_id = get_current_user_id();
297
- if ( "v_226" === trim(get_user_meta( $user_id, 'psp_ignore_notice', true ) )) return;
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 +304,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.2.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>
308
  </div>
309
  <?php
310
  }
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', "v_227" );
291
  };
292
  };
293
  }
294
 
295
  public function platinum_seo_admin_notice__success() {
296
  $user_id = get_current_user_id();
297
+ if ( "v_227" === trim(get_user_meta( $user_id, 'psp_ignore_notice', true ) )) return;
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
  '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.2.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>
308
  </div>
309
  <?php
310
  }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: seo, wordpress seo, plugin, google seo, platinum seo, schema, schema marku
6
  Requires at least: 4.0
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
9
- Stable tag: 2.2.6
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -75,6 +75,9 @@ Please read these **[FAQs](https://techblissonline.com/platinum-seo-pack-faq/)**
75
  4. Social Settings for Facebook, Twitter, Pinterest and LinkedIn. Generates Open Grah Tags and Twitter compatible Tags.
76
 
77
  == Changelog ==
 
 
 
78
  = 2.2.6 =
79
  2020-12-20 - The plugin now has an Export/Import Utility to export Platinum SEO Options (Sitewide Settings) and platinum SEO Meta Data (of all Post types). You may find this utility in Platinum SEO and social Pack -> Tools.
80
 
6
  Requires at least: 4.0
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
9
+ Stable tag: 2.2.7
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
75
  4. Social Settings for Facebook, Twitter, Pinterest and LinkedIn. Generates Open Grah Tags and Twitter compatible Tags.
76
 
77
  == Changelog ==
78
+ = 2.2.7 =
79
+ 2020-12-23 - in the export import utility, added a message to indicate the number of rows imported. This will help users to know whether all the rows in the file have been imported. Further, added translational options for the various headers and messages.
80
+
81
  = 2.2.6 =
82
  2020-12-20 - The plugin now has an Export/Import Utility to export Platinum SEO Options (Sitewide Settings) and platinum SEO Meta Data (of all Post types). You may find this utility in Platinum SEO and social Pack -> Tools.
83