How can I delete options with register_uninstall_hook?

Right now, I have this code: function mr_np_activate(){ // hook uninstall if ( function_exists(‘register_uninstall_hook’) ) register_uninstall_hook(__FILE__,’mr_np_uninstall’); } register_activation_hook(__FILE__,’mr_np_activate’); /** * Delete options * **/ function mr_np_uninstall() { delete_option(‘my_plugins_options’); } But when I remove my plugin, all my options are there. (I made another plugin just to show my options). How can I delete options when … Read more

How to uninstall Python 2.7 on a Mac OS X 10.6.4?

I want to completely remove Python 2.7 from my Mac OS X 10.6.4. I managed to remove the entry from the PATH variable by reverting my .bash_profile. But I also want to remove all directories, files, symlinks, and entries that got installed by the Python 2.7 install package. I’ve got the install package from http://www.python.org/. … Read more

wpdb::prepare was called incorrectly

I have this code to remove orphaned posts after deleting custom post type. It works, but this code… global $wpdb; $wpdb->query( $wpdb->prepare( “DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id) LEFT JOIN wp_postmeta c ON (a.ID=c.post_id) WHERE a.post_type=”attorneys”” ) ); …is throwing this error: PHP Notice: wpdb::prepare was called incorrectly. The query … Read more

What’s the opposite of ‘make install’, i.e. how do you uninstall a library in Linux?

While running ./configure –prefix=/mingw on a MinGW/MSYS system for a library I had previously run ‘./configure –prefix=/mingw && make && make install’ I came across this message: WARNING: A version of the Vamp plugin SDK is already installed. Expect worries and sorrows if you install a new version without removing the old one first. (Continuing) … Read more

Does plugin uninstall always put WordPress back into original state?

What is a plugin lifetime within a deployed instance of WordPress? Namely: do plugins modify existing files or do they only use defined extension points within WordPress? are plugins allowed to modify database schema (e.g. add new columns)? how does WordPress make sure that plugin uninstall always leaves WP in original state? (Does it?) 3 … Read more

How to delete custom taxonomy terms in plugin’s uninstall.php?

I am writing my plugin’s uninstall.php file and would like it to delete any terms that were created in the plugin’s custom taxonomy. In the plugin’s uninstall.php file I am using this: // Delete all custom terms for this taxonomy $terms = get_terms(‘custom_taxonomy’); foreach ($terms as $term) { wp_delete_term( $term->ID, ‘custom_taxonomy’ ); } The problem … Read more