Code Duplication    Length = 4-4 lines in 2 locations

modules/publicize/publicize.php 1 location

@@ 359-362 (lines=4) @@
356
		foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) {
357
			foreach ( $connections as $connection ) {
358
				$connection_data = '';
359
				if ( method_exists( $connection, 'get_meta' ) )
360
					$connection_data = $connection->get_meta( 'connection_data' );
361
				elseif ( ! empty( $connection['connection_data'] ) )
362
					$connection_data = $connection['connection_data'];
363
364
				/** This action is documented in modules/publicize/ui.php */
365
				if ( false == apply_filters( 'wpas_submit_post?', $submit_post, $post_id, $service_name, $connection_data ) ) {

modules/publicize/publicize-jetpack.php 1 location

@@ 459-462 (lines=4) @@
456
		foreach ( $services as $name => $connections ) {
457
			foreach ( $connections as $connection ) {
458
				$connection_data = '';
459
				if ( method_exists( $connection, 'get_meta' ) ) {
460
					$connection_data = $connection->get_meta( 'connection_data' );
461
				} elseif ( ! empty( $connection['connection_data'] ) ) {
462
					$connection_data = $connection['connection_data'];
463
				}
464
465
				/**