I want to, in a sense use a CPT without registering it. The CPT is used for internal settings by a custom plugin.
For example: I writing a custom form plugin where the website administrator can create separate registration forms for content specific roles (not WordPress roles, a custom system where user's can have multiple roles and content is only visible by roles) and then the form will be saved into the database.
However, instead of having an form "option" using "get_option()" containing all forms created, I would like to use a CPT and save each form individually.
The forms are parsed via custom function and do not need to be searchable, queryable, or accessed by anyone other than the plugin.
So, is it safe to use...
$args = [
'post_title'=>'Form Title',
'post_content'=>'Form configuration settings',
'post_type'=>'custom-form-cpt',
'post_name'=>'form-name'
];
wp_insert_post( $args );
without actually registering the custom post type? And, then to retrieve the form(s) I will just use "get_post()" or "get_posts()" within the plugin to either show all forms created and/or render the form to screen.