This ensures the `$term_ids` variable only contains term IDs and is not filled with full term objects due to deprecated term caching.
Introduced in [55252].
Props skithund, Chouby, joemcgill, flixos90, ocean90.
Fixes#57150.
Built from https://develop.svn.wordpress.org/trunk@55401
git-svn-id: http://core.svn.wordpress.org/trunk@54934 1a063a9b-81f0-0310-95a4-ce76da25c4cd