本文整理汇总了PHP中qa_html_theme_base::post_meta方法的典型用法代码示例。如果您正苦于以下问题:PHP qa_html_theme_base::post_meta方法的具体用法?PHP qa_html_theme_base::post_meta怎么用?PHP qa_html_theme_base::post_meta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qa_html_theme_base
的用法示例。
在下文中一共展示了qa_html_theme_base::post_meta方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_meta
function post_meta($post, $class, $prefix = null, $separator = '<BR/>')
{
if (qa_opt('buddypress_integration_enable') && qa_opt('buddypress_display_names')) {
if (isset($post['who']['data'])) {
$handle = $this->who_to_handle($post['who']['data']);
$name = bp_core_get_user_displayname($handle);
if ($name) {
$post['who']['data'] = str_replace('>' . $handle . '<', ' title="@' . $handle . '">' . $name . '<', $post['who']['data']);
}
if ($handle && !in_array($handle, $this->bp_mentions)) {
// @mentions
$this->bp_mentions[] = $handle;
}
}
if (isset($post['who_2']['data'])) {
$handle2 = $this->who_to_handle($post['who_2']['data']);
$name2 = bp_core_get_user_displayname($handle2);
if ($name2) {
$post['who_2']['data'] = str_replace('>' . $handle2 . '<', ' title="@' . $handle2 . '">' . $name2 . '<', $post['who_2']['data']);
}
if ($handle2 && !in_array($handle2, $this->bp_mentions)) {
// @mentions
$this->bp_mentions[] = $handle2;
}
}
}
qa_html_theme_base::post_meta($post, $class, $prefix, $separator);
}
示例2: post_meta
function post_meta($post, $class, $prefix = null, $separator = '<BR/>')
{
if (isset($post['who']) && ($class == 'qa-q-view' && qa_opt('marker_plugin_w_qv') || $class == 'qa-q-item' && qa_opt('marker_plugin_w_qi') || $class == 'qa-a-item' && qa_opt('marker_plugin_w_a') || $class == 'qa-c-item' && qa_opt('marker_plugin_w_c'))) {
$handle = strip_tags($post['who']['data']);
$uid = $this->getuserfromhandle($handle);
$image = $this->get_role_marker($uid, 2);
$post['who']['data'] = $image . $post['who']['data'];
}
if (isset($post['who_2']) && ($class == 'qa-q-view' && qa_opt('marker_plugin_w_qv') || $class == 'qa-q-item' && qa_opt('marker_plugin_w_qi') || $class == 'qa-a-item' && qa_opt('marker_plugin_w_a') || $class == 'qa-c-item' && qa_opt('marker_plugin_w_c'))) {
$handle = strip_tags($post['who_2']['data']);
$uid = $this->getuserfromhandle($handle);
$image = $this->get_role_marker($uid, 2);
$post['who_2']['data'] = $image . $post['who_2']['data'];
}
qa_html_theme_base::post_meta($post, $class, $prefix, $separator);
}