tag (e.g. GTM noscript) */ function aio_tools_frontendBodyOpen() { aio_tools_output( 'optBodyOpen' ); } /** * Outputs script / CSS to the frontend footer */ function aio_tools_frontendFooter() { aio_tools_output( 'optFooter' ); } /** * Outputs the given setting, if conditions are met * * @param string $setting Setting Name * @return output */ function aio_tools_output( $setting ) { // Ignore admin, feed, robots or trackbacks if ( is_admin() || is_feed() || is_robots() || is_trackback() ) { return; } // Get meta $meta = aio_get_option( $setting ); if ( empty( $meta ) ) { return; } if ( trim( $meta ) === '' ) { return; } // Output raw saved script/HTML without stripping legitimate JS escape backslashes echo $meta; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }