Restating the answer from @JacobPeattie in the comments above.
filemtime() requires a path, not a URL
Therefore use plugin_dir_path(__FILE__)
.
The full string for properly printing the cache-busting part of the version number at the end of the asset would be filemtime( plugin_dir_path(__FILE__)
Related Posts:
- How do I force wp_enqueue_scripts to load at the END of ?
- how to include other plugins css files in a shortcode?
- How can I dequeue a Plugin Stylesheet?
- How to load different css file for different pages
- Get info (url) from already enqueued styles
- wp_enqueue_style in Plugin [duplicate]
- Plugin throws up 404 on front-end when when enqueuing style with filetime
- How can I enqueue a style only when a particular widget is active?
- Prevent CSS/JS loading when plugin is not used
- wp_enqueue_style specifics for overwriting plugin styles
- How to enqueue a theme style-sheet to my admin settings page?
- Is it possible to enqueue CSS files from plugin before theme’s CSS files?
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- How to remove style and js from theme and add your own style and js where shortcode is used?
- Making a plugin only available on the front-end for the logged in super admin
- How to remove plug in styles for WPForms Lite [closed]
- Can’t catch enqueued style
- Adding Font Awesome to WP Plugin
- Enqueue stylesheet in plugin for wp-login.php
- How to add CSS via custom plugin?
- wp_enqueue_style for plugin options page
- wp_enqueue_style on template_redirect level?
- Custom plugin – load enqueue only for this plugin
- dynamic name of the style for wp_enqueue_style
- plugin enqueue style on all pages
- is it possible to hook every page style?
- Dequeue, Unregister, Remove Action – Not Working on Plugin
- Deregister scripts from plugin
- Edit all $wp_scripts at once to $in_footer = false
- Edit all $wp_scripts at once to $in_footer = false
- Load CSS before Theme CSS
- Enqueue css to a third-party plugin template
- wordpress plugin add page when activate
- How to add styles to a submenu page?
- Why can I not deregister my style and script on custom post type?
- How to add php stylesheet to admin section instead of admin_head hook
- WordPress include scripts and style in plugin page
- plugin’s script and style enqueing not working on Thesis
- How to laod wp_enqueue_style to another header i created my self
- Frontend Enqueued Files in the Backend
- I changed .live() to .on() but change is not reflected on the server
- How to find out whether a plugin is used in pages or posts?
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- flush_rewrite_rules() not working with update_option_{$option}
- How to get the particular product quantity in orders in Woocommerce [closed]
- plugin dev – minimum base css specificity?
- Using WordPress to build membership Page
- How to generate an all in one WordPress New content, plugin and theme update report on a website? [closed]
- Tutor LMS problem with Paid Memberships Pro [closed]
- Is there a plugin for WordPress for creating ‘Accounts’ where all users who belong to that Account can only see Account data? [closed]
- A server-side hook failed when committing plugin code to SVN
- Custom shortcode for displaying user based on a role parameter
- Help with comments.php
- How to execute plugin and theme updates from a web hook / endpoint?
- WordPress Plugin Insert Html Code with Shortcode
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- Set WordPress Transient Expiration via Variable Value
- Vulnerability Concern From the Plugin or From Not Updating the Plugin?
- PHP Warning: Declaration of aec_contributor_list::form() should be compatible with WP_Widget::form($instance)
- How to remove index meta tag
- don’t call ajax if not plugin page
- How to use the pre_option filter before a plugin loads?
- How I can change the required capability for an admin menu without editing the plugin file?
- Why WP_Screeen doesn’t show all options with admin_body_class
- I changed font of wordpress dashboard but it is slow!
- wp_dequeue_script for a Plugin
- Location dependent rendering of locations? [closed]
- Creating a widget and missing jQuery
- SMTP Error: Could not authenticate [closed]
- How to add support for caching plugins for my own plugin?
- My custom php file keeps 404’ing in WordPress when I call it. What am I missing?
- Use $variable from file1.php in file2.php (different file paths)
- How to import WordPress site to new WordPress site?
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Need to replace Currency Shortforms
- Looking for a free quiz plugin which saves the candidates answers for review [closed]
- wp_enqueue_scripts
- Why Does The `auto_update_plugin` Hook Disable Management?
- Return multiple values in a shortcode attribute
- Allowing .rfa Files In Media Upload [duplicate]
- Sanitizing file & directory form input
- What’s my optimal choice for remote access to my localhost sites?
- Some WordPress Posts are automatically becoming comments on other Posts
- List category posts displaying limited posts
- Get Every Key & Value from Array then Display All in New Line
- What are admin hooks
- disabling ftp on wordpress
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- Is there a way to add custom endpoint to specific page only
- “uagb/section and uagb/columns block”
- IF condition based on wp_remote_get output
- shortcode not return any thing in Gutnburg
- Fatal error on some pages after cancelling WPSTAGING cloning process
- Always get creating a new table with foreign key
- Progmatically adding menu links to the default (Top) or Footer menu
- Add text to variable
- Where is my google maps on my page? [closed]
- standard custom page template hierarchy for plugins
- get specific value of a array | PHP