Code Duplication    Length = 7-7 lines in 3 locations

modules/sharedaddy/sharing-sources.php 3 locations

@@ 926-932 (lines=7) @@
923
	 *
924
	 * @param \WP_Post $post The current post being viewed.
925
	 */
926
	public function get_amp_display( $post ) {
927
		$attrs = array(
928
			'data-share-endpoint' => esc_url_raw( 'https://reddit.com/submit?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ) ),
929
		);
930
931
		return $this->build_amp_markup( $attrs );
932
	}
933
934
	public function process_request( $post, array $post_data ) {
935
		$reddit_url = $this->http() . '://reddit.com/submit?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) );
@@ 1756-1762 (lines=7) @@
1753
	 *
1754
	 * @param \WP_Post $post The current post being viewed.
1755
	 */
1756
	public function get_amp_display( $post ) {
1757
		$attrs = array(
1758
			'data-share-endpoint' => esc_url_raw( 'https://getpocket.com/save/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ) ),
1759
		);
1760
1761
		return $this->build_amp_markup( $attrs );
1762
	}
1763
1764
	function display_footer() {
1765
		if ( $this->smart ) :
@@ 1811-1817 (lines=7) @@
1808
	 *
1809
	 * @param \WP_Post $post The current post being viewed.
1810
	 */
1811
	public function get_amp_display( $post ) {
1812
		$attrs = array(
1813
			'data-share-endpoint' => esc_url_raw( 'https://telegram.me/share/url?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&text=' . rawurlencode( $this->get_share_title( $post->ID ) ) ),
1814
		);
1815
1816
		return $this->build_amp_markup( $attrs );
1817
	}
1818
1819
	function display_footer() {
1820
		$this->js_dialog( $this->shortname, array( 'width' => 450, 'height' => 450 ) );