Closing PHP tag
-
Hello,
I need to add some code to the child functions.php file to remove query strings from static resources. I’m told to place the code before the closing PHP tag (%>) at the bottom of the file. I don’t seem to have a closing PHP tag. Below is all the code in my functions.php file. Could you please tell me where the code should go? Thank you.
<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;
function defer_parsing_of_js ( $url ) {
if ( FALSE === strpos( $url, ‘.js’ ) ) return $url;
if ( strpos( $url, ‘jquery.js’ ) ) return $url;
return “$url’ defer “;
}
add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED – Do not modify or remove comment markers above or below:if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’ );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’ );// END ENQUEUE PARENT ACTION
- The topic ‘Closing PHP tag’ is closed to new replies.