function ncf_check_display_rule($opt, $isMobile, $post_id) { $show = ncf_check_location($opt, $post_id); //browser()->log ( '>>>> inclusion' ); //browser()->log ( $show ); if ($show && $opt->rule->exclude || !$show && $opt->rule->include) { $show = false; } else { $show = true; } $user_ID = is_user_logged_in(); //browser()->log ( '>>>> loggedin' ); //browser()->log ( $user_ID ); //browser()->log ( '>>>> checked' ); //browser()->log ( $show ); if ($opt->user->loggedout && $user_ID || $opt->user->loggedin && !$user_ID) { $show = false; } if ($opt->mobile->no && $isMobile) { $show = false; } return $show; }
<div class="ncf_sidebar_cont_scrollable"> <div class="ncf_sidebar_cont ncf_shrinked"> <?php $post_id = get_queried_object_id(); // if (function_exists('nks_cc_get_options')) { // //browser()->log(nks_cc_get_options()); // } else { // // } for ($i = 1; $i <= $options['ncf_forms']; $i++) { //browser()->log('indi'); //browser()->log($nks_init); if ($options['ncf_form_status_' . $i] !== 'deleted') { $fields = json_decode($options['ncf_additional_fields_' . $i], true); $isDefault = ncf_check_location(json_decode($options['ncf_is_default_' . $i]), $post_id); if (!empty($options['ncf_userpic_' . $i])) { $img = is_ssl() ? str_replace('http:', 'https:', $options['ncf_userpic_' . $i]) : str_replace('https:', 'http:', $options['ncf_userpic_' . $i]); } ?> <div class="ncf_form_wrapper ncf_form_<?php echo $i; if ($isDefault) { echo " ncf_default_form"; } ?> " data-index="<?php echo $i; ?> "> <?php