PluginProbe
Elementor Website Builder – more than just a page builder / 3.32.0-dev2
Elementor Website Builder – more than just a page builder v3.32.0-dev2
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 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/utils/api/error-builder.php +1 -13 4.2.43.32.0-dev2 View file →
@@ -5,15 +5,12 @@
5 5 class Error_Builder {
6 6 private string $message;
7 7 private int $status;
8 8 private string $code;
9 - private array $meta;
10 9
11 10 private function __construct( $code, $status = 500 ) {
12 11 $this->code = $code;
13 12 $this->status = $status;
14 - $this->message = '';
15 - $this->meta = [];
16 13 }
17 14
18 15 public static function make( $code, $status = 500 ) {
19 16 return new self( $code, $status );
@@ -30,17 +27,8 @@
30 27
31 28 return $this;
32 29 }
33 30
34 - public function set_meta( array $meta ) {
35 - $this->meta = $meta;
36 -
37 - return $this;
38 - }
39 -
40 31 public function build() {
41 - return new \WP_Error( $this->code, $this->message, [
42 - 'status' => $this->status,
43 - 'meta' => $this->meta,
44 - ], );
32 + return new \WP_Error( $this->code, $this->message, [ 'status' => $this->status ] );
45 33 }
46 34 }