Code Duplication    Length = 10-11 lines in 3 locations

modules/publicize/publicize-jetpack.php 3 locations

@@ 657-667 (lines=11) @@
654
655
	}
656
657
	function set_remote_publicize_options( $id, $options ) {
658
		Jetpack::load_xml_rpc_client();
659
		$xml = new Jetpack_IXR_Client();
660
		$xml->query( 'jetpack.setPublicizeOptions', $id, $options );
661
662
		if ( ! $xml->isError() ) {
663
			$response = $xml->getResponse();
664
			Jetpack_Options::update_option( 'publicize_connections', $response );
665
			$this->globalization();
666
		}
667
	}
668
669
	function options_page_twitter() {
670
		Publicize_UI::options_page_other( 'twitter' );
@@ 252-261 (lines=10) @@
249
		}
250
	}
251
252
	function globalize_connection( $connection_id ) {
253
		Jetpack::load_xml_rpc_client();
254
		$xml = new Jetpack_IXR_Client();
255
		$xml->query( 'jetpack.globalizePublicizeConnection', $connection_id, 'globalize' );
256
257
		if ( ! $xml->isError() ) {
258
			$response = $xml->getResponse();
259
			$this->receive_updated_publicize_connections( $response );
260
		}
261
	}
262
263
	function unglobalize_connection( $connection_id ) {
264
		Jetpack::load_xml_rpc_client();
@@ 263-272 (lines=10) @@
260
		}
261
	}
262
263
	function unglobalize_connection( $connection_id ) {
264
		Jetpack::load_xml_rpc_client();
265
		$xml = new Jetpack_IXR_Client();
266
		$xml->query( 'jetpack.globalizePublicizeConnection', $connection_id, 'unglobalize' );
267
268
		if ( ! $xml->isError() ) {
269
			$response = $xml->getResponse();
270
			$this->receive_updated_publicize_connections( $response );
271
		}
272
	}
273
274
	function connect_url( $service_name, $for = 'publicize' ) {
275
		return Jetpack_Keyring_Service_Helper::connect_url( $service_name, $for );