<?php
add_action( 'elementor/frontend/before_register_scripts', function (){
        wp_deregister_script('prismjs_core');
        wp_deregister_script('prismjs_loader');
        wp_deregister_script('prismjs_normalize');
        wp_deregister_script('prismjs_line_numbers');
        wp_deregister_script('prismjs_line_highlight');
        wp_deregister_script('prismjs_toolbar');
        wp_deregister_script('prismjs_copy_to_clipboard');

        $base_url = ELEMENTOR_PRO_URL.'megatheme/includes/iran-fixer/assets';
        wp_register_script( 'prismjs_core', $base_url . '/prism-core.min.js', [], '1.23.0', true );
        wp_register_script( 'prismjs_loader', $base_url . '/prism-autoloader.min.js', [ 'prismjs_core' ], '1.23.0', true );
        wp_register_script( 'prismjs_normalize', $base_url . '/prism-normalize-whitespace.min.js', [ 'prismjs_core' ], '1.23.0', true );
        wp_register_script( 'prismjs_line_numbers', $base_url . '/prism-line-numbers.min.js', [ 'prismjs_normalize' ], '1.23.0', true );
        wp_register_script( 'prismjs_line_highlight', $base_url . '/prism-line-highlight.min.js', [ 'prismjs_normalize' ], '1.23.0', true );
        wp_register_script( 'prismjs_toolbar', $base_url . '/prism-toolbar.min.js', [ 'prismjs_normalize' ], '1.23.0', true );
        wp_register_script( 'prismjs_copy_to_clipboard', $base_url . '/prism-copy-to-clipboard.min.js', [ 'prismjs_toolbar' ], '1.23.0', true );

} ,11);