Code Duplication    Length = 7-8 lines in 2 locations

modules/publicize/publicize.php 2 locations

@@ 901-908 (lines=8) @@
898
						// Also make sure that the service-specific input isn't there.
899
						// If the user connected to a new service 'in-page' then a hidden field with the service
900
						// name is added, so we just assume they wanted to Publicize to that service.
901
						if ( empty( $_POST[$this->ADMIN_PAGE]['submit'][$service_name] ) ) {
902
							// Nothing seems to be checked, so we're going to mark this one to be skipped
903
							update_post_meta( $post_id, $this->POST_SKIP . $unique_id, 1 );
904
							continue;
905
						} else {
906
							// clean up any stray post meta
907
							delete_post_meta( $post_id, $this->POST_SKIP . $unique_id );
908
						}
909
					} else {
910
						// The checkbox for this connection is explicitly checked -- make sure we DON'T skip it
911
						delete_post_meta( $post_id, $this->POST_SKIP . $unique_id );
@@ 1245-1251 (lines=7) @@
1242
							$unique_id = $connection['connection_data']['token_id'];
1243
						}
1244
1245
						if ( $this->connection_should_share( $publicize_field['connections'], $unique_id ) ) {
1246
							// Delete skip flag meta key.
1247
							delete_post_meta( $post->ID, $this->POST_SKIP . $unique_id );
1248
						} else {
1249
							// Flag connection to be skipped for this post.
1250
							update_post_meta( $post->ID, $this->POST_SKIP . $unique_id, 1 );
1251
						}
1252
					}
1253
				}
1254
			}