| @@ 124-128 (lines=5) @@ | ||
| 121 | // Record sharing disable. Only needs to be done for WPCOM |
|
| 122 | if ( ! $this->in_jetpack ) { |
|
| 123 | if ( isset( $_POST['post_type'] ) && in_array( $_POST['post_type'], get_post_types( array( 'public' => true ) ) ) ) { |
|
| 124 | if ( ! isset( $_POST['wpl_enable_post_sharing'] ) ) { |
|
| 125 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 126 | } else { |
|
| 127 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 128 | } |
|
| 129 | } |
|
| 130 | } |
|
| 131 | ||
| @@ 194-200 (lines=7) @@ | ||
| 191 | // Record sharing disable |
|
| 192 | if ( isset( $_POST['post_type'] ) && ( $post_type_object = get_post_type_object( $_POST['post_type'] ) ) && $post_type_object->public ) { |
|
| 193 | if ( current_user_can( 'edit_post', $post_id ) ) { |
|
| 194 | if ( isset( $_POST['sharing_status_hidden'] ) ) { |
|
| 195 | if ( !isset( $_POST['enable_post_sharing'] ) ) { |
|
| 196 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 197 | } else { |
|
| 198 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 199 | } |
|
| 200 | } |
|
| 201 | } |
|
| 202 | } |
|
| 203 | ||