@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @var array|null |
| 36 | 36 | */ |
| 37 | - public static ?array $field; |
|
| 37 | + public static ? array $field; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * WordPress upload directory. |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | foreach ( $defaults as $i => $v ) { |
| 237 | 237 | if ( $arr['id'] === $v['id'] ) { |
| 238 | 238 | |
| 239 | - $defaults[ $i ] = array_replace( $v, $arr ); |
|
| 239 | + $defaults[$i] = array_replace( $v, $arr ); |
|
| 240 | 240 | $skip_add = true; |
| 241 | 241 | break; |
| 242 | 242 | } |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | if ( ! $skip_add ) { |
| 246 | 246 | $arr['order'] = $cur_count; |
| 247 | 247 | $arr['class'] = $arr['class'] ?? 'fa'; |
| 248 | - $defaults[ $cur_count ] = $arr; |
|
| 248 | + $defaults[$cur_count] = $arr; |
|
| 249 | 249 | ++$cur_count; |
| 250 | 250 | } |
| 251 | 251 | } |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | foreach ( $icons as $icon ) { |
| 277 | 277 | if ( $icon === $arr['id'] ) { |
| 278 | 278 | $arr['order'] = $idx; |
| 279 | - $new_arr[ $idx ] = $arr; |
|
| 279 | + $new_arr[$idx] = $arr; |
|
| 280 | 280 | ++$idx; |
| 281 | 281 | break; |
| 282 | 282 | } |
@@ -69,12 +69,12 @@ discard block |
||
| 69 | 69 | foreach ( $settings as $a ) { |
| 70 | 70 | if ( isset( $a['data'] ) ) { |
| 71 | 71 | $a['data'] = rawurldecode( $a['data'] ); |
| 72 | - $a = (array) json_decode( $a['data'] ); |
|
| 72 | + $a = ( array ) json_decode( $a['data'] ); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if ( $default_id === $a['id'] ) { |
| 76 | 76 | $search_default = false; |
| 77 | - $fixed_arr[ $key ] = $a; |
|
| 77 | + $fixed_arr[$key] = $a; |
|
| 78 | 78 | break; |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | foreach ( $stock as $def_arr ) { |
| 89 | 89 | if ( $default_id === $def_arr['id'] ) { |
| 90 | - $fixed_arr[ $key ] = $def_arr; |
|
| 90 | + $fixed_arr[$key] = $def_arr; |
|
| 91 | 91 | break; |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | global $pagenow, $post; |
| 114 | 114 | |
| 115 | 115 | $redux_settings = get_option( $this->opt_name ); |
| 116 | - $settings = $redux_settings[ $this->field_id ] ?? array(); |
|
| 116 | + $settings = $redux_settings[$this->field_id] ?? array(); |
|
| 117 | 117 | |
| 118 | 118 | if ( is_admin() && ( 'post-new.php' === $pagenow || 'post.php' === $pagenow ) ) { |
| 119 | 119 | $post_settings = get_post_meta( $post->ID, $this->field_id, true ); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $settings = $this->rebuild_setttings( $settings ); |
| 152 | 152 | |
| 153 | 153 | foreach ( $this->defaults as $key => $social_provider_default ) { |
| 154 | - $social_provider_option = ( $settings && is_array( $settings ) && array_key_exists( $key, $settings ) ) ? $settings[ $key ] : null; |
|
| 154 | + $social_provider_option = ( $settings && is_array( $settings ) && array_key_exists( $key, $settings ) ) ? $settings[$key] : null; |
|
| 155 | 155 | |
| 156 | 156 | $icon = ( $social_provider_option && array_key_exists( 'icon', $social_provider_option ) && $social_provider_option['icon'] ) ? $social_provider_option['icon'] : $social_provider_default['icon']; |
| 157 | 157 | $name = ( $social_provider_option && array_key_exists( 'name', $social_provider_option ) && $social_provider_option['name'] ) ? $social_provider_option['name'] : $social_provider_default['name']; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | echo '<li id="redux-social-item-' . esc_attr( $key ) . '" data-key="' . esc_attr( $key ) . '" style="display: none;">'; |
| 176 | 176 | echo '<div class="redux-social-item-container">'; |
| 177 | 177 | |
| 178 | - $social_provider_option = ( $settings && is_array( $settings ) && array_key_exists( $key, $settings ) ) ? $settings[ $key ] : null; |
|
| 178 | + $social_provider_option = ( $settings && is_array( $settings ) && array_key_exists( $key, $settings ) ) ? $settings[$key] : null; |
|
| 179 | 179 | $icon = ( $social_provider_option && array_key_exists( 'icon', $social_provider_option ) && $social_provider_option['icon'] ) ? $social_provider_option['icon'] : $social_provider_default['icon']; |
| 180 | 180 | $id = ( $social_provider_option && array_key_exists( 'id', $social_provider_option ) && $social_provider_option['id'] ) ? $social_provider_option['id'] : $social_provider_default['id']; |
| 181 | 181 | $class = ( $social_provider_option && array_key_exists( 'class', $social_provider_option ) && $social_provider_option['class'] ) ? $social_provider_option['class'] : $social_provider_default['class']; |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | // For customizer. |
| 314 | 314 | if ( isset( $arr['data'] ) ) { |
| 315 | 315 | $arr = rawurldecode( $arr['data'] ); |
| 316 | - $arr = (array) json_decode( $arr ); |
|
| 316 | + $arr = ( array ) json_decode( $arr ); |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | if ( $arr['enabled'] ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement |