本文整理匯總了PHP中qa_html_theme_base::post_meta_flags方法的典型用法代碼示例。如果您正苦於以下問題:PHP qa_html_theme_base::post_meta_flags方法的具體用法?PHP qa_html_theme_base::post_meta_flags怎麽用?PHP qa_html_theme_base::post_meta_flags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類qa_html_theme_base
的用法示例。
在下文中一共展示了qa_html_theme_base::post_meta_flags方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: post_meta_flags
public function post_meta_flags($post, $class)
{
if (isset($post['raw']['opostid'])) {
$postid = $post['raw']['opostid'];
} elseif (isset($post['raw']['postid'])) {
$postid = $post['raw']['postid'];
}
$flaggers = array();
if (isset($postid)) {
$votersflaggers = $this->get_post_voters_flaggers($post, $postid);
if (isset($votersflaggers)) {
foreach ($votersflaggers as $voterflagger) {
if ($voterflagger['flag'] > 0) {
$flaggers[] = qa_html($voterflagger['handle']);
}
}
}
}
if (!empty($flaggers)) {
$this->output('<span title="⚑ ' . implode(', ', $flaggers) . '">');
}
parent::post_meta_flags($post, $class);
if (!empty($flaggers)) {
$this->output('</span>');
}
}
示例2: post_meta_flags
function post_meta_flags($post, $class)
{
$postid = @$post['raw']['opostid'];
if (!isset($postid)) {
$postid = @$post['raw']['postid'];
}
$tooltip = '';
if (isset($postid)) {
$votersflaggers = $this->get_post_voters_flaggers($post, $postid);
if (isset($votersflaggers)) {
foreach ($votersflaggers as $voterflagger) {
if ($voterflagger['flag'] > 0) {
$tooltip .= (strlen($tooltip) ? ', ' : '') . qa_html($voterflagger['handle']);
}
}
}
}
if (strlen($tooltip)) {
$this->output('<span title="⚑ ' . $tooltip . '">');
}
qa_html_theme_base::post_meta_flags($post, $class);
if (strlen($tooltip)) {
$this->output('</span>');
}
}
示例3: post_meta_flags
function post_meta_flags($post, $class)
{
$this->theme_view_count($post);
qa_html_theme_base::post_meta_flags($post, $class);
}