While I appreciate the idea, isn’t this just replacing one plugin with another? Rarst’s link already has the answer — it just needs to be reworked a bit to check for the plugin periodically, like so:
function goodbye_dolly() {
if (file_exists(WP_PLUGIN_DIR.'/hello.php')) {
require_once(ABSPATH.'wp-admin/includes/plugin.php');
require_once(ABSPATH.'wp-admin/includes/file.php');
delete_plugins(array('hello.php'));
}
}
add_action('admin_init','goodbye_dolly');
Slap that into your functions.php file (in a child theme if you aren’t already using a custom theme) and you should be good to go.
Related Posts:
- Automatically Creating Posts for Popular Forum Topics or Products [closed]
- How to structure a plugin
- What Features would you Most Like to See Added to WordPress? [closed]
- is_plugin_active function doesn’t exist
- Custom pages with plugin
- Proper Way to Modify Plugin
- Delete tables from database when deleting plugin
- Consuming an external API in WordPress?
- How to edit a wordpress plugin without break its update process
- Shared functionality in plugins and themes
- Looking for a Table of Contents (TOC) plugin for WordPress
- WordPress Plugin Development In MVC Architecture, How?
- How can I import a class privately into a plugin?
- Integrating plugins in themes
- Custom comment type maybe?
- Posts wont expire
- Themes VS Plugins [duplicate]
- Failed to invoke other hook from the init hook
- Multiple plugins using the same OAuth class issues
- How do I future proof my older WordPress theme?
- How to get Plugin Slugs?
- plugin for wp_list_categories with posts
- Advanced Integration – WordPress + YOURLS
- How to get last_updated and newest_blogs in WP 3.0
- Replace existing pages with new pages, keep menu links
- clean wp_options table unused rows
- Modifying Footnote Plugin for Descriptive Title Attributes
- Will Flutter work with WordPress 3.0?
- Auto add content such as pages upon plugin activation?
- Delete Associated Media Upon Page / Post Deletion
- How to use get_theme_mod in gutenberg editor wordpress?
- Anonymous Postings
- Disable woocommerce cookies and delete cart data automatically
- Run plugins only on certain pages
- wp_generate_attachment_metadata is creating an empty array
- Post category with counts been display like a menu
- Post custom Data value in The Events Calendar plugin [closed]
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Calling an attribute from a plugin shortcode
- Use of Templates in a Plugin
- Why can’t I access my Intranet LDAPS with NADI?
- Setup page on first login on multisite
- Custom wordpress Theme and Plugin repository
- Redirect to another page using contact form 7? [closed]
- Login Customizer doesn’t change the background of the register form
- Integrating WP E-commerce plugin into custom theme
- Custom post types – remove default post supports through empty array?
- WordPress as template engine
- When I try to de-activate any plugin it gives error “Warning: call_user_func_array() [function.call-user-func-array]”
- WordPress – source link plugin – how to modify it?
- Minimize and Uglify WordPress Plugin Files
- How to create plugin in wordpress [closed]
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to filter my products with attributes [closed]
- Action on WordPress Install
- What is the best way to hook a rewrite function for certain php code when plugins are updated?
- Delete data from custom table when deleting a post
- How display specific category post to specific users?
- What is the best way to make a custom page from a plugin?
- Download counter for skydrive shared files in wordpress
- Method/Plugin/Hack to Start a Post with an Writing Outline?
- Automatic recurring payment using YITH subscription and Dokan Stripe
- How to customize maintenance mode notification in wordpress?
- How to keep plugin (media-sync) running even the tab is closed?
- Hide fields in woocommerce settings
- Elementor: How to design Dropdown Select Box Navigation page like Chegg
- implement custom roles in custom plugin
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- Adding LOAD MORE on a page
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- How to assign a specific service to a specific provider based on location
- Move plugin pages from dashboard to front-end
- Creating custom “player-objects”
- save short-code in my custom plugin settings problem missed something
- Cron job shedules replace?
- Installation failed, trying to install ANY plugin
- register_activation_hook not creating table
- Customize plugin templates
- WordPress delete cookie
- multiple string replace of post’s content for large data
- Widget display in theme
- Making sure updates didn’t break anything
- How to use custom footer template in a site-plugin?
- Multi-site error wordpress after migration
- Customize a widget position
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- Update Plugin Without Overwriting Custom Settings
- Where to insert customize_register in wordpress plugin
- Problems with installing and deleting plugins
- wp_query for more fields plugin
- Issues with Post 2 Post Plugin
- Update a WordPress website FROM Twitter or Facebook
- Pronamic Info Window
- From a legal perspective, is it okay to customize a plugin’s code?
- Contact Form 7 Default value from url [closed]
- Child Plugin Admin Panel
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- How to disable plugin capability : “create new category”
- How to create specific wordpress Table