我使用重写规则定义了自定义帖子类型:
register_post_type(\'balls\', [
\'labels\' => [
\'name\' => \'balls\',
\'singular_name\' => \'balls\',
\'add_new\' => \'new\',
\'add_new_item\' => \'new\',
\'parent_item_colon\' => \'\'
],
\'taxonomies\' => [\'category\'],
\'menu_position\' => 4,
\'public\' => true,
\'query_var\' => true,
\'capability_type\' => \'post\',
\'supports\' => [\'title\', \'editor\', \'thumbnail\'],
\'rewrite\' => [
\'slug\' => \'ballinfo\'
]
]);
现在,我如何知道是否使用/ballinfo
还是没有?如何知道是否匹配并使用了重写规则?