HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/www/bellecouture/wp-content/themes/yena/framework/third/lastudio-elementor.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}

if(!function_exists('yena_override_elementor_resource')){
    function yena_override_elementor_resource( $path ){
        $path = get_theme_file_uri('assets/addon');
        return $path;
    }
}
add_filter('LaStudioElement/resource-base-url', 'yena_override_elementor_resource');

if(!function_exists('yena_add_icon_library_into_elementor')){
    function yena_add_icon_library_into_elementor( $tabs ) {
        $tabs['lastudioicon'] = [
            'name' => 'lastudioicon',
            'label' => esc_html__( 'LA-Studio Icons', 'yena' ),
            'prefix' => 'lastudioicon-',
            'displayPrefix' => '',
            'labelIcon' => 'fas fa-star',
            'ver' => '1.0.0',
            'fetchJson' => get_theme_file_uri('assets/fonts/LaStudioIcons.json'),
            'native' => false
        ];
        return $tabs;
    }
}
add_filter('elementor/icons_manager/additional_tabs', 'yena_add_icon_library_into_elementor');

if(!function_exists('yena_add_banner_hover_effect')){
    function yena_add_banner_hover_effect( $effects ){
        return array_merge(array(
            'none'   => esc_html__( 'None', 'yena' ),
            'type-1' => esc_html__( 'Shadow', 'yena' )
        ), $effects);
    }
}
add_filter('LaStudioElement/banner/hover_effect', 'yena_add_banner_hover_effect');

if(!function_exists('yena_add_portfolio_preset')){
    function yena_add_portfolio_preset( ){
        return array(
            'type-1' => esc_html__( 'Type 1', 'yena' ),
            'type-2' => esc_html__( 'Type 2', 'yena' ),
            'type-3' => esc_html__( 'Type 3', 'yena' ),
            'type-4' => esc_html__( 'Type 4', 'yena' ),
            'type-5' => esc_html__( 'Type 5', 'yena' ),
            'type-6' => esc_html__( 'Type 6', 'yena' ),
        );
    }
}
add_filter('LaStudioElement/portfolio/control/preset', 'yena_add_portfolio_preset');

if(!function_exists('yena_add_portfolio_list_preset')){
    function yena_add_portfolio_list_preset( ){
        return array(
            'list-type-1' => esc_html__( 'Type 1', 'yena' ),
            'list-type-2' => esc_html__( 'Type 2', 'yena' )
        );
    }
}
add_filter('LaStudioElement/portfolio/control/preset_list', 'yena_add_portfolio_list_preset');

if(!function_exists('yena_add_team_member_preset')){
    function yena_add_team_member_preset( ){
        return array(
            'type-1' => esc_html__( 'Type 1', 'yena' ),
            'type-2' => esc_html__( 'Type 2', 'yena' ),
            'type-3' => esc_html__( 'Type 3', 'yena' ),
            'type-4' => esc_html__( 'Type 4', 'yena' ),
            'type-5' => esc_html__( 'Type 5', 'yena' ),
            'type-6' => esc_html__( 'Type 6', 'yena' ),
            'type-7' => esc_html__( 'Type 7', 'yena' ),
            'type-8' => esc_html__( 'Type 8', 'yena' )
        );
    }
}
add_filter('LaStudioElement/team-member/control/preset', 'yena_add_team_member_preset');

if(!function_exists('yena_add_posts_preset')){
    function yena_add_posts_preset( ){
        return array(
            'grid-1' => esc_html__( 'Grid 1', 'yena' ),
            'grid-2' => esc_html__( 'Grid 2', 'yena' ),
            'grid-3' => esc_html__( 'Grid 3', 'yena' ),
            'list-1' => esc_html__( 'List 1', 'yena' )
        );
    }
}
add_filter('LaStudioElement/posts/control/preset', 'yena_add_posts_preset');

if(!function_exists('yena_add_testimonials_preset')){
    function yena_add_testimonials_preset( ){
        return array(
	        'type-1' => esc_html__( 'Type 1', 'yena' ),
	        'type-2' => esc_html__( 'Type 2', 'yena' ),
	        'type-3' => esc_html__( 'Type 3', 'yena' ),
	        'type-4' => esc_html__( 'Type 4', 'yena' ),
	        'type-5' => esc_html__( 'Type 5', 'yena' ),
        );
    }
}
add_filter('LaStudioElement/testimonials/control/preset', 'yena_add_testimonials_preset');

if(!function_exists('yena_add_google_maps_api')){
    function yena_add_google_maps_api( $key ){
        return yena_get_option('google_key', $key);
    }
}
add_filter('LaStudioElement/advanced-map/api', 'yena_add_google_maps_api');

if(!function_exists('yena_add_instagram_access_token_api')){
    function yena_add_instagram_access_token_api( $key ){
        return yena_get_option('instagram_token', $key);
    }
}
add_filter('LaStudioElement/instagram-gallery/api', 'yena_add_instagram_access_token_api');

if(!function_exists('yena_add_mailchimp_access_token_api')){
    function yena_add_mailchimp_access_token_api( $key ){
        return yena_get_option('mailchimp_api_key', $key);
    }
}
add_filter('LaStudioElement/mailchimp/api', 'yena_add_mailchimp_access_token_api');

if(!function_exists('yena_add_mailchimp_list_id')){
    function yena_add_mailchimp_list_id( $key ){
        return yena_get_option('mailchimp_list_id', $key);
    }
}
add_filter('LaStudioElement/mailchimp/list_id', 'yena_add_mailchimp_list_id');

if(!function_exists('yena_add_mailchimp_double_opt_in')){
    function yena_add_mailchimp_double_opt_in( $key ){
        return yena_get_option('mailchimp_double_opt_in', $key);
    }
}
add_filter('LaStudioElement/mailchimp/double_opt_in', 'yena_add_mailchimp_double_opt_in');

if(!function_exists('yena_render_breadcrumbs_in_widget')){
    function yena_render_breadcrumbs_in_widget( $args ) {

        $html_tag = 'nav';
        if(!empty($args['container'])){
            $html_tag = esc_attr($args['container']);
        }

        if ( function_exists( 'yoast_breadcrumb' ) ) {
            $classes = 'site-breadcrumbs';
            return yoast_breadcrumb( '<'.$html_tag.' class="'. esc_attr($classes) .'">', '</'.$html_tag.'>' );
        }

        $breadcrumb = apply_filters( 'breadcrumb_trail_object', null, $args );

        if ( !is_object( $breadcrumb ) ){
            $breadcrumb = new Yena_Breadcrumb_Trail( $args );
        }

        return $breadcrumb->trail();

    }
}
add_action('LaStudioElement/render_breadcrumbs_output', 'yena_render_breadcrumbs_in_widget');

if(!function_exists('yena_turnoff_default_style_of_gallery')){
    function yena_turnoff_default_style_of_gallery( $base ){
        if( 'image-gallery' === $base->get_name() ) {
            add_filter('use_default_gallery_style', '__return_false');
        }
    }
}
add_action('elementor/widget/before_render_content', 'yena_turnoff_default_style_of_gallery');

add_action('elementor/frontend/after_enqueue_scripts', function (){
    $stretched_section_container = '#outer-wrap > #wrap';
    wp_add_inline_script( 'elementor-frontend', 'try{elementorFrontendConfig.kit.stretched_section_container="'.$stretched_section_container.'";}catch(e){}', 'before' );
});