Changeset 44173
- Timestamp:
- 12/14/2018 06:03:35 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43834
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/rest-api.php
r44172 r44173 1368 1368 $server = rest_get_server(); 1369 1369 $data = (array) $response->get_data(); 1370 if ( method_exists( $server, 'get_compact_response_links' ) ) { 1371 $links = call_user_func( array( $server, 'get_compact_response_links' ), $response ); 1372 } else { 1373 $links = call_user_func( array( $server, 'get_response_links' ), $response ); 1374 } 1370 $links = $server->get_compact_response_links( $response ); 1375 1371 if ( ! empty( $links ) ) { 1376 1372 $data['_links'] = $links; -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
r43986 r44173 213 213 $data = (array) $response->get_data(); 214 214 $server = rest_get_server(); 215 216 if ( method_exists( $server, 'get_compact_response_links' ) ) { 217 $links = call_user_func( array( $server, 'get_compact_response_links' ), $response ); 218 } else { 219 $links = call_user_func( array( $server, 'get_response_links' ), $response ); 220 } 215 $links = $server->get_compact_response_links( $response ); 221 216 222 217 if ( ! empty( $links ) ) {
Note: See TracChangeset
for help on using the changeset viewer.