function couponer_button($atts, $content) { extract(shortcode_atts(array('text' => '', 'link' => '', 'target' => '_self', 'bg_color' => '', 'font_color' => '', 'bg_color_hvr' => '', 'font_color_hvr' => ''), $atts)); $random = coupon_confirm_hash(10); $style = ' <style> a.' . $random . '{ background: ' . $bg_color . '; color: ' . $font_color . ' } a.' . $random . ':hover, .' . $random . ':active, .' . $random . ':focus{ background: ' . $bg_color_hvr . '; color: ' . $font_color_hvr . ' } </style> '; $html = $style . '<a href="' . $link . '" class="btn btn-custom ' . $random . '" target="' . $target . '">' . $text . '</a>'; return $html; }
<?php $filters = coupon_get_option('ajax_categories'); if ($filters == 'yes') { ?> <!-- filters --> <div class="filters col-md-8 col-md-offset-2 col-sm-12"> <!-- shop-search --> <form class="form-horizontal search-coupon" role="search"> <div class="form-group has-feedback"> <span class="fa fa-search form-control-feedback icon-left"></span> <input type="text" name="search_<?php echo coupon_confirm_hash(); ?> " id="search_<?php echo coupon_confirm_hash(); ?> " class="form-control ajax_search" id="inputSuccess3" placeholder="<?php esc_attr_e('Type shop name', 'coupon'); ?> "> <span class="fa fa-angle-down form-control-feedback"></span> </div> <div class="ajax_search_results"> <ul class="list-unstyled"> <ul> </div> </form> <!-- .shop-search --> <!-- categories-dropdown-buton -->
$errors['city'] = $error_labels['empty_city']; } /* Check gender */ $gender = isset($_POST['gender']) ? esc_sql($_POST['gender']) : ''; if ($gender === "") { $errors['gender'] = $error_labels['empty_gender']; } /* Check age */ $age = esc_sql($_POST['age']); if ($age === "") { $errors['age'] = $error_labels['empty_age']; } if (0 === count($errors)) { $password = $_POST['password']; $new_user_id = wp_create_user($username, $password, $email); $user_meta = array('city' => $city, 'gender' => $gender, 'age' => $age, 'active_status' => 'inactive', 'subscribe' => 'yes', 'avatar' => '', 'confirmation_hash' => md5(coupon_confirm_hash(100))); coupon_send_subscription($email, false); update_user_meta($new_user_id, 'coupon_user_meta', $user_meta); update_user_meta($new_user_id, 'first_name', $first_name); update_user_meta($new_user_id, 'last_name', $last_name); $subject = coupon_get_option('site_name') . ' | ' . __('Confirm Registration', 'coupon'); $sender_name = coupon_get_option('sender_name'); $sender_email = coupon_get_option('sender_email'); $headers = array(); $headers[] = "MIME-Version: 1.0"; $headers[] = "Content-Type: text/html; charset=ISO-8859-1"; $headers[] = "From: " . $sender_name . " <" . $sender_email . ">"; $confirm_link = add_query_arg(array('confirm' => $user_meta["confirmation_hash"], 'user' => $username), coupon_register_login_url()); $message = ''; $message = str_replace("%LINK%", $confirm_link, coupon_get_option('registration_message')); $message = "<html><body>" . $message . "</body></html>";