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]
- Best collection of code for your 'functions.php' file [closed]
- similar of my posts in all over the internet sites and blogs [closed]
- How to structure a plugin
- How to implement a customizable free OpenID authentication?
- Should all plugins be encapsulated in a Class?
- What Features would you Most Like to See Added to WordPress? [closed]
- How can I edit post data before it is saved?
- is_plugin_active function doesn’t exist
- Difference between add_filter and apply_filters
- Custom pages with plugin
- Proper Way to Modify Plugin
- Delete tables from database when deleting plugin
- How can I delete orphan keys in WordPress database tables?
- Consuming an external API in WordPress?
- How to edit a wordpress plugin without break its update process
- How to delete all records from or empty a custom database table?
- Shared functionality in plugins and themes
- What is right way to go about adding functionality to a published WordPress plugin?
- Looking for a Table of Contents (TOC) plugin for WordPress
- Remote upload file to server B
- WordPress Plugin Development In MVC Architecture, How?
- Is it a good idea to edit an already existing plugin to add more functionality?
- Checking if an attribute exists in a shortcode
- How Is Network Activate Different From Activate (by Implementation)?
- Creating Unique Post URLs for A/B Testing… Is this even possible?
- OpenID for WordPress 3.x? [duplicate]
- How can I import a class privately into a plugin?
- Where should I use get_option in a plugin
- Get a button for in the Editor
- Show Similar Post Titles ( Similar to Stack Exchange )
- Plugin (or Theme) containing its own Plugins?
- How do I unlock a post programmatically?
- How to enable edit button in the theme’s customize UI?
- GPL and plugins
- Automating deprecated call checks?
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- How to create extendable wordpress plugins
- Delete Post With No Traffic?
- A Way to Auto update plugins using cron?
- Create page when plugin is activated
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Generate custom output for page/URL in a plugin
- Open external links in a new window
- Creating button next to “add media” that allows you to choose a single post
- WooCommerce create new product and add to cart on form submit
- Extending WC_Cart in woocommerce
- How can I limit functionality in one version of a plugin?
- Integrating plugins in themes
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- How to add usermeta to “Notice of Email Change” email message
- Which functions in theme or plugin load first
- WordPress Plugin as ‘Library’ From Abstract Application?
- How to show custom message once on plugin activation?
- What’s the recommended process for organising collaborative posting?
- Any way to use a custom Parameter for youtube embed without using an iframe?
- Post source link plugin – small modification
- How to add users roles dropdown in registration in wordpress
- Add CSS animation as Preloader to WordPress
- Custom comment type maybe?
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Plugin to set all Posts in a certain Category to a certain Post Format
- wp_schedule_event / cron_schedules – custom recurrence time not working in Plugin
- Add custom meta box on Post page
- Posts wont expire
- How to load a new template page according to a particular URL?
- Custom Widget Creating PHP Exception When Placed In Its Own PHP File
- How to set value/term of a Woocommerce attribute text field in admin panel?
- WordPress network: set themes and plugins for new blog
- Updating post meta for custom post types
- Image Crop/Resize Function/Code Sinppet/Plugin to adjust/crop images during upload
- WP get_permalink Return Wrong URL
- Themes VS Plugins [duplicate]
- Failed to invoke other hook from the init hook
- WordPress 3.1 and Disqus throws Warning: number_format() error in Posts List
- Why is this custom taxonomy showing in the database?
- WP Plugin for Terms of Use
- How to edit plugin’s html? [closed]
- WordPress Plugin development Call to undefined function jQuery()
- Conditional Display of Links in Widgets
- How to add product images using script?
- Is there a plugin to display certain posts on certain pages? [closed]
- Woocommerce: Changing the variations select default value? [closed]
- Can a plugin add to header/footer/body content?
- Multiple plugins using the same OAuth class issues
- Automagic Link Shortening for Non-Hosted WP
- Created Widget Not Showing up on Admin Panel
- How do I future proof my older WordPress theme?
- How to get Plugin Slugs?
- Setting up widgets in wordpress with a unique ID for the after_title argument
- plugin for wp_list_categories with posts
- REST-API: extend media-endpoint
- I need to add a custom “cover” to every new post — plugin or custom setup?
- Akismet plugin is deleting spam despite preferences
- 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
- How can I rewrite a plugin generated URL?
- clean wp_options table unused rows