本文整理汇总了PHP中BP_Messages_Thread::mark_as_read方法的典型用法代码示例。如果您正苦于以下问题:PHP BP_Messages_Thread::mark_as_read方法的具体用法?PHP BP_Messages_Thread::mark_as_read怎么用?PHP BP_Messages_Thread::mark_as_read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BP_Messages_Thread
的用法示例。
在下文中一共展示了BP_Messages_Thread::mark_as_read方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: messages_ajax_markread
function messages_ajax_markread()
{
global $bp;
if (!isset($_POST['thread_ids'])) {
echo "-1[[split]]" . __('There was a problem marking messages as read.', 'buddypress');
} else {
$thread_ids = explode(',', $_POST['thread_ids']);
for ($i = 0; $i < count($thread_ids); $i++) {
BP_Messages_Thread::mark_as_read($thread_ids[$i]);
}
}
}
示例2: bp_dtheme_ajax_message_markread
function bp_dtheme_ajax_message_markread()
{
global $bp;
if (!isset($_POST['thread_ids'])) {
echo "-1<div id='message' class='error'><p>" . __('There was a problem marking messages as read.', '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_read($thread_ids[$i]);
}
}
}
示例3: messages_mark_thread_read
function messages_mark_thread_read( $thread_id ) {
return BP_Messages_Thread::mark_as_read( $thread_id );
}
示例4: mark_read
/**
* Mark a thread initialized in this class as read.
*
* @since 1.0.0
*
* @see BP_Messages_Thread::mark_as_read()
*/
public function mark_read()
{
BP_Messages_Thread::mark_as_read($this->thread_id);
}
示例5: bp_dtheme_ajax_message_markread
function bp_dtheme_ajax_message_markread()
{
// 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 read.', '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_read($thread_ids[$i]);
}
}
}
示例6: bp_legacy_theme_ajax_message_markread
/**
* Mark a private message as read 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_markread()
{
// 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 read.', '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_read((int) $thread_ids[$i]);
}
}
exit;
}