かなりニッチな話だが、表題のとおり WordPress のマルチサイトでテーマディレクトリの名称を数字にすると、WP REST API の themes のレスポンスが空になる不具合に直面した。
ちなみにマルチサイトではない場合は問題はなかった。
数字というのは、プログラムで数値として認識されるもので「01」は文字列だが「10」は数値として認識されるため、このような数字は予約語には入っていないがテーマディレクトリ名では使用しないほうが賢明である。
予約語について
ちゃんと調べたことがなかったので、調べてみた。
以下、公式にあった予約語の記事(現在は削除されている)。
以下の予約語を避けることが非常に重要です。特にタームを $_GET や $_POST 配列を使って引き渡す場合は注意してください。もし重複すると、WordPress は何のヒントも説明も無しに 404 エラーを返します。
https://web.archive.org/web/20230220040101/http://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/register_taxonomy
- attachment
 - attachment_id
 - author
 - author_name
 - calendar
 - cat
 - category
 - category__and
 - category__in
 - category__not_in
 - category_name
 - comments_per_page
 - comments_popup
 - customize_messenger_channel
 - customized
 - cpage
 - day
 - debug
 - error
 - exact
 - feed
 - fields
 - hour
 - link_category
 - m
 - minute
 - monthnum
 - more
 - name
 - nav_menu
 - nonce
 - nopaging
 - offset
 - order
 - orderby
 - p
 - page
 - page_id
 - paged
 - pagename
 - pb
 - perm
 - post
 - post__in
 - post__not_in
 - post_format
 - post_mime_type
 - post_status
 - post_tag
 - post_type
 - posts
 - posts_per_archive_page
 - posts_per_page
 - preview
 - robots
 - s
 - search
 - second
 - sentence
 - showposts
 - static
 - subpost
 - subpost_id
 - tag
 - tag__and
 - tag__in
 - tag__not_in
 - tag_id
 - tag_slug__and
 - tag_slug__in
 - taxonomy
 - tb
 - term
 - theme
 - type
 - w
 - withcomments
 - withoutcomments
 - year
 
ただ現在は古くなっている可能性があるため、以下を参照したほうがいいかもしれない。
厳密にはスラッグとタームのそれぞれに予約語があるようだ。