get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s", 'deadbolt_tpl' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- one-time cleanup on uninstall; the post type is not registered here. foreach ( $deadbolt_template_ids as $deadbolt_template_id ) { wp_delete_post( (int) $deadbolt_template_id, true ); } delete_post_meta_by_key( '_deadbolt_access' ); delete_post_meta_by_key( '_deadbolt_menu_access' );