PluginProbe
WP Directory Kit / 1.1.6
WP Directory Kit v1.1.6
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / actions.php

actions.php in WP Directory Kit 1.1.6, at actions.php

68 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly.
5 }
6
7 require_once WPDIRECTORYKIT_PATH . 'extensions/wdk-dependfields.php';
8 new \Wdk\Extensions\WdkDependfields();
9
10 //home, results page, dash/login, menu for hamburger
11 add_action('wp_footer', function(){
12 if(wdk_get_option('wdk_mobile_bottom_navbar_enable')) {
13 wp_enqueue_style( 'dashicons' );
14 ?>
15 <div class="wdk_mobile_footer_menu">
16 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr__('Home','nexproperty' ); ?>"><span class="dashicons dashicons-admin-home"></span></a>
17 <?php if(wdk_get_option('wdk_results_page')):?>
18 <a href="<?php echo esc_url(get_permalink(wdk_get_option('wdk_results_page'))); ?>" title="<?php echo esc_attr__('Search','nexproperty' ); ?>"><span class="dashicons dashicons-search"></span></a>
19 <?php endif;?>
20 <?php if (!is_user_logged_in()): ?>
21 <a href="<?php echo (get_option('wdk_membership_login_page')) ? esc_url(get_permalink(wdk_get_option('wdk_membership_login_page'))) : esc_url(wp_login_url());?>" class="sign_in"><i class="fas fa-user" aria-hidden="true"></i></a>
22 <?php else:?>
23 <?php
24 $dash_url = get_admin_url() . "admin.php?page=wdk";
25 if(function_exists('wdk_dash_url') && get_option('wdk_membership_dash_page') && wdk_dash_url()){
26 $dash_url = wdk_dash_url();
27 }
28 ?>
29 <a href="<?php echo esc_url($dash_url);?>" class="sign_in" title="<?php echo esc_attr__('Dash','nexproperty' ); ?>" class="wdk-element-button logout">
30 <i aria-hidden="true" class="fas fa-tachometer-alt"></i>
31 </a>
32 <a href="<?php echo esc_url(wp_logout_url( get_permalink() )); ?>" class="sign_in" title="<?php echo esc_attr__('Log Out','nexproperty' ); ?>"><i class="fas fa-user-times" aria-hidden="true"></i></a>
33 <?php endif;?>
34
35 <div class="wdk-footer-menu">
36 <?php
37 $menus = wp_get_nav_menus();
38
39 $available_menus = [];
40 foreach ($menus as $menu) {
41 $available_menus[$menu->slug] = $menu->name;
42 }
43
44 ?>
45
46 <input id="wdk_mobile_footer_menu_gumb" type="checkbox" class="wdk_mobile_footer_menu_gumb">
47
48 <?php if(!empty($available_menus)):?>
49 <label for="wdk_mobile_footer_menu_gumb" class="wdk_mobile_footer_menu_gumb-open">
50 <span class="dashicons dashicons-menu"></span>
51 </label>
52 <?php endif;?>
53
54 <div class="menu__box">
55 <?php echo wp_nav_menu( array(
56 'menu' => array_keys($available_menus)[0],
57 'menu_class' => 'wl-nav-menu wl-nav-menu',
58 'menu_id' => 'menu-' . array_keys($available_menus)[0] . '-wdk-bottom-menu',
59 'fallback_cb' => '__return_empty_string',
60 ));?>
61 </div>
62 </div>
63 </div>
64 <?php
65 }
66 });
67
68 ?>