SEOPress - Version 3.2.6

Version Description

  • FIX Fatal error: Uncaught Error: Call to undefined function get_current_screen()
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 3.2.6
Comparing to
See all releases

Code changes from version 3.2.5 to 3.2.6

inc/functions/options-advanced-admin.php CHANGED
@@ -801,33 +801,35 @@ function seopress_bulk_quick_edit_custom_box($column_name) {
801
  add_action('save_post','seopress_bulk_quick_edit_save_post', 10, 2);
802
  function seopress_bulk_quick_edit_save_post($post_id) {
803
 
804
- $current_screen = get_current_screen();
 
805
 
806
- if ($current_screen->post_type !='elementor_library') {
807
-
808
- // don't save for autosave
809
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
810
- return $post_id;
811
 
812
- // dont save for revisions
813
- if ( isset( $post->post_type ) && $post->post_type == 'revision' )
814
- return $post_id;
815
 
816
- if (!current_user_can('edit_post', $post_id)) {
817
- return;
818
- }
819
- $_POST += array("seopress_title_edit_nonce" => '');
820
- if (!wp_verify_nonce($_POST["seopress_title_edit_nonce"], plugin_basename( __FILE__ ))) {
821
- return;
822
- }
823
- if (isset($_REQUEST['seopress_title'])) {
824
- update_post_meta($post_id, '_seopress_titles_title', esc_html($_REQUEST['seopress_title']));
825
- }
826
- if (isset($_REQUEST['seopress_desc'])) {
827
- update_post_meta($post_id, '_seopress_titles_desc', esc_html($_REQUEST['seopress_desc']));
828
- }
829
- if (isset($_REQUEST['seopress_canonical'])) {
830
- update_post_meta($post_id, '_seopress_robots_canonical', esc_html($_REQUEST['seopress_canonical']));
 
831
  }
832
  }
833
  }
801
  add_action('save_post','seopress_bulk_quick_edit_save_post', 10, 2);
802
  function seopress_bulk_quick_edit_save_post($post_id) {
803
 
804
+ if (function_exists('get_current_screen')) {
805
+ $current_screen = get_current_screen();
806
 
807
+ if ($current_screen->post_type !='elementor_library') {
808
+
809
+ // don't save for autosave
810
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
811
+ return $post_id;
812
 
813
+ // dont save for revisions
814
+ if ( isset( $post->post_type ) && $post->post_type == 'revision' )
815
+ return $post_id;
816
 
817
+ if (!current_user_can('edit_post', $post_id)) {
818
+ return;
819
+ }
820
+ $_POST += array("seopress_title_edit_nonce" => '');
821
+ if (!wp_verify_nonce($_POST["seopress_title_edit_nonce"], plugin_basename( __FILE__ ))) {
822
+ return;
823
+ }
824
+ if (isset($_REQUEST['seopress_title'])) {
825
+ update_post_meta($post_id, '_seopress_titles_title', esc_html($_REQUEST['seopress_title']));
826
+ }
827
+ if (isset($_REQUEST['seopress_desc'])) {
828
+ update_post_meta($post_id, '_seopress_titles_desc', esc_html($_REQUEST['seopress_desc']));
829
+ }
830
+ if (isset($_REQUEST['seopress_canonical'])) {
831
+ update_post_meta($post_id, '_seopress_robots_canonical', esc_html($_REQUEST['seopress_canonical']));
832
+ }
833
  }
834
  }
835
  }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: seo, search engine optimization, meta title, open graph, content analysis,
6
  Requires at least: 4.4+
7
  Tested up to: 5.0
8
  Requires PHP: 5.4
9
- Stable tag: 3.2.5
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -161,6 +161,8 @@ Subscribe on <a href="https://www.seopress.org/" target="_blank">seopress.org</a
161
  44. Structured Data Types metaboxe in post, page, custom post type (PRO)
162
 
163
  == Changelog ==
 
 
164
  = 3.2.5 =
165
  * NEW Add hook 'seopress_real_preview_remote' to filter Google Snippet Preview remote request and allow htaccess/htpasswd
166
  * INFO Support maintenance plugin for Google Snippet Preview
6
  Requires at least: 4.4+
7
  Tested up to: 5.0
8
  Requires PHP: 5.4
9
+ Stable tag: 3.2.6
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
161
  44. Structured Data Types metaboxe in post, page, custom post type (PRO)
162
 
163
  == Changelog ==
164
+ = 3.2.6 =
165
+ * FIX Fatal error: Uncaught Error: Call to undefined function get_current_screen()
166
  = 3.2.5 =
167
  * NEW Add hook 'seopress_real_preview_remote' to filter Google Snippet Preview remote request and allow htaccess/htpasswd
168
  * INFO Support maintenance plugin for Google Snippet Preview
seopress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: The best plugin for SEO.
6
- Version: 3.2.5
7
  Author: Benjamin Denis
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
@@ -53,7 +53,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
53
  ///////////////////////////////////////////////////////////////////////////////////////////////////
54
  //Define
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
- define( 'SEOPRESS_VERSION', '3.2.5' );
57
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
58
 
59
  ///////////////////////////////////////////////////////////////////////////////////////////////////
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: The best plugin for SEO.
6
+ Version: 3.2.6
7
  Author: Benjamin Denis
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
53
  ///////////////////////////////////////////////////////////////////////////////////////////////////
54
  //Define
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
+ define( 'SEOPRESS_VERSION', '3.2.6' );
57
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
58
 
59
  ///////////////////////////////////////////////////////////////////////////////////////////////////