Basically you should not include the file in the plugin in the first place. If the reason you don’t want it to be overwritten is because you modify it based on some local setting, then you should leave the immutable part of the file in it and create another file which will contain the mutable parts.
Then you can use your CSS like that (assuming you suplly constant.css with the plugin and generate costum.css locally.
add_action('wp_head','my_plugin_addcss');
function my_plugin_addcss() {
// register and enqueue the immutable part
wp_register_style('constantStyle', WP_PLUGIN_URL . '/my_plugin/constant.css');
wp_enqueue_style('constantStyle');
// register and enqueue the custom part
wp_register_style('costumStyle', WP_PLUGIN_URL . '/my_plugin/costume.css');
wp_enqueue_style('costumStyle');
}
Related Posts:
- to perform the requested action wordpress needs to access your web server. please enter your ftp
- How can I stop WordPress from prompting me to enter FTP information when doing updates?
- How to implement WordPress plugin update that modifies the database?
- What are the best practices for updating?
- Update plugin from personal API
- Can’t install new plugins because of the error “Could not create directory”
- Removing the “Your backup folder MIGHT be visible to the public” Message Generated by the WP-DBManager Plugin
- How to create a WordPress plugin for another wordpress plugin?
- Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).”
- Preventing a plugin from updating
- Plugin update error message
- Customize plugin update “new version is available” text
- Get Latest Plugin Version from WP API
- How wordpress detects a plugin update
- A Way to Auto update plugins using cron?
- Overwrite textdomain of plugins by default – Lost Translation
- Plugin updates are not shown
- Filter Hook on plugin update
- Remove update messages for deactivated plugins
- How get list of updates of wp site?
- How to notify users of blog updates a la Admin Plugin Update notifications?
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Automatic updates not working/plugins not installing
- Hook (upgrader_process_complete) running moment
- WordPress plugin search does not work and updates are not shown, VPS install
- How do I prevent Plugin updates from clobbering user edits?
- Force wordpress to request for FTP Info on theme/plugin install/update
- Under which circumstances is the .maintenance file not deleted?
- Plugin child folder?
- How to check if WordPress is updating plugins?
- All Updated Plugins Disappeared
- Do extra plugin files get deleted during an upgrade?
- Could not create directory
- Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update
- Can’t use the built-in wordpress install/upgrade plugin feature [closed]
- How can we deal with unmaintained plugins with vulnerabilities?
- How to create a plugin that notifies for updates?
- Where to access the available plugin/WordPress updates?
- ‘Customize’ button in admin bar for CSS
- Are there hooks for WordPress updates?
- How to make my plugin able to be updated from admin panel?
- How to update WordPress plugins to latest using SVN
- Elementor\Scheme_Typography’ not found [closed]
- Theme and plugin install or update display error in localhost
- What is the correct way to update both WP/plugins/themes without breaking the site?
- Pushing out updates to multiple installs?
- custom changes removed after plugin update
- Plugin updates from a specific location
- What keys are needed when passing the icons array to plugins_api()?
- Two problems on my WordPress installation [closed]
- get 404 when accessing wp-admin/plugin-install.php
- Programatically update non-wordpress repository hosted (self-hosted) plugins
- Call specific plugin update
- Malware installation during plugin update?
- How to test ‘upgrader_process_complete’ hook in plugin development?
- Redirect to another page using contact form 7? [closed]
- How do I disable an update for a specific plugin?
- Batch update of WordPress Plugins
- How to get plugin name from plugin file location
- Plugins fail to update: Download failed. A valid URL was not provided
- What is a rock solid development and deployment workflow? [closed]
- How do I get the user ID of the user that was updated in WordPress?
- Error checking when future updates are automatic
- Regularity of Checking for plugin updates? [duplicate]
- getting notifications about updates only in the “core” page
- Plugin upgrade failing during unzip
- How (or where) do I get wordpress plugin update download link?
- Problem after updating plugins
- After a manual update, themes and plugins that were installed (and still in the directory) are not being seen
- Manualy Updated WordPress Error
- WordPress plugins – “Update” in backend vs replacing all files with never version
- Plugin updated pushed with git break site
- Bash script to check available updates
- WordPress fresh installation did not update default plugin and themes to latest version
- Custom Plugin Update
- How use get_plugin_updates() function?
- There has been a critical error on your website
- Updates Hidden on Dashboard
- Error after installing the WordPress plugin updates
- Gutenberg editor in WordPress 5.0.3 /wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)
- Making sure updates didn’t break anything
- Plugin doesn’t update it’s version and code on WordPress.org
- Can Hosting affect a plugin from working properly?
- WordPress Plugin Install / Update Problem
- Trouble cloning a live WordPress site to a new site on a local server?
- WordPress update plugin through Dashboard/Plugins displaying error
- Update page (update-core.php) & Plugins page (plugins.php) revert to homepage
- How to keep edited plugins updated?
- How to speed up installing plugins and upgrading WordPress
- Automatic updates of plugins and themes outside of wordpress.org
- Which part of the plugin to change so the updater won’t register the next version?
- Updates for a private plugin?
- Trouble After Update, Removing Plugin
- No plugin updates after moving wp-config.php above root map
- Using one-click plugin upgrade feature securely on suexec server
- How to Replicate Elementor Licensing Model
- how to update wordpress plugin programmatically using plugin path
- Manually update notification of plugins needing updating
- On WordPress.org Plugin repository, Last Updated Date doesn’t match with Plugin Version Update Date
- What’s the best way to update my WordPress theme to Elementor?