You appear to be a bot. Output may be restricted
Description
Display the squeeze page or not
This 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
void
Source
File name: oik-squeeze/shortcodes/oik-squeeze.php
Lines:
1 to 35 of 35
function oiksp_lazy_squeeze( $content ) { bw_backtrace(); $atts = array(); oik_require( "includes/bw_posts.inc" ); $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(); oiksp_display_opted_in_excerpt( $atts ); e( $buffered ); } oiksp_display_squeeze_form( $atts ); } return( bw_ret()); }