[CORE] Plugin API now extends a new Module API
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* StatusNet - the distributed open-source microblogging tool
|
||||
* Copyright (C) 2009, StatusNet, Inc.
|
||||
*
|
||||
* A sample module to show best practices for StatusNet plugins
|
||||
* A sample Plugin to show best practices for StatusNet plugins
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
@@ -87,10 +87,10 @@ if (!defined('STATUSNET')) {
|
||||
* main StatusNet distribution go in 'plugins' and third-party or local ones go
|
||||
* in 'local'.
|
||||
*
|
||||
* Simple plugins can be implemented as a single module. Others are more complex
|
||||
* and require additional modules; these should use their own directory, like
|
||||
* Simple plugins can be implemented as a single Plugin. Others are more complex
|
||||
* and require additional Plugins; these should use their own directory, like
|
||||
* 'local/plugins/{$name}/'. All files related to the plugin, including images,
|
||||
* JavaScript, CSS, external libraries or PHP modules should go in the plugin
|
||||
* JavaScript, CSS, external libraries or PHP Plugins should go in the plugin
|
||||
* directory.
|
||||
*
|
||||
* @category Sample
|
||||
@@ -224,7 +224,7 @@ class SamplePlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(array &$versions)
|
||||
public function onPluginVersion(array &$versions): bool
|
||||
{
|
||||
$versions[] = array('name' => 'Sample',
|
||||
'version' => self::PLUGIN_VERSION,
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-08-14 14:44+0100\n"
|
||||
"POT-Creation-Date: 2019-08-14 14:50+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -18,22 +18,12 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#. TRANS: Menu item in sample plugin.
|
||||
#. TRANS: Page title for sample plugin.
|
||||
#: SamplePlugin.php:221 actions/hello.php:112
|
||||
#. TRANS: Menu item in sample plugin.
|
||||
#: actions/hello.php:112 SamplePlugin.php:221
|
||||
msgid "Hello"
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: Menu item title in sample plugin.
|
||||
#: SamplePlugin.php:223
|
||||
msgid "A warm greeting"
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: Plugin description.
|
||||
#: SamplePlugin.php:235
|
||||
msgid "A sample plugin to show basics of development for new hackers."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: Page title for sample plugin. %s is a user nickname.
|
||||
#: actions/hello.php:115
|
||||
#, php-format
|
||||
@@ -73,3 +63,13 @@ msgstr ""
|
||||
#, php-format
|
||||
msgid "Could not increment greeting count for %d."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: Menu item title in sample plugin.
|
||||
#: SamplePlugin.php:223
|
||||
msgid "A warm greeting"
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: Plugin description.
|
||||
#: SamplePlugin.php:235
|
||||
msgid "A sample plugin to show basics of development for new hackers."
|
||||
msgstr ""
|
||||
|
||||
Reference in New Issue
Block a user