本文整理匯總了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);
}