コード例 #1
0
ファイル: answer-list.php プロジェクト: coollog/theboola
printf(__('<span class="when">answered about %s ago</span>', 'ap'), ap_human_time(get_the_time('U')));
?>
							
				</div>			
			</div>
			<div class="answer-content">
				<strong class="ap-answer-title"><?php 
echo get_the_title($answer->post->post_parent);
?>
</strong>
				<?php 
echo ap_truncate_chars(strip_tags(get_the_content()), 100);
?>
				<div class="ap-ans-action">
					<a href="<?php 
echo ap_answer_edit_link();
?>
" class="edit-btn" title="<?php 
_e('Edit this question', 'ap');
?>
"><?php 
_e('Edit', 'ap');
?>
</a>
					
					<?php 
ap_flag_btn_html();
?>
					<?php 
ap_post_delete_btn_html();
?>
コード例 #2
0
ファイル: functions.php プロジェクト: Krl4/anspress
function ap_edit_a_btn_html($echo = false)
{
    if (!is_user_logged_in()) {
        return;
    }
    $output = '';
    $post_id = get_edit_answer_id();
    if (ap_user_can_edit_ans($post_id)) {
        $edit_link = ap_answer_edit_link();
        $output .= "<a href='{$edit_link}.' class='edit-btn ' data-button='ap-edit-post' title='" . __('Edit Answer', 'ap') . "'>" . __('Edit', 'ap') . '</a>';
    }
    if ($echo) {
        echo $output;
    } else {
        return $output;
    }
}
コード例 #3
0
function ap_edit_a_btn_html()
{
    if (!is_user_logged_in()) {
        return;
    }
    $post_id = get_edit_answer_id();
    if (ap_user_can_edit_ans($post_id)) {
        $edit_link = ap_answer_edit_link();
        echo "<a href='{$edit_link}.' class='edit-btn aicon-edit' data-button='ap-edit-post' title='" . __('Edit Answer', 'ap') . "'>" . __('Edit', 'ap') . "</a>";
    }
    return;
}