@@ 311-313 (lines=3) @@ | ||
308 | true |
|
309 | ); |
|
310 | ||
311 | if ( ! $this->field ) { |
|
312 | return new WP_Error( 'cmb2_rest_no_field_by_id_error', __( 'No field found by that id.', 'cmb2' ), array( |
|
313 | 'status' => 403, |
|
314 | ) ); |
|
315 | } |
|
316 | ||
@@ 340-342 (lines=3) @@ | ||
337 | public function prepare_read_field( $field ) { |
|
338 | $this->field = $this->rest_box->field_can_read( $field, true ); |
|
339 | ||
340 | if ( ! $this->field ) { |
|
341 | return new WP_Error( 'cmb2_rest_no_field_by_id_error', __( 'No field found by that id.', 'cmb2' ), array( |
|
342 | 'status' => 403, |
|
343 | ) ); |
|
344 | } |
|
345 |