* @param array $classes the default classes array * @return array classes array with extra items */ function sdrn_body_classes($classes) { $options = get_option('sdrn_options'); $classes[] = $options['animation']; $classes[] = 'sdrn_'.$options['position']; if(!isset($options["open_sans"])) { $classes[] = 'sdrn_open_sans_yes'; } else { $classes[] = 'sdrn_open_sans_'.$options["open_sans"]; } return $classes; } //if(load_menu()) add_filter('body_class','sdrn_body_classes'); /** * Main function * Adds the Mobile.Nav top bar & the menu to the website (wp_footer hook - menu is being added at the wery bottom of teh page) * @return HTML Mobile.Nav bar & menu */ function sdrn_menu() { $options = get_option('sdrn_options'); ?>
get_row("SELECT * FROM $wpdb->posts WHERE guid = '$logo_image_url'"); if(isset($dbq->ID)) { $alt = get_post_meta($dbq->ID, '_wp_attachment_image_alt', true); } else { $alt = ''; } } ?> ' ?>
" data-custom_icon="" data-custom_icon_open="" data-zooming="" data-swipe_actions="" data-how_wide="" data-expand_sub_with_parent="" >
0 && is_user_logged_in())? $options['logmenu_icons_for_items'] : $options['icons_for_items']; if(count($icons >0)) { foreach ($icons as $item_set) { if(isset($item_set['item_id']) && isset($item_set['item_icon']) && isset($item_set['color']) && isset($item_set['icon_image'])) { if ($item_set['item_id'] == $item->ID) { //fontawesome icon if($item_set['item_icon'] != '' && $item_set['icon_image'] == '') { $atts['data-cii'] = true; $atts['data-fa_icon'] = $item_set['item_icon']; $atts['data-icon_color'] = $item_set['color']; } //image icon if($item_set['icon_image'] != '') { $atts['data-cii'] = true; $atts['data-icon_src'] = $item_set['icon_image']; } } } } } return $atts; } //if(load_menu()) add_filter('nav_menu_link_attributes', 'sdrn_item_attributes', 10, 3 ); /** * Adds the custom styling for the menu to website header * @return HTML - the