Skip to content

Commit

Permalink
Update variable name for clarity
Browse files Browse the repository at this point in the history
Also correct some spacing.
  • Loading branch information
ironprogrammer committed Jun 20, 2024
1 parent 16347e2 commit 42d64bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classic-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static function remove_gutenberg_hooks( $remove = 'all' ) {

}

private static function get_settings( $refresh = 'no', $opts_for_user = 0) {
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).
*
Expand Down Expand Up @@ -273,13 +273,13 @@ private static function get_settings( $refresh = 'no', $opts_for_user = 0) {
// 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', $opts_for_user);
$user_options = get_user_option( 'classic-editor-settings', $user_id );

if ( $user_options === 'block' || $user_options === 'classic' ) {
$editor = $user_options;
}
}

self::$settings = array(
'editor' => $editor,
'hide-settings-ui' => false,
Expand Down Expand Up @@ -405,8 +405,8 @@ public static function validate_option_allow_users( $value ) {
return 'disallow';
}

public static function settings_1( $opts_for_user=0 ) {
$settings = self::get_settings( 'refresh', $opts_for_user );
public static function settings_1( $user_id = 0 ) {
$settings = self::get_settings( 'refresh', $user_id );

?>
<div class="classic-editor-options">
Expand Down

0 comments on commit 42d64bf

Please sign in to comment.