'admirly_review', 'post_status' => array_keys( get_post_stati() ), // 'any' would skip trashed (rejected) reviews 'numberposts' => -1, 'fields' => 'ids', ] ); foreach ( $ids as $id ) { /** Extensions remove the data they attached to the review. @param int $id */ do_action( 'admirly_uninstall_review', (int) $id ); wp_delete_post( $id, true ); } delete_option( 'admirly_settings' ); delete_option( 'admirly_version' ); delete_option( 'admirly_wizard_done' ); delete_transient( 'admirly_do_activation_redirect' ); } }