plugin_settings.php 686 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Elgg plugin settings
  4. *
  5. * @uses ElggPlugin $vars['plugin'] The plugin object to display settings for.
  6. *
  7. * @package Elgg.Core
  8. * @subpackage Plugins.Settings
  9. */
  10. $plugin = $vars['plugin'];
  11. $plugin_id = $plugin->getID();
  12. // required for plugin settings backward compatibility
  13. $vars['entity'] = $plugin;
  14. $settings = false;
  15. if (elgg_view_exists("settings/$plugin_id/edit") || elgg_view_exists("plugins/$plugin_id/settings")) {
  16. $title = $plugin->getManifest()->getName();
  17. $params = array('id' => "$plugin_id-settings", 'class' => 'elgg-form-settings');
  18. $body = elgg_view_form("plugins/settings/save", $params, $vars);
  19. echo elgg_view_module('info', $title, $body);
  20. }