X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FDirectionDetector%2FDirectionDetectorPlugin.php;h=1f77a61acc3897be4e3c6ca45d53a549ca3c2077;hb=2c5cba28b6a8e13a58fe7584835340aa9779b146;hp=be8dbea8e5dbae04d42b8c0906594e4a36da740c;hpb=0dbdcf2936a00282114f1368ead2f5edebc6ae61;p=quix0rs-gnu-social.git diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index be8dbea8e5..1f77a61acc 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -37,20 +37,12 @@ class DirectionDetectorPlugin extends Plugin { * @param object $notice notice is going to be saved */ public function onStartNoticeSave($notice){ + // don't use getRendered() here since it's not saved yet and thus can't ->update in case that would happen if(!preg_match('//', $notice->rendered) && self::isRTL($notice->content)) $notice->rendered = ''.$notice->rendered.''; return true; } - /** - * SN plugin API, here we will add css needed for modifiyed rendered - * - * @param Action $xml - */ - public function onEndShowStatusNetStyles($xml){ - $xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;} .notice .author {float:left}'); - } - /** * is passed string a rtl content or not * @@ -253,8 +245,8 @@ class DirectionDetectorPlugin extends Plugin { /** * plugin details */ - function onPluginVersion(&$versions){ - $url = 'http://status.net/wiki/Plugin:DirectionDetector'; + function onPluginVersion(array &$versions){ + $url = 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/DirectionDetector'; $versions[] = array( 'name' => 'Direction detector',