|
@@ 778-787 (lines=10) @@
|
| 775 |
|
} |
| 776 |
|
} |
| 777 |
|
|
| 778 |
|
public function process_request( $post, array $post_data ) { |
| 779 |
|
$reddit_url = $this->http() . '://reddit.com/submit?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ); |
| 780 |
|
|
| 781 |
|
// Record stats |
| 782 |
|
parent::process_request( $post, $post_data ); |
| 783 |
|
|
| 784 |
|
// Redirect to Reddit |
| 785 |
|
wp_redirect( $reddit_url ); |
| 786 |
|
die(); |
| 787 |
|
} |
| 788 |
|
} |
| 789 |
|
|
| 790 |
|
class Share_LinkedIn extends Sharing_Source { |
|
@@ 956-965 (lines=10) @@
|
| 953 |
|
return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Facebook', 'share to', 'jetpack' ), __( 'Click to share on Facebook', 'jetpack' ), 'share=facebook', 'sharing-facebook-' . $post->ID ); |
| 954 |
|
} |
| 955 |
|
|
| 956 |
|
public function process_request( $post, array $post_data ) { |
| 957 |
|
$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 ) ); |
| 958 |
|
|
| 959 |
|
// Record stats |
| 960 |
|
parent::process_request( $post, $post_data ); |
| 961 |
|
|
| 962 |
|
// Redirect to Facebook |
| 963 |
|
wp_redirect( $fb_url ); |
| 964 |
|
die(); |
| 965 |
|
} |
| 966 |
|
|
| 967 |
|
public function display_footer() { |
| 968 |
|
$this->js_dialog( $this->shortname ); |
|
@@ 1417-1425 (lines=9) @@
|
| 1414 |
|
} |
| 1415 |
|
} |
| 1416 |
|
|
| 1417 |
|
public function process_request( $post, array $post_data ) { |
| 1418 |
|
// Record stats |
| 1419 |
|
parent::process_request( $post, $post_data ); |
| 1420 |
|
|
| 1421 |
|
// Redirect to Tumblr's sharing endpoint (a la their bookmarklet) |
| 1422 |
|
$url = 'https://www.tumblr.com/share?v=3&u=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&t=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '&s='; |
| 1423 |
|
wp_redirect( $url ); |
| 1424 |
|
die(); |
| 1425 |
|
} |
| 1426 |
|
// http://www.tumblr.com/share?v=3&u=URL&t=TITLE&s= |
| 1427 |
|
public function display_footer() { |
| 1428 |
|
if ( $this->smart ) { |
|
@@ 1606-1613 (lines=8) @@
|
| 1603 |
|
return __( 'Pocket', 'jetpack' ); |
| 1604 |
|
} |
| 1605 |
|
|
| 1606 |
|
public function process_request( $post, array $post_data ) { |
| 1607 |
|
// Record stats |
| 1608 |
|
parent::process_request( $post, $post_data ); |
| 1609 |
|
|
| 1610 |
|
$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 ) ) ); |
| 1611 |
|
wp_redirect( $pocket_url ); |
| 1612 |
|
exit; |
| 1613 |
|
} |
| 1614 |
|
|
| 1615 |
|
public function get_display( $post ) { |
| 1616 |
|
if ( $this->smart ) { |
|
@@ 1661-1668 (lines=8) @@
|
| 1658 |
|
public function get_name() { |
| 1659 |
|
return __( 'Telegram', 'jetpack' ); |
| 1660 |
|
} |
| 1661 |
|
public function process_request( $post, array $post_data ) { |
| 1662 |
|
// Record stats |
| 1663 |
|
parent::process_request( $post, $post_data ); |
| 1664 |
|
$telegram_url = esc_url_raw( 'https://telegram.me/share/url?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&text=' . rawurlencode( $this->get_share_title( $post->ID ) ) ); |
| 1665 |
|
wp_redirect( $telegram_url ); |
| 1666 |
|
exit; |
| 1667 |
|
} |
| 1668 |
|
|
| 1669 |
|
public function get_display( $post ) { |
| 1670 |
|
return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Telegram', 'share to', 'jetpack' ), __( 'Click to share on Telegram', 'jetpack' ), 'share=telegram' ); |
| 1671 |
|
} |