本文整理匯總了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]);
}
}
}
示例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]);
}
}
}
示例3: messages_mark_thread_unread
function messages_mark_thread_unread( $thread_id ) {
return BP_Messages_Thread::mark_as_unread( $thread_id );
}
示例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);
}
示例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]);
}
}
}
示例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;
}