@@ -45,7 +45,7 @@ |
||
| 45 | 45 | // @codingStandardsIgnoreLine |
| 46 | 46 | $single_meta = get_user_meta( get_current_user_id(), $id_base, true ); |
| 47 | 47 | |
| 48 | - if ( isset( $user_meta[ $id_base ] ) ) { |
|
| 48 | + if ( isset( $user_meta[$id_base] ) ) { |
|
| 49 | 49 | return $single_meta; |
| 50 | 50 | } |
| 51 | 51 | return $default; |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | // Get the classname we'll be using to create our setting(s). |
| 69 | 69 | $classname = false; |
| 70 | 70 | if ( isset( $args['option_type'] ) && array_key_exists( $args['option_type'], $this->setting_types ) ) { |
| 71 | - $classname = $this->setting_types[ $args['option_type'] ]; |
|
| 71 | + $classname = $this->setting_types[$args['option_type']]; |
|
| 72 | 72 | } |
| 73 | 73 | if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->setting_types ) ) { |
| 74 | 74 | $args['type'] = 'default'; |
| 75 | 75 | } |
| 76 | - $classname = ! $classname ? $this->setting_types[ $args['type'] ] : $classname; |
|
| 76 | + $classname = ! $classname ? $this->setting_types[$args['type']] : $classname; |
|
| 77 | 77 | |
| 78 | 78 | // If settings are defined as an array, then we need to go through them |
| 79 | 79 | // and call add_setting for each one of them separately. |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $args['default'] = array(); |
| 85 | 85 | } |
| 86 | 86 | foreach ( $args['settings'] as $key => $value ) { |
| 87 | - $default = ( isset( $defaults[ $key ] ) ) ? $defaults[ $key ] : ''; |
|
| 87 | + $default = ( isset( $defaults[$key] ) ) ? $defaults[$key] : ''; |
|
| 88 | 88 | $this->add_setting( $classname, $value, $default, $args['option_type'], $args['capability'], $args['transport'], $args['sanitize_callback'] ); |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | foreach ( $this->setting_types as $key => $classname ) { |
| 137 | 137 | |
| 138 | 138 | if ( ! class_exists( $classname ) ) { |
| 139 | - unset( $this->setting_types[ $key ] ); |
|
| 139 | + unset( $this->setting_types[$key] ); |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | } |