-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaira-menu.php
47 lines (36 loc) · 1.26 KB
/
paira-menu.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
38
39
40
41
42
43
<?php
/*
* Plugin Name: Paira Mobile Menu
*/
/**
* Enqueue Paira Scripts.
*/
function paira_menu_enqueue_scripts() {
wp_enqueue_style( 'slicknav', plugins_url( '/css/slicknav.css', __FILE__ ) );
wp_enqueue_script( 'jquery.slicknav', plugins_url( '/js/jquery.slicknav.min.js', __FILE__ ), array( 'jquery' ) );
}
add_action( 'wp_enqueue_scripts', 'paira_menu_enqueue_scripts' );
/**
* Active Slicknav Menu.
*/
function paira_active_menu_scripts() {
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('#paira-menu').slicknav({
label: '',
// appendTo: '',
openedSymbol: '<i class="fa fa-minus-circle"></i>',
closedSymbol: '<i class="fa fa-plus-circle"></i>',
removeClasses: true,
allowParentLinks: true,
// brand: '<img src="https://www.pairasolutions.com/img/main/logo-white.png" alt="<?php bloginfo( 'name' ); ?>">'
});
// $('.slicknav_custom_btn').click(function () {
// $('#paira-menu').slicknav('toggle');
// });
});
</script>
<?php
}
add_action( 'wp_footer', 'paira_active_menu_scripts' );