* added direct access guard
* removed trailing `?>`
* in `get_post_types` function, changed argument `'public' => true` to `'show_ui' => true`