</div> </div> <div class="box-footer"> <?php if (function_exists('sc_render_login_form_social_connect')) { ?> <div class="pull-right"> <?php echo sc_render_login_form_social_connect(array('display_label' => false)); ?> </div> <?php } ?> <?php do_action('woocommerce_login_form'); ?> <?php wp_nonce_field('woocommerce-login'); ?> <input type="submit" class="button btn btn-primary" name="login" value="<?php
function child_sc_render_comment_form_social_connect() { if (comments_open() && !is_user_logged_in()) { sc_render_login_form_social_connect(); } }
/** This is rendered widget content */ function widget($args, $instance) { extract($args); if ($instance['hide_for_logged_in'] == 1 && is_user_logged_in()) { return; } echo $before_widget; if (!empty($instance['title'])) { $title = apply_filters('widget_title', $instance['title']); echo $before_title . $title . $after_title; } if (!empty($instance['before_widget_content'])) { echo $instance['before_widget_content']; } sc_render_login_form_social_connect(array('display_label' => false)); if (!empty($instance['after_widget_content'])) { echo $instance['after_widget_content']; } echo $after_widget; }
function host_review_edit_form($atts) { global $current_user, $post; get_currentuserinfo(); $user_host_id = (int) get_host_id_from_user_id($current_user->ID); if ($user_host_id === $post->ID) { ?> You can't rate yourself.<?php } else { if (is_user_logged_in() && has_user_reviewed_host($post->ID)) { global $current_user, $post; get_currentuserinfo(); $review_id = has_user_reviewed_host($post->ID); $post_data = get_post($review_id); $ratings = get_post_meta($review_id, '_review_star_ratings', true); $xpost = get_post_meta($review_id, '_review_xpost', true); $reinvoices = get_post_meta($review_id, '_review_reinvoices', true); $no_issues = get_post_meta($review_id, '_review_issues_na', true); ?> <div class="rah-before-form"> <?php if ($post_data->post_status == 'pending') { ?> <p class="alerts notice"><strong><em>This review is currently in moderation. Any further edits may delay it's publishing</em></strong></p> <?php } ?> <?php if ($post_data->post_status == 'publish') { ?> <p class="alerts confirm"><strong><em>This review is live, any edits will cause it to be sent for moderation.</em></strong></p> <?php } ?> </div> <div id="postbox" class="rah-form"> <form id="edit_review" name="new_post" method="post" action="<?php echo get_permalink($post->ID); ?> submit"> <h3>Reviewing</h3> <p> <input size="50" id="name" name="host_name" readonly type="text" value="<?php the_title(); ?> " /> </p> <h3>Review Title</h3> <p> <input size="50" id="title" name="title" type="text" value="<?php echo $post_data->post_title; ?> " /> </p> <p> <strong><label for="xpost">This rating is for a cross-post</label></strong> <input id="xpost" type="checkbox" name="xpost" value="yes" <?php checked('yes', $xpost, true); ?> /> </p> <p> <strong><label for="reinvoices">This host re-invoices within 180 days if requested</label></strong><br /> <input type="radio" name="reinvoices" value="yes" <?php checked('yes', $reinvoices, true); ?> /> Yes<br /> <input type="radio" name="reinvoices" value="no" <?php checked('no', $reinvoices, true); ?> /> No<br /> <input type="radio" name="reinvoices" value="na" <?php checked('na', $reinvoices, true); ?> /> Not Applicable </p> <h3>Efficiency</h3> <p> <input type="number" name="star_ratings[invoicing_and_ordering_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['invoicing_and_ordering_rating']) ? $ratings['invoicing_and_ordering_rating'] : 1; ?> " /> <label for="">Did the host invoice and pay for your buy in a timeframe you felt was appropriate?</label> </p> <p> <input type="number" name="star_ratings[sorting_and_packing_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['sorting_and_packing_rating']) ? $ratings['sorting_and_packing_rating'] : 1; ?> " /> <label for="post_order">Did the host sort, pack, and invoice for shipping in an appropriate amount of time after the <strong><em>entire</em></strong> order was received?</label> </p> <p> <input type="number" name="star_ratings[shipping_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['shipping_rating']) ? $ratings['shipping_rating'] : 1; ?> " /> <label for="shipping">Was the order mailed, after shipping was paid, in a timeframe that was appropriate?</label> </p> <h3>Communication/Resolution</h3> <p> <input type="number" name="star_ratings[communication_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['communication_rating']) ? $ratings['communication_rating'] : 1; ?> " /> <label for="communication">How well did the host communicate updates and information about the buys from open until shipment to you?</label> </p> <p> <input type="number" name="star_ratings[professionalism_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['professionalism_rating']) ? $ratings['professionalism_rating'] : 1; ?> " /> <label for="post_order">Did you feel the host was friendly, helpful, and professional through all steps of your buy?</label> </p> <p> <input type="number" name="star_ratings[issue_resolution_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['issue_resolution_rating']) ? $ratings['issue_resolution_rating'] : 1; ?> " /> <input type="checkbox" <?php checked($no_issues, '1', true); ?> id="issues_na" name="issues_na" value="1" /> <label for="issues_na">Not Applicable</label><br /> <label for="issues">If there was a problem, or issue, did the host seem willing to work towards a resolution (including re-invoicing if requested), and follow through with the promised resolution?</label> </p> <h3>Recommends Host</h3> <p> <input type="number" name="star_ratings[recommends_host_rating]" class="rating" data-empty-value="1" data-min="1" data-max="5" data-clearable="Clear" value="<?php echo !empty($ratings['recommends_host_rating']) ? $ratings['recommends_host_rating'] : 1; ?> " /> <label for="recommendation">How willing are you to buy from this host again, or recommend this host to other buyers?</label> </p> <h3>Additional Comments</h3> <p>Please add any additional comments you would like for other buyers to see. You can add praises to wonderful hosts, examples of problems (high fees, substandard products, communication issues), how a host went above and beyond, or just an overall statement about your host!</p> <textarea name="comments" id="comments"><?php echo $post_data->post_content; ?> </textarea> <p><input type="submit" value="Submit" tabindex="6" id="submit" name="submit" /></p> <input type="hidden" name="type" id="type" value="reviews" /> <input type="hidden" name="action" value="review-host" /> <input type="hidden" name="existing_post_id" value="<?php echo $review_id; ?> " /> <?php wp_nonce_field('rah-new-review'); ?> </form> </div> <div class="rah-after-form"></div> <?php } elseif (!is_user_logged_in()) { ?> <p> <strong><em>You must be logged in<sup>*</sup> to review a Host</em></strong>. </p> <?php sc_render_login_form_social_connect(array('display_label' => false)); } } }