|
@@ 145-151 (lines=7) @@
|
| 142 |
|
return apply_filters( 'cmb2_rest_prepare', rest_ensure_response( $data ), $this->request, $this ); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
protected function initiate_rest_read_box( $request, $request_type ) { |
| 146 |
|
$this->initiate_rest_box( $request, $request_type ); |
| 147 |
|
|
| 148 |
|
if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_read ) { |
| 149 |
|
$this->rest_box = new WP_Error( 'cmb2_rest_error', __( 'This box does not have read permissions.', 'cmb2' ) ); |
| 150 |
|
} |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
protected function initiate_rest_write_box( $request, $request_type ) { |
| 154 |
|
$this->initiate_rest_box( $request, $request_type ); |
|
@@ 153-159 (lines=7) @@
|
| 150 |
|
} |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
protected function initiate_rest_write_box( $request, $request_type ) { |
| 154 |
|
$this->initiate_rest_box( $request, $request_type ); |
| 155 |
|
|
| 156 |
|
if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_write ) { |
| 157 |
|
$this->rest_box = new WP_Error( 'cmb2_rest_error', __( 'This box does not have write permissions.', 'cmb2' ) ); |
| 158 |
|
} |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
protected function initiate_rest_box( $request, $request_type ) { |
| 162 |
|
$this->initiate_request( $request, $request_type ); |