'apb', 'posts_per_page' => -1, 'fields' => 'ids', 'post_status' => array_keys( get_post_stati() ), ] ); if ( ! empty( $apb_post_ids ) ) { foreach ( $apb_post_ids as $post_id ) { wp_delete_post( $post_id, true ); // Force delete (bypass trash). } } // 2. Delete post view tracking meta from every post - the helper clears the meta cache too. delete_post_meta_by_key( 'apb_post_views_count' ); // 3. Delete plugin options. delete_option( 'apb_options' ); delete_option( 'apbFavoritesTemplates' ); // Template Library favorites.