public function getProtocols()
{
- $oStatusEnabled = array_key_exists('ostatus', $this->plugins);
- $xmppEnabled = (array_key_exists('xmpp', $this->plugins) && common_config('xmpp', 'enabled')) ? true : false;
- $protocols = array();
-
- if (Event::handle('StartNodeInfoProtocols', array(&$protocols))) {
- // Until the OStatus and XMPP plugins handle this themselves,
- // try to figure out if they're enabled ourselves.
+ $protocols = [];
- if ($oStatusEnabled) {
- $protocols[] = 'ostatus';
- }
-
- if ($xmppEnabled) {
- $protocols[] = 'xmpp';
- }
- }
- Event::handle('EndNodeInfoProtocols', array(&$protocols));
+ Event::handle('NodeInfoProtocols', array(&$protocols));
return $protocols;
}
return true;
}
+ /**
+ * Plugin Nodeinfo information
+ *
+ * @param array $protocols
+ * @return bool hook true
+ */
+ public function onNodeInfoProtocols(array &$protocols)
+ {
+ $protocols[] = "ostatus";
+ return true;
+ }
+
function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'OStatus',
return true;
}
+ /**
+ * Plugin Nodeinfo information
+ *
+ * @param array $protocols
+ * @return bool hook true
+ */
+ public function onNodeInfoProtocols(array &$protocols)
+ {
+ $protocols[] = "xmpp";
+ return true;
+ }
+
function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'XMPP',