| @@ 235-245 (lines=11) @@ | ||
| 232 | $response[$key] = (string) $post->post_content; |
|
| 233 | } |
|
| 234 | break; |
|
| 235 | case 'excerpt' : |
|
| 236 | if ( 'display' === $context ) { |
|
| 237 | add_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 238 | ob_start(); |
|
| 239 | the_excerpt(); |
|
| 240 | $response[$key] = (string) ob_get_clean(); |
|
| 241 | remove_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 242 | } else { |
|
| 243 | $response[$key] = htmlspecialchars_decode( (string) $post->post_excerpt, ENT_QUOTES ); |
|
| 244 | } |
|
| 245 | break; |
|
| 246 | case 'status' : |
|
| 247 | $response[$key] = (string) get_post_status( $post->ID ); |
|
| 248 | break; |
|
| @@ 219-229 (lines=11) @@ | ||
| 216 | $response[$key] = (string) $post->post_content; |
|
| 217 | } |
|
| 218 | break; |
|
| 219 | case 'excerpt' : |
|
| 220 | if ( 'display' === $context ) { |
|
| 221 | add_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 222 | ob_start(); |
|
| 223 | the_excerpt(); |
|
| 224 | $response[$key] = (string) ob_get_clean(); |
|
| 225 | remove_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 226 | } else { |
|
| 227 | $response[$key] = htmlspecialchars_decode( (string) $post->post_excerpt, ENT_QUOTES ); |
|
| 228 | } |
|
| 229 | break; |
|
| 230 | case 'status' : |
|
| 231 | $response[$key] = (string) get_post_status( $post->ID ); |
|
| 232 | break; |
|