このコードでhttpエラー出る 新しいワードプレス もしくは xserver phpのばーじょんか
//カスタムポストで タクソノミーで絞込
add_action('restrict_manage_posts', function() {
global $post_type;
if ( !in_array($post_type, ['jirei']) ) return;
$taxonomy = 'make_cate';
$terms = get_terms($taxonomy);
if ( empty($terms) ) return;
$selected = get_query_var($taxonomy);
$options = '';
foreach ($terms as $term) {
$options .= sprintf('<option value="%s" %s>%s</option>'
,$term->slug
,($selected==$term->slug) ? 'selected="selected"' : ''
,$term->name
);
}
$select = '<select name="%s"><option value="">指定なし</option>%s</select>';
printf($select, $taxonomy, $options);
});