Code Duplication    Length = 4-4 lines in 2 locations

modules/publicize/publicize.php 1 location

@@ 367-370 (lines=4) @@
364
		foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) {
365
			foreach ( $connections as $connection ) {
366
				$connection_data = '';
367
				if ( method_exists( $connection, 'get_meta' ) )
368
					$connection_data = $connection->get_meta( 'connection_data' );
369
				elseif ( ! empty( $connection['connection_data'] ) )
370
					$connection_data = $connection['connection_data'];
371
372
				/** This action is documented in modules/publicize/ui.php */
373
				if ( false == apply_filters( 'wpas_submit_post?', $submit_post, $post_id, $service_name, $connection_data ) ) {

modules/publicize/ui.php 1 location

@@ 557-560 (lines=4) @@
554
					foreach ( $services as $name => $connections ) {
555
						foreach ( $connections as $connection ) {
556
							$connection_data = '';
557
							if ( method_exists( $connection, 'get_meta' ) )
558
								$connection_data = $connection->get_meta( 'connection_data' );
559
							elseif ( ! empty( $connection['connection_data'] ) )
560
								$connection_data = $connection['connection_data'];
561
562
							/**
563
							 * Filter whether a post should be publicized to a given service.