Add_filter ('Lingise_Hreflang_tags', Function ($ hreflang_tags) {Foreach ($ hreflang_tags as & $ tag) {// If href starts with // if ($ tag ['href'], '//') == 0) {$ tag] = 'https:'. $ tag ['href'];}} return $ hreflang_tags; // Remove Problem Scripts FUNCTION ANIMENW_REMOVE_PROBLEMATIC_SCRIPTS () {// List of scripts to remove (Update with correct handles after identifying them) $ scripts_to_remove = array ('Adopt-Script', 'SSB-VIEWABILITY', 'LKQD-ADS' // Add others Handles as needed); Foreach ($ scripts_to_remove as $ script) {wp_deregister_script ($ script); }} Add_action ('wp_enqueue_scripts', 'animenew_remove_problematic_scripts', 100); // Add filter to remove scripts Inline that cannot be removed by the above method Function animeNew_filter_Script_loader_tag ($ tag, $ handle) {// Remove specific scripts by IF ($ tag, 'adop')! || strpos ($ tag, 'lkqd.net')! == false) {return ''; } return $ tag; } add_filter ('script_loader_tag', 'animenew_filter_script_loadader_tag', 10, 2); / ** DON'T LOAD Directly*/ DEFINED ('Apath') || exit; define ('Foxiz_theme_version', '2.6.3'); Define ('Foxiz_Theme_Dir', TrailingslasHit (get_template_directory ())); define ('Foxiz_theme_uri', trailingslaslas (sc_url (get_template_directory_uri ()))); define ('Foxiz_child_theme_dir', trailingslashit (get_stylesheet_directory ())); Define ('Foxiz_child_Theme_uri', trailingslaslashit (sc_url (get_stylesheet_directory_uri ()))); DEFINED ('FOXIZ_TOS_ID') || Define ('Foxiz_TOS_ID', 'Foxiz_Theme_Options'); Include_once Foxiz_Theme_Dir. 'include/core-functions.php'; Include_once Foxiz_Theme_Dir. 'include/file.php'; Add_action ('After_setup_theme', 'Foxiz_Theme_Setup', 10); Add_action ('WP_Enqueue_Scripts', 'Foxiz_Reister_Sript_Frontend', 990); / ** setup*/ if (! Function_exists ('Foxiz_theme_setup')) {Function Foxiz_theme_setup () {load_theme_textDomain ('Foxiz', get_theme_file_path ('language')); IF (! ISSET ($ global ['content_width']))) {$ global ['content_width'] = 1170; } add_theme_support ('Automatic-Feed-Links'); add_theme_support ('title-tag'); add_theme_support ('HTML5', ['Search-Form', 'Comment-Form', 'Comment-List', 'Gallery', 'Caption', 'Script', 'Style',]); add_theme_support ('post-formats', ['gallery', 'video', 'audio']); add_theme_support ('post-thumbnails'); add_theme_support ('editor-style'); add_theme_support ('responsive-emps'); add_theme_support ('align-wide'); add_theme_support ('Woocommerce', ['gallery_thumbnail_image_width' => 110, 'thumbnail_image_width' => 300, 'single_image_width' => 760,]); add_theme_support ('wc--product-galllery-mightbox'); add_theme_support ('wc--product-gallery-slider'); if (! Foxiz_get_option ('widget_block_editor'))) {remove_theme_support ('widgets-block-editor'); } Register_Nav_Menus (['Foxiz_Main' => Esc_html __ ('Main menu', 'Foxiz'), 'Foxiz_mobile' => Esc_HTML __ ('Mobile Menu', 'Foxiz'), 'Foxiz_mobile_quick' => Esc_html __ ('Mobile Quick Access', 'Foxiz' ),]); $ sizes = Foxiz_calc_crop_sizes (); Foreach ($ sizes AS $ crop_id => $ size) {add_image_size ($ crop_id, $ size [0], $ size [1], $ size [2]); }}} / * Register scripts * / if (! Function_exists ('Foxiz_register_Script_frontend')) {Function Foxiz_Register_Sript_frontend () {$ style_deps = []; $ script_deps = ['JQuery', 'JQuery-WayPoints', 'RBSwiper', 'JQuery-Magure-Popup',]; $ main_filename = 'main'; $ WOOCOMMERCE_FileName = 'Woocommerce'; $ podcast_filename = 'podcast'; if (is_rtl ()) {$ main_filename = 'rtl'; $ WOOCOMMERCE_FileName = 'WOOCOMMERCE-RTL'; $ podcast_filename = 'podcast-port'; } $ gfont_url = Foxiz_Font :: get_font_url (); if (! empty ($ gfont_url)) {wp_register_style ('Foxiz-Font', Esc_URL_RAW ($ gfont_url), [], foxiz_theme_version, 'all'); $ style_deps [] = 'Foxiz-Font'; } if (Foxiz_get_option ('font_awesome')) {wp_deregister_style ('font-awesome'); wp_register_style ('font-awesome', foxiz_get_file_uri ('assets/css/font-awesome.css'), [], '6.1.1', 'all'); $ style_deps [] = 'font-awesome'; } wp_register_style ('Foxiz-Main', Foxiz_get_File_uri ('Assets/CSS/'. $ main_filename. wp_add_inline_style ('Foxiz-Main', Foxiz_Get_DyNamic_CSS ()); $ style_deps [] = 'Foxiz-Main'; if (Foxiz_get_option ('podcast_supported')) {wp_register_style ('Foxiz-Podcast', Foxiz_Get_File_uri ('Assets/CSS/'. $ podcast_filename. $ style_deps [] = 'Foxiz-Podcast'; } if (! Foxiz_is_AMP ()) {wp_register_style ('Foxiz-Print', Foxiz_Get_File_uri ('Assets/CSS/Print.CSS'), [], Foxiz_theme_version, 'All'); $ style_deps [] = 'Foxiz-Print'; if (class_exists ('woocommerce')) {wp_deregister_style ('yith-wcwl-sfont-awesome'); WP_register_style ('Foxiz-Woocommerce', Foxiz_Get_File_uri ('Assets/CSS/'. $ woocommerce_filename. $ style_deps [] = 'Foxiz-Woocommerce'; }} wp_register_style ('Foxiz-Style', get_stylesheet_uri (), $ style_deps, foxiz_theme_version, 'all'); WP_Enqueue_style ('Foxiz-Style'); if (! Foxiz_is_AMP ()) {wp_register_script ('html5', foxiz_get_file_uri ('assets/js/html5shiv.min.js'), [], '3.7.3'); WP_Sript_add_Data ('HTML5', 'Conditional', 'Lt IE 9'); if (is_sular () && comments_open () && get_option ('thread_comments')) {wp_enqueue_script ('comment-reply'); } wp_register_Sript ('JQuery-WayPoints', Foxiz_get_file_uri ('Assets/JS/JQuery.WayPoints.min.js'), ['JQuery'], '3.1.1', True); WP_Reister_Sript ('RBSWIPER', Foxiz_Get_File_uri ('Assets/JS/RBSWIPER.min.js'), [], '6.5.8', True); WP_Reister_Sript ('JQuery-MAGNIFIC-POPUP', FOXIZ_GET_File_uri ('Assets/JS/JQuery.MP.min.js'), ['JQuery'], '1.1.0', True); IF (FOXIZ_GET_Option ('website_tooltips') &&! Foxiz_is_wc_pages ()) {wp_register_Sript ('RB-Tipsy', Foxiz_get_file_uri ('Assets/JQuery.min.js'), ['JQuery'], '1.0', True); $ script_deps [] = 'rb-tipsy'; } if (Foxiz_get_option ('Single_Post_Highlight_Shares')))))))) ('Highlight-Share', Foxiz_Get_File_uri ('Assets/JS/Highlight-Share.js'), '1.1.0', True); $ script_deps [] = 'highlight-share'; } if (Foxiz_get_option ('back_top')) {wp_register_Sript ('jQuery -uitotop', foxiz_get_file_uri ('assets/jQuery.u.totop.min.js'), ['jQuery'], 'v1.2', true); $ script_deps [] = 'jQuery -uitotop'; } if (class_exists ('Foxiz_core')) {if (Foxiz_get_option ('Bookmark_System')) {wp_register_Script ('Foxiz-Personalize', Foxiz_Get_File_uri ('Assets/Js/Personalized.js'), ['JQuery', 'Foxiz-core',], Foxiz_Theme_version, True); $ script_deps [] = 'Foxiz-Personalize'; } $ script_deps [] = 'Foxiz-core'; } WP_Reister_Sript ('Foxiz-Global', Foxiz_Get_File_uri ('Assets/JS/Global.js'), $ script_deps, foxiz_theme_version, true); WP_Localize_Sript ('Foxiz-Global', 'FoxizParams', Foxiz_Get_JS_Settings ()); WP_Enqueue_Sript ('Foxiz-Global'); }}}