-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenergie-ampel-content.php
37 lines (29 loc) · 1.05 KB
/
energie-ampel-content.php
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
35
36
37
<?php
// QP Set Menu Button
add_action( 'qp_menu_button', 'energie_ampel_button', 10, 3 );
function energie_ampel_button() {
?>
<a class="button header-button energie-ampel-button" onclick="show()">
<?php include_once( plugin_dir_path( __FILE__ ) . '/helper/assets/icons/ampelmann.svg'); ?>
</a>
<?php
}
// QP Set Overlay Content
add_action('qp_overlays', 'energie_ampel_overlay', 10, 3);
function energie_ampel_overlay() {
get_template_part('components/energie_ampel-menu');
if( file_exists( __DIR__ . "/helper/energie_ampel-helper.php" ) ) {
include( __DIR__ . "/helper/energie_ampel-helper.php" );
}
}
// load styles
function css_style_energie_ampel(){
wp_enqueue_style( 'plugin-style-energie-ampel', plugins_url( '/helper/assets/css/styles.css', __FILE__ ), false, null );
}
add_action('wp_enqueue_scripts', 'css_style_energie_ampel');
// Load Translation
function energie_ampel_init() {
load_plugin_textdomain( 'energie-ampel', false, basename( dirname( __FILE__ ) ) . '/helper/assets/languages' );
}
add_action('init', 'energie_ampel_init');
?>