You could use the script_loader_tag filter hook to accomplish this. This hook passes in the tag HTML that you can search on, then add in your data attribute.
/**
* Modify script tags as they're loaded
*
* @param String $tag_html
*
* @return String $tag_html
*/
function wpse379555_script_tag( $tag_html ) {
if( false === strpos( $tag_html, 'wpfastestcache' ) ) {
return $tag_html;
}
return str_replace( ' src="https://wordpress.stackexchange.com/questions/379555/," data-wpfc-render="false" src=", $tag_html );
}
add_filter( "script_loader_tag"https://wordpress.stackexchange.com/questions/379555/,"wpse379555_script_tag' );
Related Posts:
- How can I force a file download in the WordPress backend?
- How to implement a customizable free OpenID authentication?
- What’s a reliable way to depend on another plugin?
- Woocommerce get cart total price in a number format [closed]
- How to tell if Jetpack’s Photon is active?
- Woocommerce – Hide “add to cart” on free products
- Is it good practice to remove redundant plugins and themes?
- What is the purpose of the “Hello Dolly” plugin?
- Generate Advanced Custom Fields box in custom admin menu page
- Share buttons on article footer
- change plugin shortcode function [closed]
- How to prepend to the_title for admin-side plugin’s use
- How can I retrieve data within my widget
- Whats the difference between Page Builder Plugins and Theme Builder Softwares? [closed]
- Settings API – input always updates over validation
- Creating search filter through plugin
- jQuery Plugin to use WordPress functions in AJAX request
- Can a plugin deactivate itself?
- Syntax Highlighting Plugins and 3.2.1
- Problem Building a Simple Google Maps Plugin
- Display content from custom post type if match to main post category
- woocommerce_order_status_completed action hook not working [closed]
- How to update billing_email when user_email is updated [closed]
- Plugin Using get_the_content Causing Issues With Tag
- Which escape function to use when escaping an email or plain text?
- Multisite custom user activation emails – html
- Wp List Table – wpdb results are not displaying
- Change plugin main file name (that is currently in the repo)
- Edit Yoast SEO breadcrumbs output [closed]
- Woocommerce Payments and App Not Syncing
- WP ALL Import plugin – import data from certain ids
- Hide Elementor Templates Menu from Admin [closed]
- How to remove plugin metaboxes from edit.php
- WordPress wp-admin/network/plugin-install
- creating a custom shop page display on archive woocommerce
- Can’t delete the two native plugins of WordPress
- How I can internationalize variables within the function _e () __ (), etc?
- Add menu page issues (permissions & position)
- How to put Word documents online so they can be downloaded, printed and read via a web page? [closed]
- What is the best way for showing a grid of customer logos?
- How can I show a different theme for admin users? WP 3.8+
- Is there any way to make myself an admin?
- Plugin Theme CSS [closed]
- General questions re: WordPress and WP plugins [closed]
- populating a form field with output from a custom plugin function
- Using ‘mysqli_connect’ ‘crashes’ WordPress client-side
- Short messages widget [closed]
- Yoast Force Rewrite Crashed Site [closed]
- Fetch Data from other website in wordpress (screen scraping)
- Is there a way to add custom endpoint to specific page only
- IF condition based on wp_remote_get output
- shortcode not return any thing in Gutnburg
- Change in one place the data about the company, which are placed on several pages
- How do I add a plugin dependency to my customized theme?
- How WordPress core manage the plugin installation
- Flickering sidebar when scrolling page [closed]
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- Add action to custom Function
- “Allowed memory size” problem [closed]
- count the number of views of a post excluding own views
- WordPress Url setting
- When Installing a Plugin Where do I Move Template Files to?
- What would make the plugin update process to complete but don’t report as such?
- AZindex related help needed
- WordPress slider that allows image, headline, text, and button?
- Shortcode not displaying HTML within the function
- Contact Form 7 is not redirecting the “Thank-You” page with the removal of CSS and JS of plugins
- WordPress search input in database, to edit information via form and update the database
- Enqueue css to a third-party plugin template
- Remove a div class with condition
- How Can I Increase Breadcrumb Position Count (Starting From 2)?
- website shows blank when visiting from mobile
- Hello everyone! Is there a function to call the wordpress loader?
- $wpdb->insert not working inside save_post tag
- How to check for already existing plugin versions on activation? and prevent errors
- update_post_meta is not working for me when I use e.preventDefault for update button
- Use modulo condition in ACF repeater Field
- jQuery works instead of $
- How to get data from a private API and add it to wordpress pages
- Debug in WP backend
- Geotargeting plugins never work
- Plugin management with my custom plugin
- How to get custom or filtered endpoints in WordPress API?
- Change pages based on city
- WordPress 4.1 plugin only save 1 field to database
- How to run my plugin only when the whole page is sent?
- WordPress custom posttype meta values doesnot save
- Why tinyMCE.editors doesnt work on tinyMCE
- get_var result empty for query of custom table in plugin admin
- WordPress include scripts and style in plugin page
- get_option include in my adsense
- woocommerce product categories in menu [closed]
- Book plugin to record books read and write my own reviews [closed]
- On the same site, how do I send data from a plugin file to a theme file?
- Conflicting plugins break site
- Implementing onSplit/onMerge in dynamic Gutenberg Custom Blocks
- How do I know if an archive correspond to a custom post type taxonomy?
- How to change the version of block.js and plugin to the same of Package.json?
- Warning “Attempt to read property ‘feeds’ on null” using post update function
- How to Remove Default Category Metabox in Custom Post Types