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


PHP BP_Messages_Thread::mark_as_unread方法代碼示例

本文整理匯總了PHP中BP_Messages_Thread::mark_as_unread方法的典型用法代碼示例。如果您正苦於以下問題:PHP BP_Messages_Thread::mark_as_unread方法的具體用法?PHP BP_Messages_Thread::mark_as_unread怎麽用?PHP BP_Messages_Thread::mark_as_unread使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BP_Messages_Thread的用法示例。


在下文中一共展示了BP_Messages_Thread::mark_as_unread方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: messages_ajax_markunread

function messages_ajax_markunread()
{
    global $bp;
    if (!isset($_POST['thread_ids'])) {
        echo "-1[[split]]" . __('There was a problem marking messages as unread.', 'buddypress');
    } else {
        $thread_ids = explode(',', $_POST['thread_ids']);
        for ($i = 0; $i < count($thread_ids); $i++) {
            BP_Messages_Thread::mark_as_unread($thread_ids[$i]);
        }
    }
}
開發者ID:alvaropereyra,項目名稱:shrekcms,代碼行數:12,代碼來源:bp-messages-ajax.php

示例2: bp_dtheme_ajax_message_markunread

function bp_dtheme_ajax_message_markunread()
{
    global $bp;
    if (!isset($_POST['thread_ids'])) {
        echo "-1<div id='message' class='error'><p>" . __('There was a problem marking messages as unread.', 'buddypress') . '</p></div>';
    } else {
        $thread_ids = explode(',', $_POST['thread_ids']);
        for ($i = 0, $count = count($thread_ids); $i < $count; ++$i) {
            BP_Messages_Thread::mark_as_unread($thread_ids[$i]);
        }
    }
}
開發者ID:hscale,項目名稱:webento,代碼行數:12,代碼來源:ajax.php

示例3: messages_mark_thread_unread

function messages_mark_thread_unread( $thread_id ) {
	return BP_Messages_Thread::mark_as_unread( $thread_id );
}
開發者ID:n-sane,項目名稱:zaroka,代碼行數:3,代碼來源:bp-messages.php

示例4: mark_unread

 /**
  * Mark a thread initialized in this class as unread.
  *
  * @since 1.0.0
  *
  * @see BP_Messages_Thread::mark_as_unread()
  */
 public function mark_unread()
 {
     BP_Messages_Thread::mark_as_unread($this->thread_id);
 }
開發者ID:jasonmcalpin,項目名稱:BuddyPress,代碼行數:11,代碼來源:class-bp-messages-thread.php

示例5: bp_dtheme_ajax_message_markunread

function bp_dtheme_ajax_message_markunread()
{
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    if (!isset($_POST['thread_ids'])) {
        echo "-1<div id='message' class='error'><p>" . __('There was a problem marking messages as unread.', 'buddypress') . '</p></div>';
    } else {
        $thread_ids = explode(',', $_POST['thread_ids']);
        for ($i = 0, $count = count($thread_ids); $i < $count; ++$i) {
            BP_Messages_Thread::mark_as_unread($thread_ids[$i]);
        }
    }
}
開發者ID:nxtclass,項目名稱:NXTClass-Plugin,代碼行數:15,代碼來源:ajax.php

示例6: bp_legacy_theme_ajax_message_markunread

/**
 * Mark a private message as unread in your inbox via a POST request.
 *
 * @return mixed String on error, void on success
 * @since BuddyPress (1.2)
 */
function bp_legacy_theme_ajax_message_markunread()
{
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    if (!isset($_POST['thread_ids'])) {
        echo "-1<div class='clearfix'></div><div id='message' class='error alert alert-danger'><p>" . __('There was a problem marking messages as unread.', 'firmasite') . '</p></div>';
    } else {
        $thread_ids = explode(',', $_POST['thread_ids']);
        for ($i = 0, $count = count($thread_ids); $i < $count; ++$i) {
            BP_Messages_Thread::mark_as_unread((int) $thread_ids[$i]);
        }
    }
    exit;
}
開發者ID:jason-herndon,項目名稱:bas-intranet,代碼行數:22,代碼來源:buddypress-functions.php


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