Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /home1/andertr9/public_html/wp-content/themes/anderson/ |
Upload File : |
<?php /* Prohibit direct script loading ------------------------------------------------------------ */ defined( 'ABSPATH' ) || die( ); /* Load child theme styelesheets ------------------------------------------------------------ */ if ( ! function_exists( 'itemplate_styles' )) { function itemplate_styles( ) { // Fonts //wp_enqueue_style( 'open-sans' , 'https://fonts.googleapis.com/css?family=Open+Sans:400,600,700' ); //wp_enqueue_style('open-sans','https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,600' ); // Child Theme Styles //wp_enqueue_style( 'theme' , get_stylesheet_directory_uri( ) . '/css/theme.css' , array('combine') , md5( date( 'Y-m-d H:i:s' ))); //wp_enqueue_style( 'itemplate-responsive' , get_stylesheet_directory_uri( ) . '/css/itemplate-responsive.css' , array( 'ssp-starter-responsive' ) , md5( date( 'Y-m-d H:i:s' ))); } } add_action( 'wp_enqueue_scripts' , 'itemplate_styles' ); function my_wpcf7_form_elements($html) { $text = '- Please select one -'; $html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html); return $html; } add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements'); remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); add_filter('script_loader_tag', 'add_defer_attribute', 10, 2); function add_defer_attribute($tag) { // array of scripts to async $scripts_to_async = array('greensock.js', 'jquery-migrate.min.js', 'foobox.min.js', 'jquery.isotope.js', 'jquery.flip.min.js', 'wow.min.js', 'jquery.bxslider.min.js', 'jquery.scrollTo.min.js', 'jquery.mobilemenu.js', 'ngg.slideshow.min.js', 'jquery.cycle.all.min.js', 'page.js', 'jquery.scripts.js', 'layerslider.transitions.js', 'layerslider.kreaturamedia.jquery.js', 'wp-embed.min.js', 'scripts.js', 'jquery.form.min.js', 'api.js'); foreach($scripts_to_async as $async_script){ if(true == strpos($tag, $async_script ) ) return str_replace( ' src', ' defer="defer" src', $tag ); } return $tag; } // REMOVE WP EMOJI remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('wp_print_styles', 'print_emoji_styles'); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'admin_print_styles', 'print_emoji_styles' ); function meks_disable_srcset( $sources ) { return false; } add_filter( 'wp_calculate_image_srcset', 'meks_disable_srcset' ); add_action( 'wpcf7_init' , 'wpcf7_redirect_tag' ); function wpcf7_redirect_tag( ) { wpcf7_add_form_tag( 'redirect' , 'wpcf7_redirect_tag_handler' ); } function wpcf7_redirect_tag_handler( $tag ) { if ( $tag->values ) { return '<input type="hidden" id="redirect" value="' . $tag->values[ 0 ] . '" disabled="disabled" />'; } }