Пример #1
0
function get_the_qa_submit_button()
{
    global $qa_general_settings;
    if (is_user_logged_in() || is_array($qa_general_settings) && isset($qa_general_settings["method"]) && 'assign' == $qa_general_settings["method"] && qa_visitor_can('immediately_publish_questions')) {
        $button = __('Submit', QA_TEXTDOMAIN);
    } elseif (get_option('users_can_register')) {
        $button = __('Register/Login and Submit', QA_TEXTDOMAIN);
    } else {
        $button = __('Login and Submit', QA_TEXTDOMAIN);
    }
    return '<input class="qa-edit-submit" type="submit" value="' . $button . '" />';
}
Пример #2
0
    the_answer_count();
    ?>
</h2>
		<?php 
    the_answer_list();
    ?>
		
		<?php 
    do_action('qa_after_answers');
    ?>
	</div>
	<?php 
}
?>
	<?php 
if ($user_ID == 0 && qa_visitor_can('publish_answers') || current_user_can('publish_answers')) {
    ?>
	<div id="edit-answer">
		<?php 
    do_action('qa_before_edit_answer');
    ?>
		
		<h2><?php 
    _e('Your Answer', QA_TEXTDOMAIN);
    ?>
</h2>
		<?php 
    the_answer_form();
    ?>
		
		<?php