From 78c6577c545f9c21edc8eb2f06cd6401b93b3691 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 28 Jan 2016 18:51:33 +0100 Subject: [PATCH] more twitter compatible api --- QvitterPlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index b0d176a..2830352 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -519,7 +519,6 @@ class QvitterPlugin extends Plugin { $oembed = File_oembed::getKV('file_id',$attachment->id); if($oembed instanceof File_oembed) { $oembed_html = str_replace('<!--//-->','',$oembed->html); // trash left of wordpress' javascript after htmLawed removed the tags -error_log('$oembed_html: '.$oembed_html); if($oembed->provider == 'Twitter' && strstr($oembed_html, '>— '.$oembed->author_name)) { $oembed_html = substr($oembed_html,0,strpos($oembed_html, '>— '.$oembed->author_name)+1); // remove user data from twitter oembed html (we have it in ) $twitter_username = substr($oembed->html,strpos($oembed->html, '>— '.$oembed->author_name)+strlen('>— '.$oembed->author_name)); @@ -760,6 +759,11 @@ error_log('$oembed_html: '.$oembed_html); $twitter_user['cover_photo'] = Profile_prefs::getConfigData($profile, 'qvitter', 'cover_photo'); $twitter_user['background_image'] = Profile_prefs::getConfigData($profile, 'qvitter', 'background_image'); + // twitter compatible + $twitter_user['profile_link_color'] = Profile_prefs::getConfigData($profile, 'theme', 'linkcolor'); + $twitter_user['profile_background_color'] = Profile_prefs::getConfigData($profile, 'theme', 'backgroundcolor'); + $twitter_user['profile_banner_url'] = Profile_prefs::getConfigData($profile, 'qvitter', 'cover_photo'); + // follows me? if ($scoped) { $twitter_user['follows_you'] = $profile->isSubscribed($scoped);