|
@@ 1000-1017 (lines=18) @@
|
| 997 |
|
return $display; |
| 998 |
|
} |
| 999 |
|
|
| 1000 |
|
public function process_request( $post, array $post_data ) { |
| 1001 |
|
|
| 1002 |
|
$post_link = $this->get_share_url( $post->ID ); |
| 1003 |
|
|
| 1004 |
|
// Using the same URL as the official button, which is *not* LinkedIn's documented sharing link |
| 1005 |
|
// https://www.linkedin.com/cws/share?url={url}&token=&isFramed=false |
| 1006 |
|
$linkedin_url = add_query_arg( array( |
| 1007 |
|
'url' => rawurlencode( $post_link ), |
| 1008 |
|
), 'https://www.linkedin.com/cws/share?token=&isFramed=false' ); |
| 1009 |
|
|
| 1010 |
|
// Record stats |
| 1011 |
|
parent::process_request( $post, $post_data ); |
| 1012 |
|
|
| 1013 |
|
// Redirect to LinkedIn |
| 1014 |
|
wp_redirect( $linkedin_url ); |
| 1015 |
|
die(); |
| 1016 |
|
} |
| 1017 |
|
|
| 1018 |
|
public function display_footer() { |
| 1019 |
|
if ( ! $this->smart ) { |
| 1020 |
|
$this->js_dialog( $this->shortname, array( 'width' => 580, 'height' => 450 ) ); |
|
@@ 1943-1956 (lines=14) @@
|
| 1940 |
|
return $this->build_amp_markup( $attrs ); |
| 1941 |
|
} |
| 1942 |
|
|
| 1943 |
|
public function process_request( $post, array $post_data ) { |
| 1944 |
|
$skype_url = sprintf( |
| 1945 |
|
'https://web.skype.com/share?url=%1$s&lang=%2$s=&source=jetpack', |
| 1946 |
|
rawurlencode( $this->get_share_url( $post->ID ) ), |
| 1947 |
|
'en-US' |
| 1948 |
|
); |
| 1949 |
|
|
| 1950 |
|
// Record stats |
| 1951 |
|
parent::process_request( $post, $post_data ); |
| 1952 |
|
|
| 1953 |
|
// Redirect to Skype |
| 1954 |
|
wp_redirect( $skype_url ); |
| 1955 |
|
die(); |
| 1956 |
|
} |
| 1957 |
|
|
| 1958 |
|
public function display_footer() { |
| 1959 |
|
if ( $this->smart ) : |