Ticket #42238: 42238.patch
| File 42238.patch, 543 bytes (added by , 8 years ago) |
|---|
-
.php
old new 46 46 $this->post_type = $post_type; 47 47 $this->namespace = 'wp/v2'; 48 48 $obj = get_post_type_object( $post_type ); 49 $this->rest_base = ! empty( $obj->rest_base ) ? $obj->rest_base : $obj->name; 50 49 if ($obj) { 50 $this->rest_base = !empty($obj->rest_base) ? $obj->rest_base : $obj->name; 51 } 52 51 53 $this->meta = new WP_REST_Post_Meta_Fields( $this->post_type ); 52 54 } 53 55