function widget( $args, $instance ) { global $_chosen_attributes, $woocommerce, $_attributes_array; extract( $args ); $attributes_array = ! empty( $_attributes_array ) ? $_attributes_array : array(); if ( ! is_post_type_archive( 'product' ) && ! is_tax( array_merge( $attributes_array, apply_filters( 'yith_wcan_product_taxonomy_type', array( 'product_cat', 'product_tag' ) ) ) ) ) { return; } // Price $min_price = isset( $_GET['min_price'] ) ? esc_attr( $_GET['min_price'] ) : 0; $max_price = isset( $_GET['max_price'] ) ? esc_attr( $_GET['max_price'] ) : 0; ob_start(); if ( count( $_chosen_attributes ) > 0 || $min_price > 0 || $max_price > 0 || apply_filters( 'yith_woocommerce_reset_filters_attributes', false ) ) { $title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) : ''; $label = isset( $instance['label'] ) ? apply_filters( 'yith-wcan-reset-navigation-label', $instance['label'], $instance, $this->id_base ) : ''; //clean the url $link = yit_curPageURL(); foreach ( (array) $_chosen_attributes as $taxonomy => $data ) { $taxonomy_filter = str_replace( 'pa_', '', $taxonomy ); $link = remove_query_arg( 'filter_' . $taxonomy_filter, $link ); } $link = remove_query_arg( array( 'min_price', 'max_price', 'product_tag' ), $link ); $link = apply_filters( 'yith_woocommerce_reset_filter_link', $link ); echo $before_widget; if ( $title ) { echo $before_title . $title . $after_title; } $button_class = apply_filters( 'yith-wcan-reset-navigation-button-class', "yith-wcan-reset-navigation button" ); echo "<div class='yith-wcan'><a class='{$button_class}' href='{$link}'>" . __( $label, 'yith_wc_ajxnav' ) . "</a></div>"; echo $after_widget; echo ob_get_clean(); } else { ob_end_clean(); echo substr( $before_widget, 0, strlen( $before_widget ) - 1 ) . ' style="display:none">' . $after_widget; } }
/** * Generate the module * * @since 1.0.0 */ public function module($name_or_id, $echo = true) { global $is_footer; $this->current_form = is_int($name_or_id) ? $name_or_id : yit_post_id_from_slug($name_or_id, 'contactform'); $form_name = yit_post_slug_from_id($this->current_form); $fields = $this->get('fields'); if (!is_array($fields) or empty($fields)) { return null; } $max_width = ''; foreach ($fields as $id => $field) { preg_match('/[\\d]+/', $field['width'], $matches); if ($max_width < (int) $matches[0]) { $max_width = $matches[0]; } } $html = '<form id="contact-form-' . $form_name . '" class="contact-form' . (!$is_footer ? ' row' : '') . '" method="post" action="" enctype="multipart/form-data">' . "\n\n"; // div message feedback $html .= "\t<div class=\"usermessagea\">" . $this->_generalMessage($this->current_form, false) . "</div>\n"; $html .= "\t<fieldset>\n\n"; $html .= "\t\t<ul>\n\n"; // array with all messages for js validate $js_messages = array(); foreach ($fields as $id => $field) { // classes $input_class = array(); // array for print input's classes $li_class = array($field['type'] . '-field'); // array for print li's classes // errors $error_msg = ''; $error = false; $js_messages[$field['data_name']] = $field['error']; if (isset($field['data_name'])) { $error_msg = $this->_getMessage($field['data_name']); if (!empty($error_msg)) { $error = TRUE; } } // li class if ($field['class'] != '') { $li_class[] = " {$field['class']}"; } if (isset($field['icon']) && $field['icon'] != '') { array_push($li_class, 'with-icon'); } if ($error) { array_push($input_class, 'icon', 'error'); } if (isset($field['icon']) && $field['icon'] != '') { array_push($input_class, 'with-icon'); } $html .= "\t\t\t<li class=\"" . implode($li_class, ' ') . ' ' . $field['width'] . "\">\n"; //Label if ($field['type'] != 'select') { if ($field['type'] != 'radio') { $html .= "\t\t\t\t<label for=\"{$field['data_name']}-{$form_name}\">\n"; } else { $html .= "\t\t\t\t<label>\n"; } $html .= yit_string("\t\t\t\t\t" . '<span class="mainlabel">', stripslashes_deep($field['title'], 'highlight-text'), '</span>' . "\n", false); $html .= yit_string("\t\t\t\t\t" . '<span class="sublabel">', stripslashes_deep($field['description']), '</span>' . "\n", false); $html .= "\t\t\t\t</label>\n"; } else { if (isset($field['description']) || $field['description'] != '') { $html .= "\t\t\t\t<label>\n"; $html .= yit_string("\t\t\t\t\t" . '<span class="sublabel">', stripslashes_deep($field['description']), '</span>' . "\n", false); $html .= "\t\t\t\t</label>\n"; } $field['options'] = array('the-form-label' => $field['title']) + $field['options']; } // if required if (isset($field['required']) and intval($field['required'])) { $input_class[] = 'required'; } if (isset($field['is_email']) and intval($field['is_email'])) { $input_class[] = 'email-validate'; } // retrive value if (isset($field['data_name']) && $error) { $value = $this->_postValue($field['data_name']); } else { if (isset($_GET[$field['data_name']])) { $value = $_GET[$field['data_name']]; } else { $value = ''; } } // only for clean code $html .= "\t\t\t\t"; // Icon $html .= "<div class=\"input-prepend\">"; if (isset($field['icon']) && $field['icon'] != '') { if (filter_var($field['icon'], FILTER_VALIDATE_URL)) { $html .= "<span class=\"add-on\"><img src=\"" . $field['icon'] . "\" alt=\"\" title=\"\" /></span>"; } else { $html .= "<span class=\"add-on\"><i class=\"icon-" . $field['icon'] . "\"></i></span>"; } } // print type of input switch ($field['type']) { // text case 'text': $html .= "<input type=\"text\" name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-{$form_name}\" class=\"" . implode($input_class, ' ') . "\" value=\"{$value}\" />"; break; // hidden // hidden case 'hidden': $html .= "<input type=\"hidden\" name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-{$form_name}\" class=\"" . implode($input_class, ' ') . "\" value=\"{$value}\" />"; break; // checkbox // checkbox case 'checkbox': $checked = ''; if ($value != '' and $value) { $checked = ' checked="checked"'; } else { if (isset($field['already_checked']) && intval($field['already_checked'])) { $checked = ' checked="checked"'; } } $html .= "<input type=\"checkbox\" name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-{$form_name}\" value=\"1\" class=\"" . implode($input_class, ' ') . "\"{$checked} />"; if (isset($field['label_checkbox'])) { $html .= ' ' . $field['label_checkbox']; } break; // select // select case 'select': $html .= "<select name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-{$form_name}\" class=\"" . implode($input_class, ' ') . "\">\n"; // options foreach ($field['options'] as $id => $option) { $selected = ''; if (isset($field['option_selected']) && $field['option_selected'] == $id) { $selected = ' selected="selected"'; } if ($id === 'the-form-label') { $html .= "\t\t\t\t\t\t<option value=\"\"{$selected}>{$option}</option>\n"; } else { $html .= "\t\t\t\t\t\t<option value=\"{$option}\"{$selected}>{$option}</option>\n"; } } $html .= "\t\t\t\t\t</select>"; break; // textarea // textarea case 'textarea': $html .= "<textarea name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-{$form_name}\" rows=\"8\" cols=\"30\" class=\"" . implode($input_class, ' ') . "\">{$value}</textarea>"; break; // radio // radio case 'radio': // options foreach ($field['options'] as $i => $option) { $selected = ''; if (isset($field['option_selected']) && $field['option_selected'] == $i) { $selected = ' checked=""'; } $html .= "\t\t\t\t\t\t<input type=\"radio\" name=\"yit_contact[{$field['data_name']}]\" id=\"{$field['data_name']}-{$form_name}-{$i}\" value=\"{$option}\"{$selected} /><label for=\"{$field['data_name']}-{$form_name}-{$i}\">{$option}</label>\n"; } $html .= "\t\t\t\t<div class=\"clear\"></div>\n"; break; // password // password case 'password': $html .= "<input type=\"password\" name=\"yit_contact[{$field['data_name']}]\" id=\"{$field['data_name']}-{$form_name}\" class=\"" . implode($input_class, ' ') . "\" value=\"{$value}\" />"; break; // file // file case 'file': $html .= "<input type=\"file\" name=\"yit_contact[{$field['data_name']}]\" id=\"{$field['data_name']}-{$form_name}\" class=\"" . implode($input_class, ' ') . "\" />"; break; } // Icon $html .= "</div>"; // only for clean code $html .= "\n"; $html .= "\t\t\t\t<div class=\"msg-error\">" . $error_msg . "</div><div class=\"clear\"></div>\n"; $html .= "\t\t\t</li>\n"; } $html .= "\t\t\t<li class=\"submit-button span" . $max_width . "\">\n"; $html .= "\t\t\t\t<div style=\"position:absolute;left:-9999px;\"><input type=\"text\" name=\"email_check_2\" id=\"email_check_2\" value=\"\" /></div>\n"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"yit_action\" value=\"sendemail\" id=\"yit_action\" />\n"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"yit_referer\" value=\"" . yit_curPageURL() . "\" />\n"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"id_form\" value=\"{$this->current_form}\" />\n"; $html .= "\t\t\t\t<input type=\"submit\" name=\"yit_sendemail\" value=\"" . $this->get('submit_label') . "\" class=\"sendmail " . $this->get('submit_alignment') . "\" />"; $html .= "\t\t\t\t<div class=\"clear\"></div>"; $html .= "\t\t\t</li>\n"; $html .= "\t\t</ul>\n\n"; $html .= "\t</fieldset>\n"; $html .= "</form>\n\n"; // messages for javascript validation $html .= "<script type=\"text/javascript\">\n"; $html .= "\tvar messages_form_" . $this->current_form . " = {\n"; foreach ($js_messages as $id => $msg) { $html .= "\t\t{$id}: \"{$msg}\",\n"; } // remove last comma $html = str_replace("\t\t{$id}: \"{$msg}\",\n", "\t\t{$id}: \"{$msg}\"\n", $html); $html .= "\t};\n"; $html .= "</script>"; if ($echo) { echo $html; } return $html; }
/** * Generate the module * * @since 1.0.0 */ public function module( $name_or_id, $action, $echo = true ) { global $is_footer; $this->current_form = is_int( $name_or_id ) ? $name_or_id : yit_post_id_from_slug( $name_or_id, 'contactform' ); $form_name = yit_post_slug_from_id( $this->current_form ); $general_message = $this->_generalMessage( $this->current_form, false ); $fields = $this->get('fields'); if( !is_array( $fields ) OR empty( $fields ) ) return null; $max_width = ''; foreach( $fields as $id => $field ) { preg_match( '/[\d]+/', $field['width'], $matches ); if( $max_width < ( int ) $matches[0] ) { $max_width = $matches[0]; } } $html = '<form id="contact-form-' . $form_name . '" class="contact-form' . ( !$is_footer ? ' row-fluid' : '' ) .'" method="post" action="'.$action.'" enctype="multipart/form-data">' . "\n\n"; // div message feedback $html .= "\t<div class=\"usermessagea\">" . $general_message . "</div>\n"; $html .= "\t<fieldset>\n\n"; $html .= "\t\t<ul>\n\n"; // array with all messages for js validate $js_messages = array(); $current_total_width = 0; $i = 0; foreach( $fields as $id => $field ) { // classes $input_class = array(); // array for print input's classes $li_class = array( $field['type'] . '-field' ); // array for print li's classes // errors $error_msg = ''; $error = false; $js_messages[ $field['data_name'] ] = $field['error']; if ( isset( $field['data_name'] ) ) { $error_msg = $this->_getMessage( $field['data_name'] ); if ( ! empty( $error_msg ) ) $error = TRUE; } // li class if( $field['class'] != '' ) $li_class[] = " $field[class]"; if ( isset( $field['icon'] ) && $field['icon'] != '' ) array_push( $li_class, 'with-icon'); /** Clear left margin for first element */ /* $current_total_width = $current_total_width + str_replace('span','',$field['width']); if ( $current_total_width > 12 ) { $current_total_width = str_replace('span','',$field['width']); array_push( $li_class, 'first-of-line'); } */ if( $error ) array_push( $input_class, 'icon', 'error' ); if ( isset( $field['icon'] ) && $field['icon'] != '' ) { array_push( $input_class, 'with-icon'); } $html .= "\t\t\t<li class=\"" . implode( $li_class, ' ' ) . ' ' . $field['width'] . "\">\n"; //Label /* if( $field['type'] != 'select' ) { if( $field['type'] != 'radio' ) $html .= "\t\t\t\t<label for=\"$field[data_name]-$form_name\">\n"; else $html .= "\t\t\t\t<label>\n"; $html .= yit_string( "\t\t\t\t\t" . '<span class="mainlabel">', stripslashes_deep( $field['title'], 'highlight-text' ), '</span>' . "\n", false ); if( isset( $field['required'] ) ) $html .= "\t\t\t\t\t" . '<span class="required">' . __('(required)','yit') . '</span>' . "\n"; $html .= yit_string( "\t\t\t\t\t" . '<span class="sublabel">', stripslashes_deep( $field['description'] ), '</span>' . "\n", false ); $html .= "\t\t\t\t</label>\n"; } else { if(isset($field['description']) || $field['description'] != '') { $html .= "\t\t\t\t<label>\n"; if( isset( $field['required'] ) ) $html .= "\t\t\t\t\t" . '<span class="required">' . __('(required)','yit') . '</span>' . "\n"; $html .= yit_string( "\t\t\t\t\t" . '<span class="sublabel">', stripslashes_deep( $field['description'] ), '</span>' . "\n", false ); $html .= "\t\t\t\t</label>\n"; } $field['options'] = array( 'the-form-label' => $field['title'] ) + $field['options']; } */ // if required if( isset( $field['required'] ) AND intval( $field['required'] ) ) $input_class[] = 'required'; if( isset( $field['is_email'] ) AND intval( $field['is_email'] ) ) $input_class[] = 'email-validate'; // retrive value if( isset( $field['data_name'] ) && ( empty( $general_message ) || $error ) ) $value = $this->_postValue( $field['data_name'] ); else if ( isset( $_GET[ $field['data_name'] ] ) ) $value = $_GET[ $field['data_name'] ]; else $value = ''; // only for clean code $html .= "\t\t\t\t"; // Icon $html .= "<div class=\"input-prepend\">"; if ( isset( $field['icon'] ) && $field['icon'] != '' ) { if( filter_var( $field['icon'], FILTER_VALIDATE_URL ) ) { $html .= "<span class=\"add-on\"><img src=\"". $field['icon'] . "\" alt=\"\" title=\"\" /></span>"; } else { $html .= "<span class=\"add-on\"><i class=\"icon-" . $field['icon'] . "\"></i></span>"; } } // print type of input switch( $field['type'] ) { // text case 'text': $html .= "<input type=\"text\" name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-$form_name\" class=\"" . implode( $input_class, ' ' ) . "\" value=\"$value\" placeholder=\"" . stripslashes_deep( $field['title'], 'highlight-text' ) . "\" />"; break; // hidden case 'hidden': $html .= "<input type=\"hidden\" name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-$form_name\" class=\"" . implode( $input_class, ' ' ) . "\" value=\"$value\" />"; break; // checkbox case 'checkbox': $checked = ''; if( $value != '' AND $value ) $checked = ' checked="checked"'; else if( isset($field['already_checked']) && intval( $field['already_checked'] ) ) $checked = ' checked="checked"'; $html .= "<input type=\"checkbox\" name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-$form_name\" value=\"1\" class=\"" . implode( $input_class, ' ' ) . "\"{$checked} />"; if ( isset( $field['title'] ) ) $html .= ' ' . $field['title']; break; // select case 'select': $html .= "<select name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-$form_name\" class=\"" . implode( $input_class, ' ' ) . "\">\n"; // options foreach( $field['options'] as $id => $option ) { $selected = ''; if( isset($field['option_selected']) && $field['option_selected'] == $id ) $selected = ' selected="selected"'; if( $id === 'the-form-label' ) { $html .= "\t\t\t\t\t\t<option value=\"\"$selected>$option</option>\n"; } else { $html .= "\t\t\t\t\t\t<option value=\"$option\"$selected>$option</option>\n"; } } $html .= "\t\t\t\t\t</select>"; break; // textarea case 'textarea': $html .= "<textarea name=\"yit_contact[" . $field['data_name'] . "]\" id=\"" . $field['data_name'] . "-$form_name\" rows=\"8\" cols=\"30\" class=\"" . implode( $input_class, ' ' ) . "\" placeholder=\"" . stripslashes_deep( $field['title'], 'highlight-text' ) . "\">$value</textarea>"; break; // radio case 'radio': // options foreach( $field['options'] as $i => $option ) { $selected = ''; if( isset($field['option_selected']) && $field['option_selected'] == $i ) $selected = ' checked=""'; $html .= "\t\t\t\t\t\t<input type=\"radio\" name=\"yit_contact[{$field['data_name']}]\" id=\"{$field['data_name']}-$form_name-$i\" value=\"$option\"$selected /><label for=\"{$field['data_name']}-$form_name-$i\">$option</label>\n"; } $html .= "\t\t\t\t<div class=\"clear\"></div>\n"; break; // password case 'password': $html .= "<input type=\"password\" name=\"yit_contact[{$field['data_name']}]\" id=\"{$field['data_name']}-$form_name\" class=\"" . implode( $input_class, ' ' ) . "\" value=\"$value\" />"; break; // file case 'file': $html .= "<input type=\"file\" name=\"yit_contact[{$field['data_name']}]\" id=\"{$field['data_name']}-$form_name\" class=\"" . implode( $input_class, ' ' ) . "\" />"; break; } // Icon $html .= "</div>"; // only for clean code $html .= "\n"; $html .= "\t\t\t\t<div class=\"msg-error\">" . $error_msg . "</div><div class=\"clear\"></div>\n"; $html .= "\t\t\t</li>\n"; } if ( $this->get('enable_captcha' ) == '1') { $html .= "<script type=\"text/javascript\">var RecaptchaOptions = { theme : 'clean' };</script>"; $html .= "<li class=\"first-of-line span-12\">"; $html .= $this->recaptcha( false ); $html .= "</li><div class=\"clear\"></div>"; } $html .= "\t\t\t<li class=\"submit-button span" . $max_width . "\">\n"; $html .= "\t\t\t\t<input type=\"text\" name=\"yit_bot\" id=\"yit_bot\" />\n"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"yit_action\" value=\"sendemail\" id=\"yit_action\" />\n"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"yit_referer\" value=\"" . yit_curPageURL() . "\" />\n"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"id_form\" value=\"$this->current_form\" />\n"; if ( is_shop_installed() && is_product() ) { $html .= "\t\t\t\t<input type=\"hidden\" name=\"yit_contact[sku]\" value=\"". $GLOBALS['product']->sku . "\" />"; $html .= "\t\t\t\t<input type=\"hidden\" name=\"yit_contact[product_id]\" value=\"". $GLOBALS['product']->id . "\" />"; } $html .= "\t\t\t\t<input type=\"submit\" name=\"yit_sendemail\" value=\"" . $this->get('submit_label') . "\" class=\"sendmail " . $this->get('submit_alignment') . "\" />"; $html .= "\t\t\t\t" . wp_nonce_field( 'yit-sendmail', "_wpnonce", true, false ); $html .= "\t\t\t\t<div class=\"clear\"></div>"; $html .= "\t\t\t</li>\n"; $html .= "\t\t</ul>\n\n"; $html .= "\t</fieldset>\n"; //$html .= "<div class=\"general-msg-error\">" . __('* Please fix the errors and send again the message', 'yit') . "</div>"; $html .= "<div class=\"contact-form-error-messages\">"; foreach( $js_messages as $id => $msg ) if(isset($msg) && $msg != '') $html .= "<div class=\"contact-form-error-$id contact-form-error\">* $msg</div>\n"; $html .= "</div>\n"; $html .= "</form>\n\n"; $html .= "<div class=\"clear\"></div>"; /* // messages for javascript validation $html .= "<script type=\"text/javascript\">\n"; $html .= "\tvar messages_form_" . $this->current_form . " = {\n"; foreach( $js_messages as $id => $msg ) if(isset($msg) && $msg != '') $html .= "\t\t$id: \"$msg\",\n"; // remove last comma $html = str_replace( "\t\t$id: \"$msg\",\n", "\t\t$id: \"$msg\"\n", $html ); $html .= "\t};\n"; $html .= "</script>"; */ $html .= "<script type=\"text/javascript\" src=\"" . get_template_directory_uri() . "/theme/assets/js/contact.js\"></script>"; if( $echo ) echo $html; return $html; }
} ?> <li class="submit-button col-sm-<?php echo $max_width; ?> no-padding-right"> <div style="position:absolute; z-index:-1; <?php echo is_rtl() ? "margin-right:-9999999px;" : "margin-left:-9999999px;"; ?> "> <input type="text" name="yit_bot" id="yit_bot"/></div> <input type="hidden" name="yit_action" value="sendemail" id="yit_action"/> <input type="hidden" name="yit_referer" value="<?php echo esc_attr(yit_curPageURL()); ?> "/> <?php if ($do_ajax == 1) { ?> <input type="hidden" name="yit_ajax" class="yit_ajax" value="<?php echo esc_attr($do_ajax); ?> " data-action="yit_contact_form_submit"/> <?php } ?> <?php if (function_exists('WC') && is_shop_installed() && is_product()) {
" class="group"> <input type="text" name="log" id="header_username" placeholder="<?php _e('Username', 'yit'); ?> " /> <input type="password" name="pwd" id="header_password" placeholder="<?php _e('Password', 'yit'); ?> " /> <input type="submit" class="button" value="<?php _e('Login', 'yit'); ?> " name="wp-submit" /> <input type="hidden" value="<?php echo yit_curPageURL(); ?> " name="redirect_to" /> <input type="hidden" value="1" name="testcookie" /> <a class="lost_password" href="<?php echo wp_login_url(); ?> ?action=lostpassword" title="<?php _e('Password Lost and Found', 'yit'); ?> "> <?php _e('Lost password?', 'yit'); ?> </a>
<input type="text" tabindex="10" size="20" value="" name="log" class="input-text" /> </label> </p> <p> <label> <?php _e( 'Password', 'yit' ) ?><br/> <input type="password" tabindex="20" size="20" value="" name="pwd" class="input-text" /> </label> </p> <a class="align-left lostpassword" href="<?php echo wp_login_url(); ?>?action=lostpassword" title="<?php _e('Password Lost and Found', 'yit') ?>"> <?php _e( 'lost password?', 'yit' ) ?> </a> <p class="align-right"> <input type="submit" tabindex="100" value="<?php _e( 'Login', 'yit' ) ?>" name="wp-submit" class="input-submit" /> <input type="hidden" value="<?php echo yit_curPageURL(); ?>" name="redirect_to" /> <input type="hidden" value="1" name="testcookie" /> </p> </div> </form> </div> <?php else: ?> <a class="topbar_login" href="<?php echo wp_logout_url( yit_curPageURL() ); ?>"><?php _e('LOGOUT', 'yit') ?> <span class="sf-sub-indicator"></span></a> <?php endif ?> </div> <?php endif ?>
<p class="align-right"> <input type="submit" tabindex="100" value="<?php _e('Login', 'yit'); ?> " name="wp-submit" class="input-submit" /> <input type="hidden" value="<?php echo yit_curPageURL(); ?> " name="redirect_to" /> <input type="hidden" value="1" name="testcookie" /> </p> </div> </form> </div> <?php } else { ?> <a class="topbar_login" href="<?php echo wp_logout_url(yit_curPageURL()); ?> "><?php _e('LOGOUT', 'yit'); ?> <span class="sf-sub-indicator"></span></a> <?php } ?> </div> <?php }