init.php 551 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. class Search_Button extends Plugin {
  3. private $host;
  4. function about() {
  5. return array(1.0,
  6. "Adds a toolbar button to open search dialog",
  7. "fox");
  8. }
  9. function init($host) {
  10. $this->host = $host;
  11. $host->add_hook($host::HOOK_MAIN_TOOLBAR_BUTTON, $this);
  12. }
  13. function hook_main_toolbar_button() {
  14. ?>
  15. <button dojoType="dijit.form.Button" onclick="Feeds.search()" style="order : 25">
  16. <i class="material-icons" title="<?php echo __('Search...') ?>">search</i>
  17. </button>
  18. <?php
  19. }
  20. function api_version() {
  21. return 2;
  22. }
  23. }