Description
Display the squeeze page or notThis function implements the "the_content" filter for opted_in pages It will either display the content OR the excerpt and the appropriate version of the squeeze form.
Usage
oiksp_lazy_squeeze( $content );Parameters
- $content
- ( mixed ) required –
Returns
voidSource
File name: oik-squeeze/shortcodes/oik-squeeze.phpLines:
1 to 39 of 39
function oiksp_lazy_squeeze( $content ) { bw_backtrace(); $atts = array(); oik_require( "includes/bw_posts.php" ); $atts['oiksp_id'] = bw_global_post_id(); $result = oiksp_check_authority( $atts ); if ( !$result ) { $atts['oiksp_from'] = bw_array_get( $_REQUEST, "oiksp_from", null ); $atts['submit'] = true; $atts['text'] = "Register"; $atts['double'] = oiksp_get_double( $atts['oiksp_id']); $atts['confirm_key_required'] = $atts['double']; $result = oiksp_process_squeeze_form( $atts ); } else { $atts['confirm_key_required'] = false; } bw_trace2( $result, "result" ); bw_trace2( $atts ); if ( $result && !$atts['confirm_key_required'] ) { // This is OK //e( "This is OK" ); e( $content ); } else { $email = bw_array_get( $_REQUEST, "oiksp_email", null ); if ( !$email ) { $buffered = bw_ret(); //bw_trace2( $buffered, "buffered"); e( $buffered ); $atts['confirm_key_required'] = false; } else { } oiksp_display_squeeze_form( $atts ); } return( bw_ret()); }View on GitHub
Called by
1 to 1 of 1
Invoked by
Calls
1 to 9 of 9
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_backtrace() – Log a debug_backtrace() to the trace log file if tracing is active
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- bw_trace2() – Trace $value to the trace log file if tracing is active
- oiksp_check_authority() – Check overriding authority to view this opted-in page
- oiksp_display_opted_in_excerpt() – Display the excerpt from the opted_in page
- oiksp_display_squeeze_form() – Display the signup form for the squeeze page This version doesn’t let other plugins play **?**
- oiksp_get_double() – Retrieve the double opt-in requirement of the opted-in page
- oiksp_process_squeeze_form() – Process the signup form for the squeeze page
