summaryrefslogtreecommitdiff
path: root/plugins/toggle_sidebar/init.php
blob: 2992f2ac7230762aa09ddc047e50e087b2b6ebde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
class Toggle_Sidebar extends Plugin {

	private $host;

	function about() {
		return array(1.0,
			"Adds a main toolbar button to toggle sidebar",
			"fox");
	}

	function init($host) {
		$this->host = $host;

		$host->add_hook($host::HOOK_MAIN_TOOLBAR_BUTTON, $this);
	}

	function hook_main_toolbar_button() {
		?>

		<button dojoType="dijit.form.Button" onclick="Feeds.toggle()">
			<i class="material-icons"
               title="<?php echo __('Toggle feedlist') ?>">menu</i>
		</button>

		<?php
	}

	function api_version() {
		return 2;
	}

}
?>