Platinum SEO Pack - Version 2.3.1

Version Description

Download this release

Release Info

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

Code changes from version 2.3.0 to 2.3.1

Changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 2.3.0=
2
  2021-01-12 - Made the Bulk Editor to retrieve only Builtin and Custom Post Types. Made similar changes to Redirections module.
3
 
1
+ = 2.3.1=
2
+ 2021-01-15 - Bulk Editor now lets you add JSON Schema to all Post types in bulk.
3
+
4
  = 2.3.0=
5
  2021-01-12 - Made the Bulk Editor to retrieve only Builtin and Custom Post Types. Made similar changes to Redirections module.
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.0
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.1
8
  Author: Techblissonline.com (Rajesh)
9
  Author URI: https://techblissonline.com/
10
  Text Domain: platinum-seo-pack
psp-include/settings/js/cm-bulkeditor.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ if( $('.pspjsoneditor').length ) {
3
+ //if (typeof psp_cm_bulkeditor_json_settings != "undefined") {
4
+ var editorSchemaSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
5
+ editorSchemaSettings.codemirror = _.extend(
6
+ {},
7
+ editorSchemaSettings.codemirror,
8
+ {
9
+ autorefresh: true,
10
+ matchBrackets: true,
11
+ autoCloseBrackets: true,
12
+ mode: "application/ld+json",
13
+ lineWrapping: true
14
+ }
15
+ );
16
+ $(".pspjsoneditor").each(function() {
17
+ var cm_json_editor = wp.codeEditor.initialize( $(this), editorSchemaSettings );
18
+ });
19
+
20
+ //}
21
+ }
22
+ });
psp-include/settings/js/psp-bulkedit.js CHANGED
@@ -117,6 +117,14 @@ jQuery(document).ready(function($) {
117
  $btn = $(".psp_data_update-loader");
118
  $id = $(this).closest('tr').attr('id');
119
 
 
 
 
 
 
 
 
 
120
  if (this.name == "psp_title") {
121
  //alert ("title " + this.name);
122
  $value = $("input#editabletext-"+$id).val();
117
  $btn = $(".psp_data_update-loader");
118
  $id = $(this).closest('tr').attr('id');
119
 
120
+ if (this.name == "psp_schema") {
121
+ $('.CodeMirror').each(function(i, el){
122
+ el.CodeMirror.save();
123
+ });
124
+ }
125
+
126
+ //if (window['cm_json_editor'+$id]) window['cm_json_editor'+$id].codemirror.save();
127
+
128
  if (this.name == "psp_title") {
129
  //alert ("title " + this.name);
130
  $value = $("input#editabletext-"+$id).val();
psp-include/settings/psp_bulk_edit_renderer.php CHANGED
@@ -7,6 +7,11 @@ Author URI: http://techblissonline.com/
7
  */
8
  ?>
9
  <?php
 
 
 
 
 
10
  $psp_bulkedit_meta_nonce = wp_create_nonce( 'psp_bulkedit_meta_nonce' );
11
  wp_enqueue_script( 'psp-ajax-bulkedit-script', plugins_url( 'settings/js/psp-bulkedit.js', PSP_PLUGIN_SETTINGS_URL ), array('jquery'), '2.2.9' );
12
  wp_localize_script( 'psp-ajax-bulkedit-script', 'psp_ajax_bulkeditor_object', array( 'bedit_ajax_url' => admin_url( 'admin-ajax.php'), 'pspbeditnonce' => $psp_bulkedit_meta_nonce) );
@@ -15,6 +20,7 @@ Author URI: http://techblissonline.com/
15
  wp_enqueue_style("psp-settings-bs-css", plugins_url( 'settings/css/psp-settings-bs.css', PSP_PLUGIN_SETTINGS_URL ));
16
  wp_enqueue_style("psp-settings-css", plugins_url( 'settings/css/psp-settings.css', PSP_PLUGIN_SETTINGS_URL ));
17
  //wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ), array(), '2.2.1');
 
18
  ?>
19
  <style>
20
  .page-numbers {
@@ -77,7 +83,7 @@ a.check:hover {
77
 
78
  <input type="hidden" name="page" id="page" value="psp-tools-by-techblissonline">
79
  <div id="pspmetatypes" class="alignleft">
80
- <strong><?php echo "Edit " ?></strong><select id="psp_meta_type" name="psp_meta_type"><?php $dditems = array('' => 'SEO Title', 'description' => 'Meta Description');
81
  foreach($dditems as $key => $val) {
82
  $selected = (isset($_GET['psp_meta_type']) && $_GET['psp_meta_type']==$key) ? 'selected="selected"' : '';
83
  echo "<option value='".esc_attr($key)."' ".esc_attr($selected).">".esc_html($val)."</option>";
@@ -138,8 +144,10 @@ a.check:hover {
138
 
139
  wp_nonce_field( 'do_psp_posts_bulkedit_title', 'psp_posts_bulkedit_title_nonce' );
140
 
141
- } else {
142
  wp_nonce_field( 'do_psp_posts_bulkedit_desc', 'psp_posts_bulkedit_desc_nonce' );
 
 
143
  }
144
  ?>
145
  <div class="tablenav">
@@ -188,8 +196,10 @@ a.check:hover {
188
  <th scope="col" class="psptht">WordPress Title</th>
189
  <?php if (empty($psp_meta_type)) { ?>
190
  <th scope="col" class="pspthe">Techblissonline Platinum SEO Title</th>
191
- <?php } else { ?>
192
- <th scope="col" class="pspthe">Techblissonline Platinum SEO Meta Description</th>
 
 
193
  <?php } ?>
194
  <th scope="col" class="pspth"></th>
195
  </tr>
@@ -207,8 +217,16 @@ a.check:hover {
207
  $psp_post_name = !empty( $bad_link->psp_post_name) ? $bad_link->psp_post_name : '';
208
  if (empty($psp_meta_type)) {
209
  $psp_editable_text = !empty( $bad_link->psp_title) ? esc_attr($bad_link->psp_title) : '';
210
- } else {
211
- $psp_editable_text = !empty( $bad_link->psp_description) ? esc_textarea($bad_link->psp_description) : '';
 
 
 
 
 
 
 
 
212
  }
213
 
214
  $class = 'alternate' == $class ? '' : 'alternate';
@@ -220,10 +238,13 @@ a.check:hover {
220
  <?php if (empty($psp_meta_type)) { ?>
221
  <td><div class='editdiv' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' - '; ?></div><input type='text' class='editabletext' value='<?php echo $psp_editable_text; ?>' id='editabletext-<?php echo $psp_id; ?>' ></td>
222
  <td><div class="psp-bs alignright"><input style="display:block;margin:auto" name="psp_title" id="psp_data_update_<?php echo $psp_id; ?>" class="psp_meta_updater_btn btn btn-success" type="btn" value="Update" /><p id ="loader-<?php echo $psp_id; ?>" class="psp_data_update-loader hidden"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-video-loader.gif'; ?>" class="img-responsive" alt="updating..."/></p></div><br /><span id="updatedmsg-<?php echo $psp_id; ?>" class="pspmsg"></span></td>
223
- <?php } else { ?>
224
  <td><div class='editdiv' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' - '; ?></div><textarea id=<?php echo 'editabletextarea-'.$psp_id ?> type='text' class='editabletextarea' id='editabletext_<?php echo $psp_id; ?>' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' '; ?></textarea></td>
225
  <td><div class="psp-bs alignright"><input style="display:block;margin:auto" name="psp_description" id="psp_data_update_<?php echo $psp_id; ?>" class="psp_meta_updater_btn btn btn-success" type="btn" value="Update" /><p id ="loader-<?php echo $psp_id; ?>" class="psp_data_update-loader hidden"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-video-loader.gif'; ?>" class="img-responsive" alt="updating..."/></p></div><br /><span id="updatedmsg-<?php echo $psp_id; ?>" class="pspmsg"></span></td>
226
- <?php } ?>
 
 
 
227
  </tr>
228
  <?php } ?>
229
  </tbody>
7
  */
8
  ?>
9
  <?php
10
+ if ($psp_meta_type == "schema" ) {
11
+ $psp_cm_bulkeditor_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
12
+ wp_enqueue_script( 'psp-bulkeditor-cm-editors', plugins_url( '/js/cm-bulkeditor.js', __FILE__ ),array( 'jquery' ), '2.3.1', true);
13
+ wp_localize_script('psp-bulkeditor-cm-editors', 'psp_cm_bulkeditor_json_settings', $psp_cm_bulkeditor_json_settings);
14
+ }
15
  $psp_bulkedit_meta_nonce = wp_create_nonce( 'psp_bulkedit_meta_nonce' );
16
  wp_enqueue_script( 'psp-ajax-bulkedit-script', plugins_url( 'settings/js/psp-bulkedit.js', PSP_PLUGIN_SETTINGS_URL ), array('jquery'), '2.2.9' );
17
  wp_localize_script( 'psp-ajax-bulkedit-script', 'psp_ajax_bulkeditor_object', array( 'bedit_ajax_url' => admin_url( 'admin-ajax.php'), 'pspbeditnonce' => $psp_bulkedit_meta_nonce) );
20
  wp_enqueue_style("psp-settings-bs-css", plugins_url( 'settings/css/psp-settings-bs.css', PSP_PLUGIN_SETTINGS_URL ));
21
  wp_enqueue_style("psp-settings-css", plugins_url( 'settings/css/psp-settings.css', PSP_PLUGIN_SETTINGS_URL ));
22
  //wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ), array(), '2.2.1');
23
+
24
  ?>
25
  <style>
26
  .page-numbers {
83
 
84
  <input type="hidden" name="page" id="page" value="psp-tools-by-techblissonline">
85
  <div id="pspmetatypes" class="alignleft">
86
+ <strong><?php echo "Edit " ?></strong><select id="psp_meta_type" name="psp_meta_type"><?php $dditems = array('' => 'SEO Title', 'description' => 'Meta Description', 'schema' => 'JSON Schema');
87
  foreach($dditems as $key => $val) {
88
  $selected = (isset($_GET['psp_meta_type']) && $_GET['psp_meta_type']==$key) ? 'selected="selected"' : '';
89
  echo "<option value='".esc_attr($key)."' ".esc_attr($selected).">".esc_html($val)."</option>";
144
 
145
  wp_nonce_field( 'do_psp_posts_bulkedit_title', 'psp_posts_bulkedit_title_nonce' );
146
 
147
+ } else if ( $psp_meta_type == "description" ){
148
  wp_nonce_field( 'do_psp_posts_bulkedit_desc', 'psp_posts_bulkedit_desc_nonce' );
149
+ } else if ( $psp_meta_type == "schema" ){
150
+ wp_nonce_field( 'do_psp_posts_bulkedit_schema', 'psp_posts_bulkedit_schema_nonce' );
151
  }
152
  ?>
153
  <div class="tablenav">
196
  <th scope="col" class="psptht">WordPress Title</th>
197
  <?php if (empty($psp_meta_type)) { ?>
198
  <th scope="col" class="pspthe">Techblissonline Platinum SEO Title</th>
199
+ <?php } else if ($psp_meta_type == "description" ) { ?>
200
+ <th scope="col" class="pspthe">Techblissonline Platinum SEO Meta Description</th>
201
+ <?php } else if ($psp_meta_type == "schema" ) { ?>
202
+ <th scope="col" class="pspthe">Techblissonline Platinum SEO JSON Schema</th>
203
  <?php } ?>
204
  <th scope="col" class="pspth"></th>
205
  </tr>
217
  $psp_post_name = !empty( $bad_link->psp_post_name) ? $bad_link->psp_post_name : '';
218
  if (empty($psp_meta_type)) {
219
  $psp_editable_text = !empty( $bad_link->psp_title) ? esc_attr($bad_link->psp_title) : '';
220
+ } else if ($psp_meta_type == "description" ) {
221
+ $psp_editable_text = !empty( $bad_link->psp_description) ? esc_textarea($bad_link->psp_description) : '';
222
+ } else if ($psp_meta_type == "schema" ) {
223
+ $json_schema_string = !empty( $bad_link->psp_schema) ? html_entity_decode(stripcslashes(esc_attr($bad_link->psp_schema))) : '';
224
+ //validate it is a json object
225
+ $schema_obj = json_decode($json_schema_string);
226
+ if($schema_obj === null) {
227
+ $json_schema_string = 'Invalid JSON Schema';
228
+ }
229
+ $psp_editable_text = stripcslashes($json_schema_string);
230
  }
231
 
232
  $class = 'alternate' == $class ? '' : 'alternate';
238
  <?php if (empty($psp_meta_type)) { ?>
239
  <td><div class='editdiv' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' - '; ?></div><input type='text' class='editabletext' value='<?php echo $psp_editable_text; ?>' id='editabletext-<?php echo $psp_id; ?>' ></td>
240
  <td><div class="psp-bs alignright"><input style="display:block;margin:auto" name="psp_title" id="psp_data_update_<?php echo $psp_id; ?>" class="psp_meta_updater_btn btn btn-success" type="btn" value="Update" /><p id ="loader-<?php echo $psp_id; ?>" class="psp_data_update-loader hidden"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-video-loader.gif'; ?>" class="img-responsive" alt="updating..."/></p></div><br /><span id="updatedmsg-<?php echo $psp_id; ?>" class="pspmsg"></span></td>
241
+ <?php } else if ($psp_meta_type == "description") { ?>
242
  <td><div class='editdiv' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' - '; ?></div><textarea id=<?php echo 'editabletextarea-'.$psp_id ?> type='text' class='editabletextarea' id='editabletext_<?php echo $psp_id; ?>' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' '; ?></textarea></td>
243
  <td><div class="psp-bs alignright"><input style="display:block;margin:auto" name="psp_description" id="psp_data_update_<?php echo $psp_id; ?>" class="psp_meta_updater_btn btn btn-success" type="btn" value="Update" /><p id ="loader-<?php echo $psp_id; ?>" class="psp_data_update-loader hidden"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-video-loader.gif'; ?>" class="img-responsive" alt="updating..."/></p></div><br /><span id="updatedmsg-<?php echo $psp_id; ?>" class="pspmsg"></span></td>
244
+ <?php } else if ($psp_meta_type == "schema") { ?>
245
+ <td><div class='editdiv' ><?php echo !empty($psp_editable_text) ? ($psp_editable_text) : ' - '; ?></div><div class='pspeditor'><textarea id=<?php echo 'editabletextarea-'.$psp_id ?> type='text' class='editabletextarea pspjsoneditor' id='editabletext_<?php echo $psp_id; ?>' ><?php echo !empty($psp_editable_text) ? esc_textarea($psp_editable_text) : ' '; ?></textarea></div></td>
246
+ <td><div class="psp-bs alignright"><input style="display:block;margin:auto" name="psp_schema" id="psp_data_update_<?php echo $psp_id; ?>" class="psp_meta_updater_btn btn btn-success" type="btn" value="Update" /><p id ="loader-<?php echo $psp_id; ?>" class="psp_data_update-loader hidden"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-video-loader.gif'; ?>" class="img-responsive" alt="updating..."/></p></div><br /><span id="updatedmsg-<?php echo $psp_id; ?>" class="pspmsg"></span></td>
247
+ <?php } ?>
248
  </tr>
249
  <?php } ?>
250
  </tbody>
psp-include/settings/psp_rolecap_settings.php CHANGED
@@ -109,10 +109,10 @@ class PspRcapSettings extends PspSettings {
109
 
110
  if ($psp_premium_valid) {
111
 
112
- $psp_capabilities = array( 'metabox' => 'Platinum SEO MetaBox', 'analysis' => 'SEO Analysis', 'advancedseo' => 'Advanced SEO', 'basicsocial' => 'Basic Social', 'advancedsocial' => 'Advanced social', 'internallinks' => 'Internal Links', 'psp_general' => 'Platinum SEO & Social Pack', 'psp_home' => 'SEO - Home', 'psp_pt' => 'SEO - PostType', 'psp_taxonomy' => 'SEO - Taxonomy', 'psp_archive' => 'SEO - Archives', 'psp_permalink' => 'SEO - Permalinks', 'psp_sitemap' => 'SEO - Sitemaps', 'psp_others' => 'SEO - Others', 'psp_breadcrumb' => 'SEO - Breadcrumbs', 'psp_social' => 'Social', 'psp_robotstxt' => 'Editors', 'importer' => 'Importers', 'redirections' => 'Redirections', 'manager404' => '404 manager', 'adminbarmenu' => 'AdminBar Menu', 'auditsettings' => 'Audit Settings', 'auditreports' => 'Audit Reports');
113
  } else {
114
 
115
- $psp_capabilities = array( 'metabox' => 'Platinum SEO MetaBox', 'analysis' => 'SEO Analysis', 'advancedseo' => 'Advanced SEO', 'basicsocial' => 'Basic Social', 'advancedsocial' => 'Advanced social', 'internallinks' => 'Internal Links', 'psp_general' => 'Platinum SEO & Social Pack', 'psp_home' => 'SEO - Home', 'psp_pt' => 'SEO - PostType', 'psp_taxonomy' => 'SEO - Taxonomy', 'psp_archive' => 'SEO - Archives', 'psp_permalink' => 'SEO - Permalinks', 'psp_sitemap' => 'SEO - Sitemaps', 'psp_others' => 'SEO - Others', 'psp_breadcrumb' => 'SEO - Breadcrumbs', 'psp_social' => 'Social', 'psp_robotstxt' => 'Editors', 'importer' => 'Importers', 'redirections' => 'Redirections', 'manager404' => '404 manager', 'adminbarmenu' => 'AdminBar Menu');
116
 
117
  }
118
 
109
 
110
  if ($psp_premium_valid) {
111
 
112
+ $psp_capabilities = array( 'metabox' => 'Platinum SEO MetaBox', 'analysis' => 'SEO Analysis', 'advancedseo' => 'Advanced SEO', 'basicsocial' => 'Basic Social', 'advancedsocial' => 'Advanced social', 'internallinks' => 'Internal Links', 'psp_general' => 'Platinum SEO & Social Pack', 'psp_home' => 'SEO - Home', 'psp_pt' => 'SEO - PostType', 'psp_taxonomy' => 'SEO - Taxonomy', 'psp_archive' => 'SEO - Archives', 'psp_permalink' => 'SEO - Permalinks', 'psp_sitemap' => 'SEO - Sitemaps', 'psp_others' => 'SEO - Others', 'psp_breadcrumb' => 'SEO - Breadcrumbs', 'psp_social' => 'Social', 'psp_robotstxt' => 'Editors', 'importer' => 'Importers', 'redirections' => 'Redirections', 'manager404' => '404 manager', 'seodatamanager' => 'Import/Export Platinum SEO Settings', 'adminbarmenu' => 'AdminBar Menu', 'auditsettings' => 'Audit Settings', 'auditreports' => 'Audit Reports');
113
  } else {
114
 
115
+ $psp_capabilities = array( 'metabox' => 'Platinum SEO MetaBox', 'analysis' => 'SEO Analysis', 'advancedseo' => 'Advanced SEO', 'basicsocial' => 'Basic Social', 'advancedsocial' => 'Advanced social', 'internallinks' => 'Internal Links', 'psp_general' => 'Platinum SEO & Social Pack', 'psp_home' => 'SEO - Home', 'psp_pt' => 'SEO - PostType', 'psp_taxonomy' => 'SEO - Taxonomy', 'psp_archive' => 'SEO - Archives', 'psp_permalink' => 'SEO - Permalinks', 'psp_sitemap' => 'SEO - Sitemaps', 'psp_others' => 'SEO - Others', 'psp_breadcrumb' => 'SEO - Breadcrumbs', 'psp_social' => 'Social', 'psp_robotstxt' => 'Editors', 'importer' => 'Importers', 'redirections' => 'Redirections', 'manager404' => '404 manager', 'seodatamanager' => 'Import/Export Platinum SEO Settings', 'adminbarmenu' => 'AdminBar Menu');
116
 
117
  }
118
 
psp-include/settings/psp_tools_renderer.php CHANGED
@@ -242,67 +242,68 @@ settings_errors( 'psp_tools_renderer' );
242
  <div class="row m-2 p-1"><div class="h3 col-sm-12">
243
  <a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a></div></div>
244
  </div><!-- end of #logo -->
245
- <div class="clearfix"></div>
246
-
247
- <div class="container bg-info" id="header" style="width:90%">
248
- <h2 class="btn-success"> <?php esc_html_e('Import Platinum SEO Data', 'platinum-seo-pack'); ?> </h2>
249
- <h4 class="col-sm-12"> <?php esc_html_e('Import Platinum SEO Options Data', 'platinum-seo-pack'); ?> </h4>
250
- <form action="" method="post" enctype="multipart/form-data">
251
- <div class="form-group">
252
- <div class="col-sm-2"><h5><?php esc_html_e('Select csv File to Upload:', 'platinum-seo-pack'); ?></h5> </div>
253
- <div class="col-sm-10">
254
- <input type="file" class="form-control" name="optionsfile" id="optionsfile"/>
255
- </div>
256
- </div>
257
- <div class="form-group">
258
- <div class="col-sm-offset-2 col-sm-10">
259
- <input type="hidden" value="wp_handle_upload" name="action" />
260
- <input type="submit" value="<?php _e('Submit'); ?>" name="submitit" class="btn btn-success" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  </div>
263
- <?php
264
- wp_nonce_field( 'do_psp_importoptions_action', 'psp_import_options_nonce' );
265
- ?>
266
- </form>
267
- <h4 class="col-sm-12"> <?php esc_html_e('Import Platinum SEO Meta Data', 'platinum-seo-pack'); ?> </h4>
268
- <form action="" method="post" enctype="multipart/form-data">
269
- <div class="form-group">
270
- <div class="col-sm-2"><h5><?php esc_html_e('Select csv File to Upload:', 'platinum-seo-pack'); ?></h5> </div>
271
- <div class="col-sm-10">
272
- <input type="file" class="form-control" name="pspmetafile" id="pspmetafile"/>
273
- </div>
274
- </div>
275
- <div class="form-group">
276
- <div class="col-sm-offset-2 col-sm-10">
277
- <input type="hidden" value="wp_handle_upload" name="action" />
278
- <input type="submit" value="<?php esc_html_e('Submit', 'platinum-seo-pack'); ?>" name="submitit" class="btn btn-success" />
279
  </div>
 
 
 
 
 
 
280
  </div>
281
- <?php
282
- wp_nonce_field( 'do_psp_importmeta_action', 'psp_import_meta_nonce' );
283
- ?>
284
- </form>
285
- </div>
286
- <div class="clearfix"></div>
287
- <div class="container bg-info" id="header" style="width:90%">
288
- <h2 class="btn-success"> <?php esc_html_e('Export Platinum SEO Data', 'platinum-seo-pack'); ?> </h2>
289
- <div class="clearfix"></div>
290
- <br />
291
- <div class="row vertical-align">
292
- <div class="col-sm-6"><h4><?php esc_html_e('Export Platinum SEO Meta Data:', 'platinum-seo-pack'); ?></h4> </div>
293
- <div class="col-sm-6">
294
- <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>
295
- </div>
296
- </div>
297
- <div class="clearfix"></div>
298
- <br />
299
- <div class="row vertical-align">
300
- <div class="col-sm-6"><h4><?php esc_html_e('Export Platinum SEO Option Data:', 'platinum-seo-pack'); ?></h4> </div>
301
- <div class="col-sm-6">
302
- <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>
303
- </div>
304
- </div>
305
- </div>
306
  <div class="clearfix"></div>
307
 
308
 
242
  <div class="row m-2 p-1"><div class="h3 col-sm-12">
243
  <a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a></div></div>
244
  </div><!-- end of #logo -->
245
+ <?php if ($this->psp_helper->user_has_access('seodatamanager')) { ?>
246
+ <div class="clearfix"></div>
247
+ <div class="container bg-info" id="header" style="width:90%">
248
+ <h2 class="btn-success"> <?php esc_html_e('Import Platinum SEO Data', 'platinum-seo-pack'); ?> </h2>
249
+ <h4 class="col-sm-12"> <?php esc_html_e('Import Platinum SEO Options Data', 'platinum-seo-pack'); ?> </h4>
250
+ <form action="" method="post" enctype="multipart/form-data">
251
+ <div class="form-group">
252
+ <div class="col-sm-2"><h5><?php esc_html_e('Select csv File to Upload:', 'platinum-seo-pack'); ?></h5> </div>
253
+ <div class="col-sm-10">
254
+ <input type="file" class="form-control" name="optionsfile" id="optionsfile"/>
255
+ </div>
256
+ </div>
257
+ <div class="form-group">
258
+ <div class="col-sm-offset-2 col-sm-10">
259
+ <input type="hidden" value="wp_handle_upload" name="action" />
260
+ <input type="submit" value="<?php _e('Submit'); ?>" name="submitit" class="btn btn-success" />
261
+ </div>
262
+ </div>
263
+ <?php
264
+ wp_nonce_field( 'do_psp_importoptions_action', 'psp_import_options_nonce' );
265
+ ?>
266
+ </form>
267
+ <h4 class="col-sm-12"> <?php esc_html_e('Import Platinum SEO Meta Data', 'platinum-seo-pack'); ?> </h4>
268
+ <form action="" method="post" enctype="multipart/form-data">
269
+ <div class="form-group">
270
+ <div class="col-sm-2"><h5><?php esc_html_e('Select csv File to Upload:', 'platinum-seo-pack'); ?></h5> </div>
271
+ <div class="col-sm-10">
272
+ <input type="file" class="form-control" name="pspmetafile" id="pspmetafile"/>
273
+ </div>
274
+ </div>
275
+ <div class="form-group">
276
+ <div class="col-sm-offset-2 col-sm-10">
277
+ <input type="hidden" value="wp_handle_upload" name="action" />
278
+ <input type="submit" value="<?php esc_html_e('Submit', 'platinum-seo-pack'); ?>" name="submitit" class="btn btn-success" />
279
+ </div>
280
  </div>
281
+ <?php
282
+ wp_nonce_field( 'do_psp_importmeta_action', 'psp_import_meta_nonce' );
283
+ ?>
284
+ </form>
285
+ </div>
286
+ <div class="clearfix"></div>
287
+ <div class="container bg-info" id="header" style="width:90%">
288
+ <h2 class="btn-success"> <?php esc_html_e('Export Platinum SEO Data', 'platinum-seo-pack'); ?> </h2>
289
+ <div class="clearfix"></div>
290
+ <br />
291
+ <div class="row vertical-align">
292
+ <div class="col-sm-6"><h4><?php esc_html_e('Export Platinum SEO Meta Data:', 'platinum-seo-pack'); ?></h4> </div>
293
+ <div class="col-sm-6">
294
+ <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>
295
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  </div>
297
+ <div class="clearfix"></div>
298
+ <br />
299
+ <div class="row vertical-align">
300
+ <div class="col-sm-6"><h4><?php esc_html_e('Export Platinum SEO Option Data:', 'platinum-seo-pack'); ?></h4> </div>
301
+ <div class="col-sm-6">
302
+ <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>
303
  </div>
304
+ </div>
305
+ </div>
306
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  <div class="clearfix"></div>
308
 
309
 
psp-include/settings/psp_tools_settings.php CHANGED
@@ -680,9 +680,9 @@ class PspToolSettings extends PspSettings {
680
  //error_log('option '.$option.' '.$status.' '.$value);
681
 
682
  if ( 'psp_bulkedit_rows_per_page' == $option) {
683
- error_log("psp rows status ".$status);
684
- error_log("psp rows option ".$option);
685
- error_log("psp rows ".$value);
686
  return $value;
687
  //return sanitize_key($value);
688
  }
@@ -713,6 +713,25 @@ class PspToolSettings extends PspSettings {
713
  } else {
714
  $update_status = delete_metadata( 'platinumseo', $psp_post_id, '_techblissonline_psp_description');
715
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
716
  }
717
 
718
  if($update_status === false) {
@@ -817,6 +836,8 @@ class PspToolSettings extends PspSettings {
817
  delete_metadata( 'platinumseo', $psp_id, '_techblissonline_psp_title');
818
  } else if ( ($psp_meta_type == "description") && isset( $_POST['psp_posts_bulkedit_desc_nonce'] ) && wp_verify_nonce( sanitize_key($_POST['psp_posts_bulkedit_desc_nonce']), 'do_psp_posts_bulkedit_desc' )) {
819
  delete_metadata( 'platinumseo', $psp_id, '_techblissonline_psp_description');
 
 
820
  }
821
 
822
 
@@ -871,7 +892,15 @@ class PspToolSettings extends PspSettings {
871
  $sql_posts_1 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_description FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_description') b ON a.ID = b.platinumseo_id WHERE a.post_type in $psp_post_types_str AND a.post_status = 'publish' AND a.post_title = %s", $psp_search );
872
  }
873
 
874
- }
 
 
 
 
 
 
 
 
875
  if (empty($psp_order_type)) {
876
  if (empty($psp_sort_type)) {
877
  $sql_posts_1 = $sql_posts_1 . "ORDER BY psp_id DESC";
@@ -895,8 +924,10 @@ class PspToolSettings extends PspSettings {
895
 
896
  if (empty($psp_meta_type)) {
897
  $sql_posts_2 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_title FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_title') b ON a.ID = b.platinumseo_id WHERE a.post_type in ($psp_format) AND a.post_status = 'publish'", $psp_post_types);
898
- } else {
899
  $sql_posts_2 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_description FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_description') b ON a.ID = b.platinumseo_id WHERE a.post_type in ($psp_format) AND a.post_status = 'publish'", $psp_post_types);
 
 
900
  }
901
  if (empty($psp_order_type)) {
902
  if (empty($psp_sort_type)) {
680
  //error_log('option '.$option.' '.$status.' '.$value);
681
 
682
  if ( 'psp_bulkedit_rows_per_page' == $option) {
683
+ //error_log("psp rows status ".$status);
684
+ //error_log("psp rows option ".$option);
685
+ //error_log("psp rows ".$value);
686
  return $value;
687
  //return sanitize_key($value);
688
  }
713
  } else {
714
  $update_status = delete_metadata( 'platinumseo', $psp_post_id, '_techblissonline_psp_description');
715
  }
716
+ } else if ( $whattoupdate == "psp_schema" ) {
717
+ $valuetoupdate = isset($_POST['pspvalue']) ? sanitize_textarea_field( $_POST['pspvalue'] ) : '';
718
+ //error_log("schema ".$valuetoupdate);
719
+ //update_metadata( 'platinumseo', $psp_post_id, '_techblissonline_psp_description', $valuetoupdate );
720
+ if ( !empty($valuetoupdate) && $valuetoupdate !== 'Invalid JSON Schema') {
721
+ $json_schema_str = ($valuetoupdate);
722
+ //validate it is a json object
723
+ $schema_obj = json_decode(stripcslashes($json_schema_str));
724
+ if($schema_obj === null) {
725
+ // $schema_obj is null because the json cannot be decoded
726
+ $valuetoupdate = 'Invalid JSON Schema';
727
+ } else {
728
+ $valuetoupdate = sanitize_textarea_field( htmlentities($valuetoupdate) );
729
+ error_log("schema ".$valuetoupdate);
730
+ }
731
+ $update_status = update_metadata( 'platinumseo', $psp_post_id, '_techblissonline_psp_schema_string', $valuetoupdate );
732
+ } else {
733
+ $update_status = delete_metadata( 'platinumseo', $psp_post_id, '_techblissonline_psp_schema_string');
734
+ }
735
  }
736
 
737
  if($update_status === false) {
836
  delete_metadata( 'platinumseo', $psp_id, '_techblissonline_psp_title');
837
  } else if ( ($psp_meta_type == "description") && isset( $_POST['psp_posts_bulkedit_desc_nonce'] ) && wp_verify_nonce( sanitize_key($_POST['psp_posts_bulkedit_desc_nonce']), 'do_psp_posts_bulkedit_desc' )) {
838
  delete_metadata( 'platinumseo', $psp_id, '_techblissonline_psp_description');
839
+ } else if ( ($psp_meta_type == "schema") && isset( $_POST['psp_posts_bulkedit_schema_nonce'] ) && wp_verify_nonce( sanitize_key($_POST['psp_posts_bulkedit_schema_nonce']), 'do_psp_posts_bulkedit_schema' )) {
840
+ delete_metadata( 'platinumseo', $psp_id, '_techblissonline_psp_schema_string');
841
  }
842
 
843
 
892
  $sql_posts_1 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_description FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_description') b ON a.ID = b.platinumseo_id WHERE a.post_type in $psp_post_types_str AND a.post_status = 'publish' AND a.post_title = %s", $psp_search );
893
  }
894
 
895
+ } else if($psp_meta_type == "schema") {
896
+
897
+ $sql_posts_1 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_schema FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_schema_string') b ON a.ID = b.platinumseo_id WHERE a.post_type in $psp_post_types_str AND a.post_status = 'publish' AND a.post_title LIKE %s", $psp_like );
898
+
899
+ if ($psp_like == "equals") {
900
+ $sql_posts_1 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_schema FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_schema_string') b ON a.ID = b.platinumseo_id WHERE a.post_type in $psp_post_types_str AND a.post_status = 'publish' AND a.post_title = %s", $psp_search );
901
+ }
902
+
903
+ }
904
  if (empty($psp_order_type)) {
905
  if (empty($psp_sort_type)) {
906
  $sql_posts_1 = $sql_posts_1 . "ORDER BY psp_id DESC";
924
 
925
  if (empty($psp_meta_type)) {
926
  $sql_posts_2 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_title FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_title') b ON a.ID = b.platinumseo_id WHERE a.post_type in ($psp_format) AND a.post_status = 'publish'", $psp_post_types);
927
+ } else if($psp_meta_type == "description") {
928
  $sql_posts_2 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_description FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_description') b ON a.ID = b.platinumseo_id WHERE a.post_type in ($psp_format) AND a.post_status = 'publish'", $psp_post_types);
929
+ } else if($psp_meta_type == "schema") {
930
+ $sql_posts_2 = $wpdb->prepare("SELECT a.ID AS psp_id, a.post_title AS psp_post_name, b.meta_value as psp_schema FROM $tbl_posts a LEFT JOIN (Select platinumseo_id, meta_key, meta_value from $tbl_postmeta WHERE meta_key = '_techblissonline_psp_schema_string') b ON a.ID = b.platinumseo_id WHERE a.post_type in ($psp_format) AND a.post_status = 'publish'", $psp_post_types);
931
  }
932
  if (empty($psp_order_type)) {
933
  if (empty($psp_sort_type)) {
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.0";
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.1";
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_230" );
291
  };
292
  };
293
  }
294
 
295
  public function platinum_seo_admin_notice__success() {
296
  $user_id = get_current_user_id();
297
- if ( "v_230" === 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.3.0'.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_231" );
291
  };
292
  };
293
  }
294
 
295
  public function platinum_seo_admin_notice__success() {
296
  $user_id = get_current_user_id();
297
+ if ( "v_231" === 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.3.1'.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.3.0
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.0=
80
  2021-01-12 - Made the Bulk Editor to retrieve only Builtin and Custom Post Types. Made similar changes to Redirections module.
81
 
6
  Requires at least: 4.0
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
9
+ Stable tag: 2.3.1
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.1=
80
+ 2021-01-15 - Bulk Editor now lets you add JSON Schema to all Post types in bulk.
81
+
82
  = 2.3.0=
83
  2021-01-12 - Made the Bulk Editor to retrieve only Builtin and Custom Post Types. Made similar changes to Redirections module.
84