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
- Cannot install plugins even though www-data has write permissions
- How to call a plugin function from front end form
- Get subcategories with JSON API plugin
- WooCommerce plugin appearance and look [closed]
- adding a text message beside the comment submit button
- use function inside another function in WP Plugin
- Override the filter from plugin in child theme
- Average Account Age
- JS Support Ticket – Auto create WP account
- Change upload folder for a CPT
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Using plugin functions/methods within templates
- How to retain table data in wordpress phpunit tests
- accessing parent variables in child construct without executing action in parent
- Ajax : Call undefined function plugin_function() … can’t call any plugin function
- How to over-ride a file in a plugin? [closed]
- execute function after one completed
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Display Plugin Panels Outside of Admin Areas
- What are the correct permissions so WP doesn’t ask for FTP credentials if installing plugin?
- Super slow plugin page (lots of error 500)
- Looking for Gallery Plugin [closed]
- Notice: Undefined index: mtral_field_subscriber
- Delete free version plugin will also delete premium plugin
- How to delete a theme using AJAX
- Adding a responsive grid onto a page (without using a Bootstrap theme) [closed]
- Licensing a Plugin [closed]
- Add a function call after content automatically?
- Equivalent of admin.php for public pages
- Detect plugin/theme installation (via upload)
- Engadget Like Featured Breaking Plugin
- sliding/fading header plugin or approach suggestion
- Google Analytics event tracking code being stripped out of links in Author box – WordPress site
- Import Recent Posts Only and Ignore old ones if exist
- Security of a WordPress Plugin
- @wordpress/scripts advanced usage
- wp_post not working, keeps redirecting to posts page
- How to display ACF coustom field from category on author.php
- How to add Mobile field in Registration form using Theme my login Plugin
- prevent anonymous access to WordPress site (non-admin site)
- make p tag collapsed after 3 rows
- WPBakery Page Builder Shortcode Showing On Front Page For Post
- Scroll to ID broken in main menu
- Comment restrictions Wodpress
- Generate and send ICS file through WordPress
- Gutenberg editor in WordPress 5.0.3 /wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)
- WP Plugin permissions – create new files
- How to capture customer’s credit card details via PayPal on my checkout page?
- Add code to page template on page built with Visual Composer
- .htaccess file doesn’t work, with hundred tries
- plugin translation is not working
- A more elegant way to handle notices/warnings
- To set a post is new/old in vertical scrolling
- First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
- Get the url of attachments from the post?
- WordPress User Frontend Editing Custom Fields
- What are the downsides of using bootstrap in plugin development?
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- Function mb_strlen Fail [closed]
- Images get uploaded itself from the computer
- getPost() method and Pagination