WPGlobus – Multilingual Everything! - Version 2.0.1

Version Description

  • FIXED:
    • Builders/Gutenberg: saving posts correctly in the WordPress 5 'classic-editor' mode.
Download this release

Release Info

Developer tivnet
Plugin Icon 128x128 WPGlobus – Multilingual Everything!
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

includes/builders/class-wpglobus-builders.php CHANGED
@@ -912,12 +912,28 @@ if ( ! class_exists( 'WPGlobus_Builders' ) ) :
912
  * ver.1.0 https://wordpress.org/plugins/classic-editor/
913
  */
914
  if ( isset( $_GET['classic-editor'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
 
 
 
 
 
 
 
 
915
  $load_gutenberg = false;
916
  } elseif ( isset( $_GET['classic-editor__forget'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
917
  $load_gutenberg = true;
918
  } else {
919
  $post_id = isset( $_GET['post'] ) ? (int) $_GET['post'] : 0; // phpcs:ignore WordPress.CSRF.NonceVerification
920
 
 
 
 
 
 
 
 
 
921
  if ( 0 !== $post_id ) {
922
  $classic_editor_remember = get_post_meta( $post_id, 'classic-editor-remember', true );
923
  if ( 'classic-editor' === $classic_editor_remember ) {
912
  * ver.1.0 https://wordpress.org/plugins/classic-editor/
913
  */
914
  if ( isset( $_GET['classic-editor'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
915
+ /**
916
+ * @todo
917
+ * 1. set 'classic-editor-remember' as 'block-editor'.
918
+ * 2. load your-site/wp-admin/post.php?post=POST_ID&action=edit&classic-editor.
919
+ * 3. incorrect loading post page.
920
+ */
921
+ //update_post_meta( POST_ID, 'classic-editor-remember', 'classic-editor' );
922
+
923
  $load_gutenberg = false;
924
  } elseif ( isset( $_GET['classic-editor__forget'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
925
  $load_gutenberg = true;
926
  } else {
927
  $post_id = isset( $_GET['post'] ) ? (int) $_GET['post'] : 0; // phpcs:ignore WordPress.CSRF.NonceVerification
928
 
929
+ if ( 0 === $post_id ) {
930
+ /**
931
+ * We need to check $_POST when the saving post in 'classic-editor' mode.
932
+ * As option we can use $_POST['classic-editor'], but now get 'classic-editor-remember' meta.
933
+ */
934
+ $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0; // phpcs:ignore WordPress.CSRF.NonceVerification
935
+ }
936
+
937
  if ( 0 !== $post_id ) {
938
  $classic_editor_remember = get_post_meta( $post_id, 'classic-editor-remember', true );
939
  if ( 'classic-editor' === $classic_editor_remember ) {
languages/wpglobus.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 WPGlobus 2.0.0
2
- # This file is distributed under the same license as the WPGlobus 2.0.0 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPGlobus 2.0.0\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
1
+ # Copyright (C) 2018 WPGlobus 2.0.1
2
+ # This file is distributed under the same license as the WPGlobus 2.0.1 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPGlobus 2.0.1\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -217,6 +217,11 @@ WPGlobus Version 2 supports WordPress 5.
217
 
218
  == Changelog ==
219
 
 
 
 
 
 
220
  = 2.0.0 =
221
 
222
  * COMPATIBILITY:
217
 
218
  == Changelog ==
219
 
220
+ = 2.0.1 =
221
+
222
+ * FIXED:
223
+ * Builders/Gutenberg: saving posts correctly in the WordPress 5 'classic-editor' mode.
224
+
225
  = 2.0.0 =
226
 
227
  * COMPATIBILITY:
wpglobus.php CHANGED
@@ -15,7 +15,7 @@
15
  * Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
16
  * Text Domain: wpglobus
17
  * Domain Path: /languages/
18
- * Version: 2.0.0
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  exit;
43
  }
44
 
45
- define( 'WPGLOBUS_VERSION', '2.0.0' );
46
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
47
 
48
  /**
15
  * Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
16
  * Text Domain: wpglobus
17
  * Domain Path: /languages/
18
+ * Version: 2.0.1
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
42
  exit;
43
  }
44
 
45
+ define( 'WPGLOBUS_VERSION', '2.0.1' );
46
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
47
 
48
  /**