get_name(); $args = $this->post_type(); // register custom post type add_action('init', function() use ($name, $args) { register_post_type($name, $args); }); } }