Completed
Push — develop ( e441ef...c579bc )
by Zack
17:19
created
future/includes/class-gv-settings-plugin.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		// GravityKitFoundation may not yet be available when this class is instantiated, so let's temporarily use the Settings framework from Foundation that's included with GravityView and then possibly replace it with the latest version.
28 28
 		$this->_foundation_settings = SettingsFramework::get_instance();
29 29
 
30
-		add_action( 'gk/foundation/initialized', function () {
30
+		add_action( 'gk/foundation/initialized', function() {
31 31
 			$this->_foundation_settings = GravityKitFoundation::settings();
32 32
 		} );
33 33
 
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
 		}
118 118
 
119 119
 		if ( empty( $legacy_settings ) ) {
120
-			return [];
120
+			return [ ];
121 121
 		}
122 122
 
123 123
 		// Migrate legacy GravityView settings that are still part of GravityView.
124 124
 		$plugin_settings = [
125
-			'rest_api' => (int) Arr::get( $legacy_settings, 'rest_api' ),
125
+			'rest_api' => (int)Arr::get( $legacy_settings, 'rest_api' ),
126 126
 		];
127 127
 
128 128
 		$this->_foundation_settings->save_plugin_settings( self::SETTINGS_PLUGIN_ID, $plugin_settings );
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
 			$gk_settings = [
139 139
 				'support_email'    => Arr::get( $legacy_settings, 'support-email' ),
140 140
 				'support_port'     => Arr::get( $legacy_settings, 'support_port' ),
141
-				'powered_by'       => (int) Arr::get( $legacy_settings, 'powered_by' ),
141
+				'powered_by'       => (int)Arr::get( $legacy_settings, 'powered_by' ),
142 142
 				'affiliate_id'     => Arr::get( $legacy_settings, 'affiliate_id' ),
143
-				'beta'             => (int) Arr::get( $legacy_settings, 'beta' ),
143
+				'beta'             => (int)Arr::get( $legacy_settings, 'beta' ),
144 144
 				'support_email'    => Arr::get( $legacy_settings, 'support-email' ),
145
-				'support_port'     => (int) Arr::get( $legacy_settings, 'support_port' ),
146
-				'no_conflict_mode' => (int) Arr::get( $legacy_settings, 'no-conflict-mode' ),
145
+				'support_port'     => (int)Arr::get( $legacy_settings, 'support_port' ),
146
+				'no_conflict_mode' => (int)Arr::get( $legacy_settings, 'no-conflict-mode' ),
147 147
 			];
148 148
 
149 149
 			$this->_foundation_settings->save_plugin_settings( $gk_settings_id, $gk_settings );
@@ -223,14 +223,14 @@  discard block
 block discarded – undo
223 223
 							'type'        => 'checkbox',
224 224
 							'title'       => esc_html__( 'REST API', 'gk-gravityview' ),
225 225
 							'description' => esc_html__( 'Enable View and Entry access via the REST API? Regular per-View restrictions apply (private, password protected, etc.).', 'gk-gravityview' ) . ' ' . esc_html__( 'If you are unsure, disable this setting.', 'gk-gravityview' ),
226
-							'value'       => $this->get( 'rest_api', $default_settings['rest_api'] ),
226
+							'value'       => $this->get( 'rest_api', $default_settings[ 'rest_api' ] ),
227 227
 						],
228 228
 					],
229 229
 				],
230 230
 			],
231 231
 		];
232 232
 
233
-		return array_merge( (array) $plugins_data, [ self::SETTINGS_PLUGIN_ID => $settings ] );
233
+		return array_merge( (array)$plugins_data, [ self::SETTINGS_PLUGIN_ID => $settings ] );
234 234
 	}
235 235
 
236 236
 	/**
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 	public function maybe_save_app_settings() {
285 285
 		if ( $this->is_save_postback() ) {
286 286
 			if ( ! \GVCommon::has_cap( 'gravityview_edit_settings' ) ) {
287
-				$_POST = []; // If you don't reset the $_POST array, it *looks* like the settings were changed, but they weren't
287
+				$_POST = [ ]; // If you don't reset the $_POST array, it *looks* like the settings were changed, but they weren't
288 288
 				\GFCommon::add_error_message( __( 'You don\'t have the ability to edit plugin settings.', 'gk-gravityview' ) );
289 289
 
290 290
 				return;
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-gravitymaps.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 				return $api_key;
23 23
 			}
24 24
 
25
-			$legacy_options = (array) get_option( 'gravityformsaddon_gravityview_app_settings' );
25
+			$legacy_options = (array)get_option( 'gravityformsaddon_gravityview_app_settings' );
26 26
 
27 27
 			return \GV\Utils::get( $legacy_options, 'googlemaps-api-key', '' );
28 28
 		} );
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 		 * @param array $notices
33 33
 		 * @return array $notices, with a new notice about Maps compatibility added.
34 34
 		 */
35
-		add_filter( 'gravityview/admin/notices', function ( $notices ) {
35
+		add_filter( 'gravityview/admin/notices', function( $notices ) {
36 36
 
37 37
 			$message = '<h3>' . esc_html__( 'Plugin update required.', 'gk-gravityview' ) . '</h3>';
38 38
 			$message .= esc_html_x( 'You are using [plugin] [version] that is incompatible with the current version of GravityView. Please [link]update [plugin][/link] to the latest version.', 'Placeholders inside [] are not to be translated.', 'gk-gravityview' );
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 				'[/link]'   => '</a>',
45 45
 			) );
46 46
 
47
-			$notices[] = [
47
+			$notices[ ] = [
48 48
 				'class'   => 'error',
49 49
 				'message' => $message,
50 50
 				'dismiss' => false,
Please login to merge, or discard this patch.