当前位置: 首页>>代码示例>>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;未经允许,请勿转载。