Code Duplication    Length = 7-8 lines in 10 locations

modules/sharedaddy/sharing-sources.php 10 locations

@@ 373-380 (lines=8) @@
370
class Share_Email extends Sharing_Source {
371
	public $shortname = 'email';
372
	public $icon = '\f410';
373
	public function __construct( $id, array $settings ) {
374
		parent::__construct( $id, $settings );
375
376
		if ( 'official' == $this->button_style ) {
377
			$this->smart = true;
378
		} else {
379
			$this->smart = false;
380
		}
381
	}
382
383
	public function get_name() {
@@ 560-567 (lines=8) @@
557
	// 'https://dev.twitter.com/rest/reference/get/help/configuration' ( 2015/02/06 ) short_url_length is 22, short_url_length_https is 23
558
	public $short_url_length = 24;
559
560
	public function __construct( $id, array $settings ) {
561
		parent::__construct( $id, $settings );
562
563
		if ( 'official' == $this->button_style ) {
564
			$this->smart = true;
565
		} else {
566
			$this->smart = false;
567
		}
568
	}
569
570
	public function get_name() {
@@ 1417-1423 (lines=7) @@
1414
class Share_Tumblr extends Sharing_Source {
1415
	public $shortname = 'tumblr';
1416
	public $icon = '\f214';
1417
	public function __construct( $id, array $settings ) {
1418
		parent::__construct( $id, $settings );
1419
		if ( 'official' == $this->button_style ) {
1420
			$this->smart = true;
1421
		} else {
1422
			$this->smart = false;
1423
		}
1424
	}
1425
1426
	public function get_name() {
@@ 1466-1472 (lines=7) @@
1463
	public $shortname = 'pinterest';
1464
	public $icon = '\f209';
1465
1466
	public function __construct( $id, array $settings ) {
1467
		parent::__construct( $id, $settings );
1468
		if ( 'official' == $this->button_style ) {
1469
			$this->smart = true;
1470
		} else {
1471
			$this->smart = false;
1472
		}
1473
	}
1474
1475
	public function get_name() {
@@ 1618-1625 (lines=8) @@
1615
	public $shortname = 'pocket';
1616
	public $icon = '\f224';
1617
1618
	public function __construct( $id, array $settings ) {
1619
		parent::__construct( $id, $settings );
1620
1621
		if ( 'official' == $this->button_style ) {
1622
			$this->smart = true;
1623
		} else {
1624
			$this->smart = false;
1625
		}
1626
	}
1627
1628
	public function get_name() {
@@ 769-776 (lines=8) @@
766
class Share_Reddit extends Sharing_Source {
767
	public $shortname = 'reddit';
768
	public $icon = '\f222';
769
	public function __construct( $id, array $settings ) {
770
		parent::__construct( $id, $settings );
771
772
		if ( 'official' == $this->button_style ) {
773
			$this->smart = true;
774
		} else {
775
			$this->smart = false;
776
		}
777
	}
778
779
	public function get_name() {
@@ 806-813 (lines=8) @@
803
class Share_LinkedIn extends Sharing_Source {
804
	public $shortname = 'linkedin';
805
	public $icon = '\f207';
806
	public function __construct( $id, array $settings ) {
807
		parent::__construct( $id, $settings );
808
809
		if ( 'official' == $this->button_style ) {
810
			$this->smart = true;
811
		} else {
812
			$this->smart = false;
813
		}
814
	}
815
816
	public function get_name() {
@@ 1017-1024 (lines=8) @@
1014
class Share_Print extends Sharing_Source {
1015
	public $shortname = 'print';
1016
	public $icon = '\f469';
1017
	public function __construct( $id, array $settings ) {
1018
		parent::__construct( $id, $settings );
1019
1020
		if ( 'official' == $this->button_style ) {
1021
			$this->smart = true;
1022
		} else {
1023
			$this->smart = false;
1024
		}
1025
	}
1026
1027
	public function get_name() {
@@ 1039-1046 (lines=8) @@
1036
class Share_PressThis extends Sharing_Source {
1037
	public $shortname = 'pressthis';
1038
	public $icon = '\f205';
1039
	public function __construct( $id, array $settings ) {
1040
		parent::__construct( $id, $settings );
1041
1042
		if ( 'official' == $this->button_style ) {
1043
			$this->smart = true;
1044
		} else {
1045
			$this->smart = false;
1046
		}
1047
	}
1048
1049
	public function get_name() {
@@ 1117-1124 (lines=8) @@
1114
	public $icon = '\f218';
1115
	private $state = false;
1116
1117
	public function __construct( $id, array $settings ) {
1118
		parent::__construct( $id, $settings );
1119
1120
		if ( 'official' == $this->button_style ) {
1121
			$this->smart = true;
1122
		} else {
1123
			$this->smart = false;
1124
		}
1125
	}
1126
1127
	public function get_name() {