Java 8: Class.getName() slows down String concatenation chain

recently I’ve run into an issue regarding String concatenation. This benchmark summarizes it: @OutputTimeUnit(TimeUnit.NANOSECONDS) public class BrokenConcatenationBenchmark { @Benchmark public String slow(Data data) { final Class<? extends Data> clazz = data.clazz; return “class ” + clazz.getName(); } @Benchmark public String fast(Data data) { final Class<? extends Data> clazz = data.clazz; final String clazzName = clazz.getName();…

Incorrect post_type in url of taxonomy term

I have registered a custom post type oa_location with custom menu (using show_in_menu) and a taxonomy called oa_country. These two connected but because our CPT placed in a custom menu, there is a problem in url of taxonomy term: http://localhost/demo/wp-admin/term.php?taxonomy=oa_country&tag_ID=46&post_type=post&wp_http_referer=demo/wp-admin/edit-tags.php?taxonomy=oa_country my code to register this CPT: $arg = array( ‘label’ => __(‘Post Type’, ‘text_domain’), ‘description’…