| @@ 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 | } |
|
| @@ 202-206 (lines=5) @@ | ||
| 199 | // Record sharing disable. Only needs to be done for WPCOM |
|
| 200 | if ( ! $this->in_jetpack ) { |
|
| 201 | if ( isset( $_POST['post_type'] ) && in_array( $_POST['post_type'], get_post_types( array( 'public' => true ) ) ) ) { |
|
| 202 | if ( ! isset( $_POST['wpl_enable_post_sharing'] ) ) { |
|
| 203 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 204 | } else { |
|
| 205 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 206 | } |
|
| 207 | } |
|
| 208 | } |
|
| 209 | ||