Code Duplication    Length = 4-4 lines in 2 locations

modules/publicize/publicize.php 1 location

@@ 352-355 (lines=4) @@
349
		foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) {
350
			foreach ( $connections as $connection ) {
351
				$connection_data = '';
352
				if ( method_exists( $connection, 'get_meta' ) )
353
					$connection_data = $connection->get_meta( 'connection_data' );
354
				elseif ( ! empty( $connection['connection_data'] ) )
355
					$connection_data = $connection['connection_data'];
356
357
				/** This action is documented in modules/publicize/ui.php */
358
				if ( false == apply_filters( 'wpas_submit_post?', $submit_post, $post_id, $service_name, $connection_data ) ) {

modules/publicize/ui.php 1 location

@@ 336-339 (lines=4) @@
333
					foreach ( $services as $name => $connections ) {
334
						foreach ( $connections as $connection ) {
335
							$connection_data = '';
336
							if ( method_exists( $connection, 'get_meta' ) )
337
								$connection_data = $connection->get_meta( 'connection_data' );
338
							elseif ( ! empty( $connection['connection_data'] ) )
339
								$connection_data = $connection['connection_data'];
340
341
							/**
342
							 * Filter whether a post should be publicized to a given service.