|
@@ 181-185 (lines=5) @@
|
| 178 |
|
$response[$key] = (string) $this->format_date( $post->post_modified_gmt, $post->post_modified ); |
| 179 |
|
break; |
| 180 |
|
case 'title' : |
| 181 |
|
if ( 'display' === $context ) { |
| 182 |
|
$response[$key] = (string) get_the_title( $post->ID ); |
| 183 |
|
} else { |
| 184 |
|
$response[$key] = (string) htmlspecialchars_decode( $post->post_title, ENT_QUOTES ); |
| 185 |
|
} |
| 186 |
|
break; |
| 187 |
|
case 'URL' : |
| 188 |
|
if ( 'revision' === $post->post_type ) { |
|
@@ 238-242 (lines=5) @@
|
| 235 |
|
case 'parent' : // (object|false) |
| 236 |
|
if ( $post->post_parent ) { |
| 237 |
|
$parent = get_post( $post->post_parent ); |
| 238 |
|
if ( 'display' === $context ) { |
| 239 |
|
$parent_title = (string) get_the_title( $parent->ID ); |
| 240 |
|
} else { |
| 241 |
|
$parent_title = (string) htmlspecialchars_decode( $post->post_title, ENT_QUOTES ); |
| 242 |
|
} |
| 243 |
|
$response[$key] = (object) array( |
| 244 |
|
'ID' => (int) $parent->ID, |
| 245 |
|
'type' => (string) $parent->post_type, |