~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-includes/rest-api/class-wp-rest-response.php

  • Committer: Barry Price
  • Date: 2019-02-22 03:51:26 UTC
  • mfrom: (1.2.12 upstream)
  • Revision ID: barry.price@canonical.com-20190222035126-o28k38qs8jfyjsxt
Merge WP5.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
        }
194
194
 
195
195
        /**
196
 
         * Retrieves the handler that was responsible for generating the response.
 
196
         * Sets the handler that was responsible for generating the response.
197
197
         *
198
198
         * @since 4.4.0
199
199
         *
232
232
                        $data = $this->get_data();
233
233
                        $error->add( $data['code'], $data['message'], $data['data'] );
234
234
                        if ( ! empty( $data['additional_errors'] ) ) {
235
 
                                foreach( $data['additional_errors'] as $err ) {
 
235
                                foreach ( $data['additional_errors'] as $err ) {
236
236
                                        $error->add( $err['code'], $err['message'], $err['data'] );
237
237
                                }
238
238
                        }
253
253
        public function get_curies() {
254
254
                $curies = array(
255
255
                        array(
256
 
                                'name' => 'wp',
257
 
                                'href' => 'https://api.w.org/{rel}',
 
256
                                'name'      => 'wp',
 
257
                                'href'      => 'https://api.w.org/{rel}',
258
258
                                'templated' => true,
259
259
                        ),
260
260
                );