Skip to content

Commit

Permalink
Adapt to latest version of Wp-to-twitter, now Xposter
Browse files Browse the repository at this point in the history
  • Loading branch information
dshanske committed Dec 2, 2023
1 parent f342eb0 commit c9bbe8a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions includes/class-social-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,16 @@ public static function wptotwitter_to_syn_links( $connection, $id ) {
return;
}

$account = get_option( 'wtt_twitter_username' );
$uid = get_post_meta( $id, _wpt_tweet_id, true );
if ( ! $account || ! $uid ) {
return;
}

$url = sprintf(
'https://twitter.com/%s/status/%s',
$connection->body->user->screen_name,
$connection->body->id_str
$account,
$uid
);

return add_post_syndication_link( $id, $url );
Expand Down

0 comments on commit c9bbe8a

Please sign in to comment.