@@ -114,14 +114,14 @@ |
||
114 | 114 | /** Require critical legacy core files. @todo Deprecate */ |
115 | 115 | require_once $this->plugin->dir( 'includes/import-functions.php' ); |
116 | 116 | require_once $this->plugin->dir( 'includes/helper-functions.php' ); |
117 | - require_once $this->plugin->dir( 'includes/class-common.php'); |
|
118 | - require_once $this->plugin->dir( 'includes/connector-functions.php'); |
|
117 | + require_once $this->plugin->dir( 'includes/class-common.php' ); |
|
118 | + require_once $this->plugin->dir( 'includes/connector-functions.php' ); |
|
119 | 119 | require_once $this->plugin->dir( 'includes/class-gravityview-compatibility.php' ); |
120 | 120 | require_once $this->plugin->dir( 'includes/class-gravityview-roles-capabilities.php' ); |
121 | 121 | require_once $this->plugin->dir( 'includes/class-gravityview-admin-notices.php' ); |
122 | 122 | require_once $this->plugin->dir( 'includes/class-admin.php' ); |
123 | - require_once $this->plugin->dir( 'includes/class-post-types.php'); |
|
124 | - require_once $this->plugin->dir( 'includes/class-cache.php'); |
|
123 | + require_once $this->plugin->dir( 'includes/class-post-types.php' ); |
|
124 | + require_once $this->plugin->dir( 'includes/class-cache.php' ); |
|
125 | 125 | |
126 | 126 | /** |
127 | 127 | * GravityView extensions and widgets. |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | */ |
47 | 47 | function gravityview_import_helper_fix_line_breaks( $postmeta = array(), $post_id = 0, $post = array() ) { |
48 | 48 | |
49 | - if ( empty( $post['postmeta'] ) ) { |
|
49 | + if ( empty( $post[ 'postmeta' ] ) ) { |
|
50 | 50 | return $postmeta; |
51 | 51 | } |
52 | 52 | |
53 | - if ( 'gravityview' !== $post['post_type'] ) { |
|
53 | + if ( 'gravityview' !== $post[ 'post_type' ] ) { |
|
54 | 54 | return $postmeta; |
55 | 55 | } |
56 | 56 | |
@@ -62,27 +62,27 @@ discard block |
||
62 | 62 | $performed_fix = false; |
63 | 63 | |
64 | 64 | foreach ( $postmeta as &$meta ) { |
65 | - $key = $meta['key']; |
|
65 | + $key = $meta[ 'key' ]; |
|
66 | 66 | |
67 | 67 | if ( ! in_array( $key, $keys_to_fix, true ) ) { |
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | |
71 | - $is_valid_serialized_data = maybe_unserialize( $meta['value'] ); |
|
71 | + $is_valid_serialized_data = maybe_unserialize( $meta[ 'value' ] ); |
|
72 | 72 | |
73 | 73 | // The values are not corrupted serialized data. No need to fix. |
74 | 74 | if ( false !== $is_valid_serialized_data ) { |
75 | 75 | continue; |
76 | 76 | } |
77 | 77 | |
78 | - $meta['value'] = str_replace( "\n", "\n\n", $meta['value'] ); |
|
78 | + $meta[ 'value' ] = str_replace( "\n", "\n\n", $meta[ 'value' ] ); |
|
79 | 79 | |
80 | 80 | $performed_fix = true; |
81 | 81 | } |
82 | 82 | |
83 | 83 | // Leave a note that this modification has been done. We'll use it later. |
84 | 84 | if ( $performed_fix ) { |
85 | - $postmeta[] = array( |
|
85 | + $postmeta[ ] = array( |
|
86 | 86 | 'key' => '_gravityview_fixed_import_serialization', |
87 | 87 | 'value' => 1, |
88 | 88 | ); |