diff --git a/wp/wp-content/plugins/classic-editor/classic-editor.php b/wp/wp-content/plugins/classic-editor/classic-editor.php index e96b9ae4..2dcde7e8 100644 --- a/wp/wp-content/plugins/classic-editor/classic-editor.php +++ b/wp/wp-content/plugins/classic-editor/classic-editor.php @@ -5,7 +5,7 @@ * Plugin Name: Classic Editor * Plugin URI: https://wordpress.org/plugins/classic-editor/ * Description: Enables the WordPress classic editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports the older plugins that extend this screen. - * Version: 1.6.3 + * Version: 1.6.4 * Author: WordPress Contributors * Author URI: https://github.com/WordPress/classic-editor/ * License: GPLv2 or later @@ -57,7 +57,9 @@ class Classic_Editor { if ( $settings['allow-users'] ) { // User settings. add_action( 'personal_options_update', array( __CLASS__, 'save_user_settings' ) ); + add_action( 'edit_user_profile_update', array( __CLASS__, 'save_user_settings' ) ); add_action( 'profile_personal_options', array( __CLASS__, 'user_settings' ) ); + add_action( 'edit_user_profile', array( __CLASS__, 'user_settings') ); } } @@ -198,7 +200,7 @@ class Classic_Editor { } - private static function get_settings( $refresh = 'no' ) { + private static function get_settings( $refresh = 'no', $user_id = 0 ) { /** * Can be used to override the plugin's settings. Always hides the settings UI when used (as users cannot change the settings). * @@ -207,7 +209,7 @@ class Classic_Editor { * 'editor' => 'classic', // Accepted values: 'classic', 'block'. * 'allow-users' => false, * - * @param boolean To override the settings return an array with the above keys. + * @param boolean To override the settings return an array with the above keys. Default false. */ $settings = apply_filters( 'classic_editor_plugin_settings', false ); @@ -270,7 +272,8 @@ class Classic_Editor { // Override the defaults with the user options. if ( ( ! isset( $GLOBALS['pagenow'] ) || $GLOBALS['pagenow'] !== 'options-writing.php' ) && $allow_users ) { - $user_options = get_user_option( 'classic-editor-settings' ); + + $user_options = get_user_option( 'classic-editor-settings', $user_id ); if ( $user_options === 'block' || $user_options === 'classic' ) { $editor = $user_options; @@ -402,8 +405,8 @@ class Classic_Editor { return 'disallow'; } - public static function settings_1() { - $settings = self::get_settings( 'refresh' ); + public static function settings_1( $user_id = 0 ) { + $settings = self::get_settings( 'refresh', $user_id ); ?>