@@ -42,11 +42,11 @@ |
||
42 | 42 | */ |
43 | 43 | public function get( $slug, array $action_args = array(), array $args = array() ) { |
44 | 44 | |
45 | - if ( ! isset( $this->classes[ $slug ] ) ) { |
|
45 | + if ( ! isset( $this->classes[$slug] ) ) { |
|
46 | 46 | return false; |
47 | 47 | } |
48 | 48 | |
49 | - return new $this->classes[ $slug ]( $slug, $action_args, $args ); |
|
49 | + return new $this->classes[$slug]( $slug, $action_args, $args ); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function get( $key ) { |
71 | 71 | |
72 | - if ( ! isset( $this->data[ $key ] ) ) { |
|
72 | + if ( ! isset( $this->data[$key] ) ) { |
|
73 | 73 | return null; |
74 | 74 | } |
75 | 75 | |
76 | - return $this->data[ $key ]; |
|
76 | + return $this->data[$key]; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function set( $key, $value ) { |
83 | 83 | |
84 | - if ( isset( $this->data[ $key ] ) && $this->data[ $key ] === $value ) { |
|
84 | + if ( isset( $this->data[$key] ) && $this->data[$key] === $value ) { |
|
85 | 85 | return true; |
86 | 86 | } |
87 | 87 | |
88 | - $this->data[ $key ] = $value; |
|
88 | + $this->data[$key] = $value; |
|
89 | 89 | |
90 | 90 | return update_site_option( $this->option_name, $this->data ); |
91 | 91 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function delete( $key ) { |
97 | 97 | |
98 | - unset( $this->data[ $key ] ); |
|
98 | + unset( $this->data[$key] ); |
|
99 | 99 | |
100 | 100 | return update_site_option( $this->option_name, $this->data ); |
101 | 101 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | 'valid' => true, |
78 | 78 | ); |
79 | 79 | |
80 | - return isset( $valid_statuses[ $status ] ); |
|
80 | + return isset( $valid_statuses[$status] ); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | 'valid' => true, |
94 | 94 | ); |
95 | 95 | |
96 | - return isset( $activatable_statuses[ $status ] ); |
|
96 | + return isset( $activatable_statuses[$status] ); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'valid' => true, |
148 | 148 | ); |
149 | 149 | |
150 | - return isset( $deactivatable_statuses[ $status ] ); |
|
150 | + return isset( $deactivatable_statuses[$status] ); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @since 2.4.0 |
113 | 113 | */ |
114 | 114 | public function has_update( $extension ) { |
115 | - return isset( $this->new_versions[ $extension ] ); |
|
115 | + return isset( $this->new_versions[$extension] ); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -120,18 +120,18 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function get_new_version( $extension ) { |
122 | 122 | |
123 | - if ( ! isset( $this->new_versions[ $extension ] ) ) { |
|
123 | + if ( ! isset( $this->new_versions[$extension] ) ) { |
|
124 | 124 | return false; |
125 | 125 | } |
126 | 126 | |
127 | - return $this->new_versions[ $extension ]; |
|
127 | + return $this->new_versions[$extension]; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
131 | 131 | * @since 2.4.0 |
132 | 132 | */ |
133 | 133 | public function set_new_version( $extension, $version ) { |
134 | - $this->new_versions[ $extension ] = $version; |
|
134 | + $this->new_versions[$extension] = $version; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | |
135 | 135 | $this->update_current++; |
136 | 136 | |
137 | - $results[ $extension ] = $this->do_upgrade( $extension ); |
|
137 | + $results[$extension] = $this->do_upgrade( $extension ); |
|
138 | 138 | |
139 | 139 | // Prevent credentials auth screen from displaying multiple times. |
140 | - if ( false === $results[ $extension ] && ! $this->bailed_early ) { |
|
140 | + if ( false === $results[$extension] && ! $this->bailed_early ) { |
|
141 | 141 | break; |
142 | 142 | } |
143 | 143 | } |
@@ -195,12 +195,12 @@ discard block |
||
195 | 195 | |
196 | 196 | $extensions = wordpoints_get_modules(); |
197 | 197 | |
198 | - if ( ! isset( $extensions[ $extension_file ] ) ) { |
|
198 | + if ( ! isset( $extensions[$extension_file] ) ) { |
|
199 | 199 | $this->bail_early( 'not_installed' ); |
200 | 200 | return false; |
201 | 201 | } |
202 | 202 | |
203 | - $extension_data = $extensions[ $extension_file ]; |
|
203 | + $extension_data = $extensions[$extension_file]; |
|
204 | 204 | |
205 | 205 | if ( $this->skin instanceof WordPoints_Extension_Upgrader_Skin_Bulk ) { |
206 | 206 | $this->skin->set_extension( $extension_file ); |
@@ -131,12 +131,12 @@ |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | if ( |
134 | - empty( $this->did_init[ $slug ] ) |
|
134 | + empty( $this->did_init[$slug] ) |
|
135 | 135 | && ! self::$main->silent |
136 | 136 | && $this->should_do_registry_init( $sub_app ) |
137 | 137 | ) { |
138 | 138 | |
139 | - $this->did_init[ $slug ] = true; |
|
139 | + $this->did_init[$slug] = true; |
|
140 | 140 | |
141 | 141 | /** |
142 | 142 | * Initialization of an app registry. |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $realpath_length = strlen( $module_realpath ); |
88 | 88 | |
89 | 89 | // Use unique keys, but still easy to sort by realpath length. |
90 | - self::$paths[ $realpath_length . '-' . $module_path ] = array( |
|
90 | + self::$paths[$realpath_length . '-' . $module_path] = array( |
|
91 | 91 | 'module_path' => $module_path, |
92 | 92 | 'module_realpath' => $module_realpath, |
93 | 93 | 'realpath_length' => $realpath_length, |
@@ -91,7 +91,7 @@ |
||
91 | 91 | $key = array_search( $extensions_dir, $wp_theme_directories, true ); |
92 | 92 | |
93 | 93 | if ( false !== $key ) { |
94 | - unset( $wp_theme_directories[ $key ] ); |
|
94 | + unset( $wp_theme_directories[$key] ); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | return $result; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | return false; |
62 | 62 | } |
63 | 63 | |
64 | - $to_switch[ $slug ] = $context; |
|
64 | + $to_switch[$slug] = $context; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $switched = array(); |
@@ -71,20 +71,20 @@ discard block |
||
71 | 71 | // switching code that runs in the case of a failure. |
72 | 72 | foreach ( $to_switch as $slug => $context ) { |
73 | 73 | |
74 | - if ( $context_guid[ $slug ] === $context->get_current_id() ) { |
|
74 | + if ( $context_guid[$slug] === $context->get_current_id() ) { |
|
75 | 75 | |
76 | - $switched[ $slug ] = false; |
|
76 | + $switched[$slug] = false; |
|
77 | 77 | |
78 | - } elseif ( $context->switch_to( $context_guid[ $slug ] ) ) { |
|
78 | + } elseif ( $context->switch_to( $context_guid[$slug] ) ) { |
|
79 | 79 | |
80 | - $switched[ $slug ] = true; |
|
80 | + $switched[$slug] = true; |
|
81 | 81 | |
82 | 82 | } else { |
83 | 83 | |
84 | 84 | // Failed to switch, reset everything back the way it was. |
85 | 85 | foreach ( $switched as $switched_slug => $is_switched ) { |
86 | 86 | if ( $is_switched ) { |
87 | - $to_switch[ $switched_slug ]->switch_back(); |
|
87 | + $to_switch[$switched_slug]->switch_back(); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 |