X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FAwesomeness%2FAwesomenessPlugin.php;h=fff833d4ee91380a5358a40f1ed83857eecf48fa;hb=8c9efff1ace2d5e466691abf038f096eb5dd5f51;hp=294f094389d6a5bfd861b6b01a5913e3a970a53f;hpb=7aa201fa5285d8dfe31ab6f254bfaa9819c65285;p=quix0rs-gnu-social.git diff --git a/plugins/Awesomeness/AwesomenessPlugin.php b/plugins/Awesomeness/AwesomenessPlugin.php index 294f094389..fff833d4ee 100644 --- a/plugins/Awesomeness/AwesomenessPlugin.php +++ b/plugins/Awesomeness/AwesomenessPlugin.php @@ -2,7 +2,7 @@ /** * StatusNet, the distributed open-source microblogging tool * - * Plugin to add adittional awesomenss to StatusNet + * Plugin to add additional awesomenss to StatusNet * * PHP version 5 * @@ -42,24 +42,23 @@ if (!defined('STATUSNET')) { class AwesomenessPlugin extends Plugin { - - const VERSION = '0.0.42'; - - public function onPluginVersion(&$versions) + const VERSION = '0.0.42'; + + public function onPluginVersion(array &$versions) { $versions[] = array( 'name' => 'Awesomeness', 'version' => self::VERSION, 'author' => 'Jeroen De Dauw', - 'homepage' => 'http://status.net/wiki/Plugin:Awesomeness', - 'rawdescription' => _m( - 'The Awesomeness plugin adds adittional awesomeness ' . - 'to your StatusNet install. ' + 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/Awesomeness', + // TRANS: Plugin description for a sample plugin. + 'rawdescription' => _m('The Awesomeness plugin adds additional awesomeness ' . + 'to a StatusNet installation.' ) ); return true; } - + /** * Add the conrnify button * @@ -67,34 +66,33 @@ class AwesomenessPlugin extends Plugin * * @return void */ - function onEndShowSections(Action $action) - { + { $action->elementStart('div', array('id' => 'cornify_section', - 'class' => 'section')); - - $action->raw( - << - Cornify - - EOT - ); - - $action->elementEnd('div'); + ); + + $action->elementEnd('div'); } - + /** * Hook for new-notice form processing to take our HTML goodies; * won't affect API posting etc. - * + * * @param NewNoticeAction $action * @param User $user * @param string $content @@ -103,8 +101,7 @@ EOT */ function onStartSaveNewNoticeWeb($action, $user, &$content, &$options) { - $content = htmlspecialchars($content); - $options['rendered'] = preg_replace("/(^|\s|-)((?:awesome|awesomeness)[\?!\.\,]?)(\s|$)/i", " $2 ", $content); + $content = htmlspecialchars($content); + $options['rendered'] = preg_replace("/(^|\s|-)((?:awesome|awesomeness)[\?!\.\,]?)(\s|$)/i", " $2 ", $content); } - -} \ No newline at end of file +}