@@ 806-823 (lines=18) @@ | ||
803 | return $display; |
|
804 | } |
|
805 | ||
806 | public function process_request( $post, array $post_data ) { |
|
807 | ||
808 | $post_link = $this->get_share_url( $post->ID ); |
|
809 | ||
810 | // Using the same URL as the official button, which is *not* LinkedIn's documented sharing link |
|
811 | // https://www.linkedin.com/cws/share?url={url}&token=&isFramed=false |
|
812 | ||
813 | $linkedin_url = add_query_arg( array( |
|
814 | 'url' => rawurlencode( $post_link ), |
|
815 | ), 'https://www.linkedin.com/cws/share?token=&isFramed=false' ); |
|
816 | ||
817 | // Record stats |
|
818 | parent::process_request( $post, $post_data ); |
|
819 | ||
820 | // Redirect to LinkedIn |
|
821 | wp_redirect( $linkedin_url ); |
|
822 | die(); |
|
823 | } |
|
824 | ||
825 | public function display_footer() { |
|
826 | if ( !$this->smart ) { |
|
@@ 1647-1660 (lines=14) @@ | ||
1644 | $this->get_process_request_url( $post->ID ), _x( 'Skype', 'share to', 'jetpack' ), __( 'Share on Skype', 'jetpack' ), 'share=skype', 'sharing-skype-' . $post->ID ); |
|
1645 | } |
|
1646 | ||
1647 | public function process_request( $post, array $post_data ) { |
|
1648 | $skype_url = sprintf( |
|
1649 | 'https://web.skype.com/share?url=%1$s&lang=%2$s=&source=jetpack', |
|
1650 | rawurlencode( $this->get_share_url( $post->ID ) ), |
|
1651 | 'en-US' |
|
1652 | ); |
|
1653 | ||
1654 | // Record stats |
|
1655 | parent::process_request( $post, $post_data ); |
|
1656 | ||
1657 | // Redirect to Skype |
|
1658 | wp_redirect( $skype_url ); |
|
1659 | die(); |
|
1660 | } |
|
1661 | ||
1662 | public function display_footer() { |
|
1663 | if ( $this->smart ) : |