HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpmuhibbah_err/wp-content/themes/goodwish/framework/modules/header/functions.php
<?php

if(!function_exists('goodwish_edge_header_register_main_navigation')) {
    /**
     * Registers main navigation
     */
    function goodwish_edge_header_register_main_navigation() {
        register_nav_menus(
            array(
                'main-navigation' => esc_html__('Main Navigation', 'goodwish'),
                'vertical-navigation' => esc_html__('Vertical Navigation', 'goodwish'),
                'mobile-navigation' => esc_html__('Mobile Navigation', 'goodwish')
            )
        );
    }

    add_action('after_setup_theme', 'goodwish_edge_header_register_main_navigation');
}

if(!function_exists('goodwish_edge_is_top_bar_transparent')) {
    /**
     * Checks if top bar is transparent or not
     *
     * @return bool
     */
    function goodwish_edge_is_top_bar_transparent() {
        $top_bar_enabled = goodwish_edge_is_top_bar_enabled();

        $top_bar_bg_color = goodwish_edge_options()->getOptionValue('top_bar_background_color');
        $top_bar_transparency = goodwish_edge_options()->getOptionValue('top_bar_background_transparency');

        if($top_bar_enabled && $top_bar_bg_color !== '' && $top_bar_transparency !== '') {
            return $top_bar_transparency >= 0 && $top_bar_transparency < 1;
        }

        return false;
    }
}

if(!function_exists('goodwish_edge_is_top_bar_completely_transparent')) {
    function goodwish_edge_is_top_bar_completely_transparent() {
        $top_bar_enabled = goodwish_edge_is_top_bar_enabled();

        $top_bar_bg_color = goodwish_edge_options()->getOptionValue('top_bar_background_color');
        $top_bar_transparency = goodwish_edge_options()->getOptionValue('top_bar_background_transparency');

        if($top_bar_enabled && $top_bar_bg_color !== '' && $top_bar_transparency !== '') {
            return $top_bar_transparency === '0';
        }

        return false;
    }
}

if(!function_exists('goodwish_edge_is_top_bar_enabled')) {
    function goodwish_edge_is_top_bar_enabled() {

		$id = goodwish_edge_get_page_id();
		$top_bar_enabled = goodwish_edge_get_meta_field_intersect('top_bar', $id) === 'yes';

		return $top_bar_enabled;
    }
}

if(!function_exists('goodwish_edge_get_top_bar_height')) {
    /**
     * Returns top bar height
     *
     * @return bool|int|void
     */
    function goodwish_edge_get_top_bar_height() {
        if(goodwish_edge_is_top_bar_enabled()) {
            $top_bar_height = goodwish_edge_filter_px(goodwish_edge_options()->getOptionValue('top_bar_height'));

            return $top_bar_height !== '' ? intval($top_bar_height) : 45;
        }

        return 0;
    }
}

if(!function_exists('goodwish_edge_get_sticky_header_height')) {
    /**
     * Returns top sticky header height
     *
     * @return bool|int|void
     */
    function goodwish_edge_get_sticky_header_height() {
        //sticky menu height
        if(goodwish_edge_options()->getOptionValue('header_type') !== 'header-vertical' &&
           in_array(goodwish_edge_options()->getOptionValue('header_behaviour'), array('sticky-header-on-scroll-up','sticky-header-on-scroll-down-up'))) {

            $sticky_header_height = goodwish_edge_filter_px(goodwish_edge_options()->getOptionValue('sticky_header_height'));

            return $sticky_header_height !== '' ? intval($sticky_header_height) : 60;
        }

        return 0;

    }
}

if(!function_exists('goodwish_edge_get_sticky_header_height_of_complete_transparency')) {
    /**
     * Returns top sticky header height it is fully transparent. used in anchor logic
     *
     * @return bool|int|void
     */
    function goodwish_edge_get_sticky_header_height_of_complete_transparency() {

        if(goodwish_edge_options()->getOptionValue('header_type') !== 'header-vertical') {
            if(goodwish_edge_options()->getOptionValue('sticky_header_transparency') === '0') {
                $stickyHeaderTransparent = goodwish_edge_options()->getOptionValue('sticky_header_grid_background_color') !== '' &&
                                           goodwish_edge_options()->getOptionValue('sticky_header_grid_transparency') === '0';
            } else {
                $stickyHeaderTransparent = goodwish_edge_options()->getOptionValue('sticky_header_background_color') !== '' &&
                                           goodwish_edge_options()->getOptionValue('sticky_header_transparency') === '0';
            }

            if($stickyHeaderTransparent) {
                return 0;
            } else {
                $sticky_header_height = goodwish_edge_filter_px(goodwish_edge_options()->getOptionValue('sticky_header_height'));

                return $sticky_header_height !== '' ? intval($sticky_header_height) : 60;
            }
        }
        return 0;
    }
}

if(!function_exists('goodwish_edge_get_sticky_scroll_amount')) {
    /**
     * Returns top sticky scroll amount
     *
     * @return bool|int|void
     */
    function goodwish_edge_get_sticky_scroll_amount() {

        //sticky menu scroll amount
        if(goodwish_edge_options()->getOptionValue('header_type') !== 'header-vertical' && in_array(goodwish_edge_options()->getOptionValue('header_behaviour'), array('sticky-header-on-scroll-up','sticky-header-on-scroll-down-up'))) {

            $sticky_scroll_amount = goodwish_edge_filter_px(goodwish_edge_options()->getOptionValue('scroll_amount_for_sticky'));

            return $sticky_scroll_amount !== '' ? intval($sticky_scroll_amount) : 0;
        }

        return 0;
    }
}

if(!function_exists('goodwish_edge_get_sticky_scroll_amount_per_page')) {
    /**
     * Returns top sticky scroll amount
     *
     * @return bool|int|void
     */
    function goodwish_edge_get_sticky_scroll_amount_per_page() {
        $post_id =  get_the_ID();
        //sticky menu scroll amount
        if(goodwish_edge_options()->getOptionValue('header_type') !== 'header-vertical'  && in_array(goodwish_edge_options()->getOptionValue('header_behaviour'), array('sticky-header-on-scroll-up','sticky-header-on-scroll-down-up'))) {

            $sticky_scroll_amount_per_page = goodwish_edge_filter_px(get_post_meta($post_id, "edgtf_scroll_amount_for_sticky_meta", true));

            return $sticky_scroll_amount_per_page !== '' ? intval($sticky_scroll_amount_per_page) : 0;
        }

        return 0;
    }
}