| @@ 226-234 (lines=9) @@ | ||
| 223 | case 'short_URL' : |
|
| 224 | $response[$key] = (string) esc_url_raw( wp_get_shortlink( $post->ID ) ); |
|
| 225 | break; |
|
| 226 | case 'content' : |
|
| 227 | if ( 'display' === $context ) { |
|
| 228 | add_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 229 | $response[$key] = (string) $this->get_the_post_content_for_display(); |
|
| 230 | remove_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 231 | } else { |
|
| 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' ) ); |
|
| @@ 209-217 (lines=9) @@ | ||
| 206 | case 'short_URL' : |
|
| 207 | $response[$key] = (string) esc_url_raw( wp_get_shortlink( $post->ID ) ); |
|
| 208 | break; |
|
| 209 | case 'content' : |
|
| 210 | if ( 'display' === $context ) { |
|
| 211 | add_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 212 | $response[$key] = (string) $this->get_the_post_content_for_display(); |
|
| 213 | remove_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|
| 214 | } else { |
|
| 215 | $response[$key] = (string) $post->post_content; |
|
| 216 | } |
|
| 217 | break; |
|
| 218 | case 'excerpt' : |
|
| 219 | if ( 'display' === $context ) { |
|
| 220 | add_filter( 'the_password_form', array( $this, 'the_password_form' ) ); |
|