Server IP : 192.64.112.168 / Your IP : 18.219.81.129 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/themes/woodmart/inc/modules/header-builder/ |
Upload File : |
<?php /** * ------------------------------------------------------------------------------------------------ * Returns the current header instance (on frontend) * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_get_header' ) ) { function whb_get_header() { return WOODMART_HB_Frontend::get_instance()->header; } } /** * ------------------------------------------------------------------------------------------------ * Generate current header HTML structure * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_generate_header' ) ) { function whb_generate_header() { woodmart_enqueue_inline_style( 'header-base' ); WOODMART_HB_Frontend::get_instance()->generate_header(); } } /** * ------------------------------------------------------------------------------------------------ * Get main builder class instance * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_get_builder' ) ) { function whb_get_builder() { return WOODMART_HB_Frontend::get_instance()->builder; } } /** * ------------------------------------------------------------------------------------------------ * Is full screen menu enabled * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_is_full_screen_menu' ) ) { function whb_is_full_screen_menu() { $settings = whb_get_settings(); return isset( $settings['mainmenu'] ) && $settings['mainmenu']['full_screen']; } } /** * ------------------------------------------------------------------------------------------------ * Is full screen search enabled * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_is_side_cart' ) ) { function whb_is_side_cart() { $settings = whb_get_settings(); return isset( $settings['cart'] ) && $settings['cart']['position'] == 'side'; } } /** * ------------------------------------------------------------------------------------------------ * Get header settings and key elements params (search, cart widget, menu) * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_get_settings' ) ) { function whb_get_settings() { // Fix yoast php error if ( ! is_object( whb_get_header() ) ) { return array(); } return whb_get_header()->get_options(); } } /** * ------------------------------------------------------------------------------------------------ * Get dropdowns color * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'whb_get_dropdowns_color' ) ) { function whb_get_dropdowns_color() { if ( woodmart_get_opt( 'dark_version' ) ) { return 'light'; } $settings = whb_get_settings(); if ( isset( $settings['dropdowns_dark'] ) ) { return $settings['dropdowns_dark'] ? 'light' : 'dark'; } } } if ( ! function_exists( 'whb_get_custom_icon' ) ) { /** * Get custom icon. * * @param array $params List icon parameters. * @return string html tag <img> or ''. */ function whb_get_custom_icon( $params ) { $params = wp_parse_args( $params, array( 'id' => '', 'url' => '', 'width' => '40', 'height' => '40', ) ); if ( ! empty( $params['id'] ) ) { return wp_get_attachment_image( $params['id'], array( $params['width'], $params['height'], ), false, array( 'class' => 'wd-custom-icon', ) ); } elseif ( ! empty( $params['url'] ) ) { return '<img class="wd-custom-icon" src="' . esc_url( $params['url'] ) . '" alt="custom-icon" width="' . esc_attr( $params['width'] ) . '" height="' . esc_attr( $params['height'] ) . '">'; } return ''; } }