Created
February 24, 2017 17:52
-
-
Save brandonlar/ae7dced864dba32d6a074ab1a17b88ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="<?php bp_messages_form_action('compose' ); ?>" method="post" id="send_message_form" class="standard-form" enctype="multipart/form-data"> | |
<?php | |
/** | |
* Fires before the display of message compose content. | |
* | |
* @since 1.1.0 | |
*/ | |
do_action( 'bp_before_messages_compose_content' ); ?> | |
<?php if ( is_user_logged_in() ) : ?> | |
<?php $wcv_store_id = get_the_author_meta('ID'); ?> | |
<?php $wcv_store_name = get_user_meta( $wcv_store_id, 'pv_shop_name', true); ?> | |
<p> | |
<?php echo '<br><a href="' . bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . get_the_author_meta('user_login') .'">' . $wcv_store_name . '</a>'; ?> | |
</p> | |
<label for="send-to-input"><?php _e("Send To $wcv_store_name", 'buddypress' ); ?></label> | |
<ul class="first acfb-holder"> | |
<li> | |
<?php bp_message_get_recipient_tabs(); ?> | |
</li> | |
</ul> | |
<label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label> | |
<input type="text" name="subject" id="subject" value="<?php bp_messages_subject_value(); ?>" /> | |
<label for="message_content"><?php _e( 'Message', 'buddypress' ); ?></label> | |
<textarea name="content" id="message_content" rows="15" cols="20"><?php bp_messages_content_value(); ?></textarea> | |
<input type="hidden" name="send_to_bp_usernames" id="send-to-bp-usernames" value="<?php bp_message_get_recipient_usernames(); ?>" class="<?php bp_message_get_recipient_usernames(); ?>" /> | |
<?php | |
/** | |
* Fires after the display of message compose content. | |
* | |
* @since 1.1.0 | |
*/ | |
do_action( 'bp_after_messages_compose_content' ); ?> | |
<div class="submit"> | |
<input type="submit" value="<?php esc_attr_e( "Send Message", 'buddypress' ); ?>" name="send" id="send" /> | |
</div> | |
<?php wp_nonce_field( 'messages_send_message' ); ?> | |
</form> | |
<script type="text/javascript"> | |
document.getElementById("send-to-input").focus(); | |
</script> | |
<?php else :?> | |
<?php $wcv_my_account_url = get_permalink( get_option('woocommerce_myaccount_page_id')); ?> | |
<?php echo '<br><a href="' . $wcv_my_account_url . '">Login or Register to Contact Freelancer</a>'; ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment