|
@@ 756-765 (lines=10) @@
|
| 753 |
|
return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Reddit', 'share to', 'jetpack' ), __( 'Click to share on Reddit', 'jetpack' ), 'share=reddit' ); |
| 754 |
|
} |
| 755 |
|
|
| 756 |
|
public function process_request( $post, array $post_data ) { |
| 757 |
|
$reddit_url = $this->http() . '://reddit.com/submit?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ); |
| 758 |
|
|
| 759 |
|
// Record stats |
| 760 |
|
parent::process_request( $post, $post_data ); |
| 761 |
|
|
| 762 |
|
// Redirect to Reddit |
| 763 |
|
wp_redirect( $reddit_url ); |
| 764 |
|
die(); |
| 765 |
|
} |
| 766 |
|
} |
| 767 |
|
|
| 768 |
|
class Share_LinkedIn extends Sharing_Source { |
|
@@ 932-941 (lines=10) @@
|
| 929 |
|
return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Facebook', 'share to', 'jetpack' ), __( 'Share on Facebook', 'jetpack' ), 'share=facebook', 'sharing-facebook-' . $post->ID ); |
| 930 |
|
} |
| 931 |
|
|
| 932 |
|
public function process_request( $post, array $post_data ) { |
| 933 |
|
$fb_url = $this->http() . '://www.facebook.com/sharer.php?u=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&t=' . rawurlencode( $this->get_share_title( $post->ID ) ); |
| 934 |
|
|
| 935 |
|
// Record stats |
| 936 |
|
parent::process_request( $post, $post_data ); |
| 937 |
|
|
| 938 |
|
// Redirect to Facebook |
| 939 |
|
wp_redirect( $fb_url ); |
| 940 |
|
die(); |
| 941 |
|
} |
| 942 |
|
|
| 943 |
|
public function display_footer() { |
| 944 |
|
$this->js_dialog( $this->shortname ); |
|
@@ 1375-1383 (lines=9) @@
|
| 1372 |
|
} |
| 1373 |
|
} |
| 1374 |
|
|
| 1375 |
|
public function process_request( $post, array $post_data ) { |
| 1376 |
|
// Record stats |
| 1377 |
|
parent::process_request( $post, $post_data ); |
| 1378 |
|
|
| 1379 |
|
// Redirect to Tumblr's sharing endpoint (a la their bookmarklet) |
| 1380 |
|
$url = 'http://www.tumblr.com/share?v=3&u=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&t=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '&s='; |
| 1381 |
|
wp_redirect( $url ); |
| 1382 |
|
die(); |
| 1383 |
|
} |
| 1384 |
|
// http://www.tumblr.com/share?v=3&u=URL&t=TITLE&s= |
| 1385 |
|
public function display_footer() { |
| 1386 |
|
if ( $this->smart ) { |
|
@@ 1560-1567 (lines=8) @@
|
| 1557 |
|
return __( 'Pocket', 'jetpack' ); |
| 1558 |
|
} |
| 1559 |
|
|
| 1560 |
|
public function process_request( $post, array $post_data ) { |
| 1561 |
|
// Record stats |
| 1562 |
|
parent::process_request( $post, $post_data ); |
| 1563 |
|
|
| 1564 |
|
$pocket_url = esc_url_raw( 'https://getpocket.com/save/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ) ); |
| 1565 |
|
wp_redirect( $pocket_url ); |
| 1566 |
|
exit; |
| 1567 |
|
} |
| 1568 |
|
|
| 1569 |
|
public function get_display( $post ) { |
| 1570 |
|
if ( $this->smart ) { |