Optimize site query when performing network database upgrades

We only use `blog_id` from the query, so we don't need a wildcard.

props marcosf
Fixes #30097

Built from https://develop.svn.wordpress.org/trunk@30029


git-svn-id: http://core.svn.wordpress.org/trunk@30029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `wp_link_pages()`, only output link separators between actual pagination links. Fixes #24940. Props obenland.
Built from https://develop.svn.wordpress.org/trunk@30030


git-svn-id: http://core.svn.wordpress.org/trunk@30030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve `WP_Tax_Query` param sanitization for empty strings.

When an empty string is passed as one of the clauses in the `$tax_query`
parameter, it should be discarded rather than parsed as a first-order clause.

Props tmtrademark.
Fixes #30117.
Built from https://develop.svn.wordpress.org/trunk@30031


git-svn-id: http://core.svn.wordpress.org/trunk@30031 1a063a9b-81f0-0310-95a4-ce76da25c4cd