| @@ 218-222 (lines=5) @@ | ||
| 215 | // Record sharing disable. Only needs to be done for WPCOM |
|
| 216 | if ( ! $this->in_jetpack ) { |
|
| 217 | if ( isset( $_POST['post_type'] ) && in_array( $_POST['post_type'], get_post_types( array( 'public' => true ) ) ) ) { |
|
| 218 | if ( ! isset( $_POST['wpl_enable_post_sharing'] ) ) { |
|
| 219 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 220 | } else { |
|
| 221 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 222 | } |
|
| 223 | } |
|
| 224 | } |
|
| 225 | ||
| @@ 147-151 (lines=5) @@ | ||
| 144 | if ( isset( $_POST['post_type'] ) && ( $post_type_object = get_post_type_object( $_POST['post_type'] ) ) && $post_type_object->public ) { |
|
| 145 | if ( current_user_can( 'edit_post', $post_id ) ) { |
|
| 146 | if ( isset( $_POST['sharing_status_hidden'] ) ) { |
|
| 147 | if ( !isset( $_POST['enable_post_sharing'] ) ) { |
|
| 148 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 149 | } else { |
|
| 150 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | } |
|
| 154 | } |
|