@@ 157-161 (lines=5) @@ | ||
154 | if ( isset( $_POST['post_type'] ) && ( $post_type_object = get_post_type_object( $_POST['post_type'] ) ) && $post_type_object->public ) { |
|
155 | if ( current_user_can( 'edit_post', $post_id ) ) { |
|
156 | if ( isset( $_POST['sharing_status_hidden'] ) ) { |
|
157 | if ( !isset( $_POST['enable_post_sharing'] ) ) { |
|
158 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
159 | } else { |
|
160 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
161 | } |
|
162 | } |
|
163 | } |
|
164 | } |
@@ 201-205 (lines=5) @@ | ||
198 | // Record sharing disable. Only needs to be done for WPCOM |
|
199 | if ( ! $this->in_jetpack ) { |
|
200 | if ( isset( $_POST['post_type'] ) && in_array( $_POST['post_type'], get_post_types( array( 'public' => true ) ) ) ) { |
|
201 | if ( ! isset( $_POST['wpl_enable_post_sharing'] ) ) { |
|
202 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
203 | } else { |
|
204 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
205 | } |
|
206 | } |
|
207 | } |
|
208 |