@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | return; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $site_license = array( |
|
| 67 | + $site_license = array( |
|
| 68 | 68 | 'key' => MonsterInsights()->license->get_site_license_key(), |
| 69 | 69 | 'type' => MonsterInsights()->license->get_site_license_type(), |
| 70 | 70 | 'is_disabled' => MonsterInsights()->license->site_license_disabled(), |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | // Array fields are needed even if empty. |
| 125 | 125 | $array_fields = array( 'view_reports', 'save_settings', 'ignore_users' ); |
| 126 | 126 | foreach ( $array_fields as $array_field ) { |
| 127 | - if ( ! isset( $options[ $array_field ] ) ) { |
|
| 128 | - $options[ $array_field ] = array(); |
|
| 127 | + if ( ! isset( $options[$array_field] ) ) { |
|
| 128 | + $options[$array_field] = array(); |
|
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | if ( isset( $options['custom_code'] ) ) { |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | } |
| 258 | 258 | if ( $empty ) { |
| 259 | - unset( $value[ $key ] ); |
|
| 259 | + unset( $value[$key] ); |
|
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | } else { |
| 307 | 307 | $addon = $this->get_addon( $installed_plugins, $addons_type, $addon, $slug ); |
| 308 | 308 | } |
| 309 | - $parsed_addons[ $addon->slug ] = $addon; |
|
| 309 | + $parsed_addons[$addon->slug] = $addon; |
|
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | 'slug' => 'wp-mail-smtp', |
| 385 | 385 | ); |
| 386 | 386 | // SeedProd. |
| 387 | - $parsed_addons['coming-soon'] = array( |
|
| 387 | + $parsed_addons['coming-soon'] = array( |
|
| 388 | 388 | 'active' => function_exists( 'seed_csp4_activation' ), |
| 389 | 389 | 'icon' => plugin_dir_url( MONSTERINSIGHTS_PLUGIN_FILE ) . 'assets/images/plugin-seedprod.png', |
| 390 | 390 | 'title' => 'SeedProd', |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | 'slug' => 'coming-soon', |
| 395 | 395 | ); |
| 396 | 396 | // RafflePress |
| 397 | - $parsed_addons['rafflepress'] = array( |
|
| 397 | + $parsed_addons['rafflepress'] = array( |
|
| 398 | 398 | 'active' => function_exists( 'rafflepress_lite_activation' ), |
| 399 | 399 | 'icon' => plugin_dir_url( MONSTERINSIGHTS_PLUGIN_FILE ) . 'assets/images/pluign-rafflepress.png', |
| 400 | 400 | 'title' => 'RafflePress', |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | $installed = false; |
| 467 | 467 | $plugin_basename = monsterinsights_get_plugin_basename_from_slug( $slug ); |
| 468 | 468 | |
| 469 | - if ( isset( $installed_plugins[ $plugin_basename ] ) ) { |
|
| 469 | + if ( isset( $installed_plugins[$plugin_basename] ) ) { |
|
| 470 | 470 | $installed = true; |
| 471 | 471 | |
| 472 | 472 | if ( is_multisite() && is_network_admin() ) { |
@@ -609,8 +609,8 @@ discard block |
||
| 609 | 609 | ); |
| 610 | 610 | |
| 611 | 611 | foreach ( $exclude as $e ) { |
| 612 | - if ( ! empty( $new_settings[ $e ] ) ) { |
|
| 613 | - unset( $new_settings[ $e ] ); |
|
| 612 | + if ( ! empty( $new_settings[$e] ) ) { |
|
| 613 | + unset( $new_settings[$e] ); |
|
| 614 | 614 | } |
| 615 | 615 | } |
| 616 | 616 | |
@@ -621,8 +621,8 @@ discard block |
||
| 621 | 621 | } |
| 622 | 622 | |
| 623 | 623 | foreach ( $exclude as $e ) { |
| 624 | - if ( ! empty( $settings[ $e ] ) ) { |
|
| 625 | - $new_settings = $settings[ $e ]; |
|
| 624 | + if ( ! empty( $settings[$e] ) ) { |
|
| 625 | + $new_settings = $settings[$e]; |
|
| 626 | 626 | } |
| 627 | 627 | } |
| 628 | 628 | |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | ), |
| 783 | 783 | admin_url( 'admin.php' ) |
| 784 | 784 | ); |
| 785 | - $url = esc_url( $url ); |
|
| 785 | + $url = esc_url( $url ); |
|
| 786 | 786 | |
| 787 | 787 | ob_start(); |
| 788 | 788 | if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, null ) ) ) { |
@@ -888,7 +888,7 @@ discard block |
||
| 888 | 888 | $homepage = get_option( 'page_on_front' ); |
| 889 | 889 | if ( ! $homepage ) { |
| 890 | 890 | $array[] = array( |
| 891 | - 'id' => - 1, |
|
| 891 | + 'id' => -1, |
|
| 892 | 892 | 'title' => __( 'Homepage', 'google-analytics-for-wordpress' ), |
| 893 | 893 | ); |
| 894 | 894 | } |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | if ( ! post_type_supports( $post_type->name, 'editor' ) || 'product' === $post_type->name ) { |
| 963 | 963 | continue; |
| 964 | 964 | } |
| 965 | - $post_types_parsed[ $post_type->name ] = $post_type->labels->singular_name; |
|
| 965 | + $post_types_parsed[$post_type->name] = $post_type->labels->singular_name; |
|
| 966 | 966 | } |
| 967 | 967 | |
| 968 | 968 | $post_types_parsed = apply_filters( 'monsterinsights_vue_post_types_editor', $post_types_parsed ); |
@@ -1084,18 +1084,18 @@ discard block |
||
| 1084 | 1084 | $value = sanitize_text_field( wp_unslash( $_POST['value'] ) ); // Value of custom style like 12px or #fff. |
| 1085 | 1085 | $settings = get_option( $settings_key, array() ); |
| 1086 | 1086 | |
| 1087 | - if ( ! isset( $settings[ $type ] ) ) { |
|
| 1088 | - $settings[ $type ] = array(); |
|
| 1087 | + if ( ! isset( $settings[$type] ) ) { |
|
| 1088 | + $settings[$type] = array(); |
|
| 1089 | 1089 | } |
| 1090 | - if ( ! isset( $settings[ $type ][ $theme ] ) ) { |
|
| 1091 | - $settings[ $type ][ $theme ] = array(); |
|
| 1090 | + if ( ! isset( $settings[$type][$theme] ) ) { |
|
| 1091 | + $settings[$type][$theme] = array(); |
|
| 1092 | 1092 | } |
| 1093 | 1093 | |
| 1094 | - if ( ! isset( $settings[ $type ][ $theme ][ $object ] ) ) { |
|
| 1095 | - $settings[ $type ][ $theme ][ $object ] = array(); |
|
| 1094 | + if ( ! isset( $settings[$type][$theme][$object] ) ) { |
|
| 1095 | + $settings[$type][$theme][$object] = array(); |
|
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | - $settings[ $type ][ $theme ][ $object ][ $key ] = $value; |
|
| 1098 | + $settings[$type][$theme][$object][$key] = $value; |
|
| 1099 | 1099 | |
| 1100 | 1100 | update_option( $settings_key, $settings ); |
| 1101 | 1101 | |