Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
advanced-nocaptcha-recaptcha
:
uninstall.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Uninstall * * Deletes all the plugin data */ // Exit if accessed directly. if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit; } function anr_uninstall_plugin() { global $wpdb; $post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_type = 'anr-post' LIMIT 1" ); if ( $post_id ) { // There may have too many post meta. delete them first in one query. $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d", $post_id ) ); wp_delete_post( $post_id, true ); } } anr_uninstall_plugin();