| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; // Exit if accessed directly. |
| 5 |
} |
| 6 |
|
| 7 |
echo '<div id="fep-reply-form">'; |
| 8 |
|
| 9 |
if ( ! fep_current_user_can( 'send_reply', $parent_id ) ) { |
| 10 |
echo "<div class='fep-error'>".__("You do not have permission to send reply to this message!", 'front-end-pm')."</div>"; |
| 11 |
} elseif( isset($_POST['fep_action']) && 'reply' == $_POST['fep_action'] ) { |
| 12 |
if( fep_errors()->get_error_messages() ) { |
| 13 |
echo Fep_Form::init()->form_field_output('reply', fep_errors(), array( 'fep_parent_id' => $parent_id )); |
| 14 |
} else { |
| 15 |
echo fep_info_output(); |
| 16 |
|
| 17 |
if( 'threaded' == fep_get_message_view() ){ |
| 18 |
unset( $_REQUEST['message_content'] ); //hack to empty message content |
| 19 |
echo Fep_Form::init()->form_field_output('reply', '', array( 'fep_parent_id' => $parent_id )); |
| 20 |
} |
| 21 |
} |
| 22 |
} else { |
| 23 |
echo Fep_Form::init()->form_field_output('reply', '', array( 'fep_parent_id' => $parent_id )); |
| 24 |
} |
| 25 |
|
| 26 |
echo '</div>'; |
| 27 |
|