PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.0-beta1
Elementor Website Builder – more than just a page builder v4.0.0-beta1
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | modules/variables/services/variables-service.php +2 -6 4.1.0 → 4.0.0-beta1 View file →
@@ -166,17 +166,13 @@
166 166 public function restore( string $id, $overrides = [] ) {
167 167 $collection = $this->repo->load();
168 168 $variable = $collection->find_or_fail( $id );
169 169
170 - $label = $variable->label();
170 + $collection->assert_limit_not_reached();
171 171
172 172 if ( isset( $overrides['label'] ) ) {
173 - $label = $overrides['label'];
173 + $collection->assert_label_is_unique( $overrides['label'], $variable->id() );
174 174 }
175 -
176 - $collection->assert_limit_not_reached();
177 -
178 - $collection->assert_label_is_unique( $label, $variable->id() );
179 175
180 176 $variable->apply_changes( $overrides );
181 177 $variable->validate();
182 178