當前位置: 首頁>>代碼示例>>PHP>>正文


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怎麽用?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);
 }
開發者ID:NoahY,項目名稱:q2a-buddypress,代碼行數:28,代碼來源:qa-bp-layer.php

示例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);
 }
開發者ID:ruuttt,項目名稱:question2answer_sandbox,代碼行數:16,代碼來源:qa-marker-layer.php


注:本文中的qa_html_theme_base::post_meta方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。