]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/profilesettings.php
wrap account actions in a section
[quix0rs-gnu-social.git] / actions / profilesettings.php
index 0226e1dd456275ca8dd0cac2abf21aa7de8a92a8..303bb0ad9bbd76be81fa193fb1adec3de72df680 100644 (file)
@@ -458,20 +458,36 @@ class ProfilesettingsAction extends AccountSettingsAction
 
         $this->elementStart('div', array('id' => 'aside_primary',
                                          'class' => 'aside'));
-        if ($user->hasRight(Right::BACKUPACCOUNT)) {
-            $this->elementStart('li');
-            $this->element('a',
-                           array('href' => common_local_url('backupaccount')),
-                           _('Backup account'));
-            $this->elementEnd('li');
-        }
-        if ($user->hasRight(Right::DELETEACCOUNT)) {
-            $this->elementStart('li');
-            $this->element('a',
-                           array('href' => common_local_url('deleteaccount')),
-                           _('Delete account'));
-            $this->elementEnd('li');
+
+        $this->elementStart('div', array('id' => 'account_actions',
+                                         'class' => 'section'));
+        $this->elementStart('ul');
+        if (Event::handle('StartProfileSettingsActions', array($this))) {
+            if ($user->hasRight(Right::BACKUPACCOUNT)) {
+                $this->elementStart('li');
+                $this->element('a',
+                               array('href' => common_local_url('backupaccount')),
+                               _('Backup account'));
+                $this->elementEnd('li');
+            }
+            if ($user->hasRight(Right::DELETEACCOUNT)) {
+                $this->elementStart('li');
+                $this->element('a',
+                               array('href' => common_local_url('deleteaccount')),
+                               _('Delete account'));
+                $this->elementEnd('li');
+            }
+            if ($user->hasRight(Right::RESTOREACCOUNT)) {
+                $this->elementStart('li');
+                $this->element('a',
+                               array('href' => common_local_url('restoreaccount')),
+                               _('Restore account'));
+                $this->elementEnd('li');
+            }
+            Event::handle('EndProfileSettingsActions', array($this));
         }
+        $this->elementEnd('ul');
+        $this->elementEnd('div');
         $this->elementEnd('div');
     }
 }