| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | function __construct() { |
||
| 23 | $post = get_post( $_GET['copy'] ); |
||
| 24 | error_log($post); |
||
| 25 | if ( ! $post || ! $this->user_can_edit_post( $post ) ) { |
||
| 26 | return; |
||
| 27 | } |
||
| 28 | |||
| 29 | $this->post = $post; |
||
| 30 | |||
| 31 | add_filter( 'default_title', array( $this, 'default_title' ) ); |
||
| 32 | add_filter( 'default_content', array( $this, 'default_content' ) ); |
||
| 33 | add_filter( 'default_excerpt', array( $this, 'default_excerpt' ) ); |
||
| 34 | |||
| 35 | do_action( 'jetpack_post_copy_post' ); |
||
| 36 | } |
||
| 37 | |||
| 59 |