|
@@ 1005-1022 (lines=18) @@
|
| 1002 |
|
return $display; |
| 1003 |
|
} |
| 1004 |
|
|
| 1005 |
|
public function process_request( $post, array $post_data ) { |
| 1006 |
|
|
| 1007 |
|
$post_link = $this->get_share_url( $post->ID ); |
| 1008 |
|
|
| 1009 |
|
// Using the same URL as the official button, which is *not* LinkedIn's documented sharing link |
| 1010 |
|
// https://www.linkedin.com/cws/share?url={url}&token=&isFramed=false |
| 1011 |
|
$linkedin_url = add_query_arg( array( |
| 1012 |
|
'url' => rawurlencode( $post_link ), |
| 1013 |
|
), 'https://www.linkedin.com/cws/share?token=&isFramed=false' ); |
| 1014 |
|
|
| 1015 |
|
// Record stats |
| 1016 |
|
parent::process_request( $post, $post_data ); |
| 1017 |
|
|
| 1018 |
|
// Redirect to LinkedIn |
| 1019 |
|
wp_redirect( $linkedin_url ); |
| 1020 |
|
die(); |
| 1021 |
|
} |
| 1022 |
|
|
| 1023 |
|
public function display_footer() { |
| 1024 |
|
if ( ! $this->smart ) { |
| 1025 |
|
$this->js_dialog( $this->shortname, array( 'width' => 580, 'height' => 450 ) ); |
|
@@ 2018-2031 (lines=14) @@
|
| 2015 |
|
return $this->build_amp_markup( $attrs ); |
| 2016 |
|
} |
| 2017 |
|
|
| 2018 |
|
public function process_request( $post, array $post_data ) { |
| 2019 |
|
$skype_url = sprintf( |
| 2020 |
|
'https://web.skype.com/share?url=%1$s&lang=%2$s=&source=jetpack', |
| 2021 |
|
rawurlencode( $this->get_share_url( $post->ID ) ), |
| 2022 |
|
'en-US' |
| 2023 |
|
); |
| 2024 |
|
|
| 2025 |
|
// Record stats |
| 2026 |
|
parent::process_request( $post, $post_data ); |
| 2027 |
|
|
| 2028 |
|
// Redirect to Skype |
| 2029 |
|
wp_redirect( $skype_url ); |
| 2030 |
|
die(); |
| 2031 |
|
} |
| 2032 |
|
|
| 2033 |
|
public function display_footer() { |
| 2034 |
|
if ( $this->smart ) : |