@@ 918-935 (lines=18) @@ | ||
915 | return $display; |
|
916 | } |
|
917 | ||
918 | public function process_request( $post, array $post_data ) { |
|
919 | ||
920 | $post_link = $this->get_share_url( $post->ID ); |
|
921 | ||
922 | // Using the same URL as the official button, which is *not* LinkedIn's documented sharing link |
|
923 | // https://www.linkedin.com/cws/share?url={url}&token=&isFramed=false |
|
924 | $linkedin_url = add_query_arg( array( |
|
925 | 'url' => rawurlencode( $post_link ), |
|
926 | ), 'https://www.linkedin.com/cws/share?token=&isFramed=false' ); |
|
927 | ||
928 | // Record stats |
|
929 | parent::process_request( $post, $post_data ); |
|
930 | ||
931 | // Redirect to LinkedIn |
|
932 | wp_redirect( $linkedin_url ); |
|
933 | die(); |
|
934 | } |
|
935 | ||
936 | public function display_footer() { |
|
937 | if ( ! $this->smart ) { |
|
938 | $this->js_dialog( $this->shortname, array( 'width' => 580, 'height' => 450 ) ); |
|
@@ 1760-1773 (lines=14) @@ | ||
1757 | $this->get_process_request_url( $post->ID ), _x( 'Skype', 'share to', 'jetpack' ), __( 'Click to share on Skype', 'jetpack' ), 'share=skype', 'sharing-skype-' . $post->ID ); |
|
1758 | } |
|
1759 | ||
1760 | public function process_request( $post, array $post_data ) { |
|
1761 | $skype_url = sprintf( |
|
1762 | 'https://web.skype.com/share?url=%1$s&lang=%2$s=&source=jetpack', |
|
1763 | rawurlencode( $this->get_share_url( $post->ID ) ), |
|
1764 | 'en-US' |
|
1765 | ); |
|
1766 | ||
1767 | // Record stats |
|
1768 | parent::process_request( $post, $post_data ); |
|
1769 | ||
1770 | // Redirect to Skype |
|
1771 | wp_redirect( $skype_url ); |
|
1772 | die(); |
|
1773 | } |
|
1774 | ||
1775 | public function display_footer() { |
|
1776 | if ( $this->smart ) : |