You appear to be a bot. Output may be restricted
Description
Register the "opted_in" custom post typeAn opted-in page is much like a normal page, though you can't access it directly
You have to have typed in your name and email address in order to get transferred to it, from an opt-in page. If it's a double opt-in page then you need to be confirmed as well.
http://example.com/opted_in/?oiksp_email=email.address@domain.tld&oiksp_name=your name&oiksp_confirm=&oiksp_id=target
- The link on the signup form contains the post_id of the page to be displayed ( target – does it need to be obfuscated? )
- The excerpt contains the text above the email form – though this can be overridden
- The page will not be displayed UNLESS the email and name fields are complete
- where should it go… back to home or NOT found or redisplay the popup?
Usage
oiksp_register_optedinpage();
Parameters
Returns
voidSource
File name: oik-squeeze/oik-squeeze.phpLines:
1 to 21 of 21
function oiksp_register_optedinpage() { $post_type = 'opted_in'; $post_type_args = array(); $post_type_args['label'] = 'Opted in pages'; $post_type_args['description'] = 'Page content hidden behind squeeze page forms '; /* This post type uses the "excerpt" custom field for the text for the squeeze page form */ $post_type_args['supports'] = array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments', 'revisions', 'author' ); $post_type_args['show_in_rest'] = true; bw_register_post_type( $post_type, $post_type_args ); bw_register_field( "_oiksp_double", "checkbox", "Double opt-in?" ); bw_register_field( "_oiksp_subject", "text", "Email subject", array( "#length" => 80 ) ); bw_register_field( "_oiksp_message", "textarea", oiksp_email_body_label() ); bw_register_field( "_oiksp_userview", "checkbox", "Viewable by logged in users" ); bw_register_field_for_object_type( "_oiksp_double", $post_type ); bw_register_field_for_object_type( "_oiksp_subject", $post_type ); bw_register_field_for_object_type( "_oiksp_message", $post_type ); bw_register_field_for_object_type( "_oiksp_userview", $post_type ); }