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


PHP BP_Messages_Thread::check_access方法代碼示例

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


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

示例1: messages_check_thread_access

function messages_check_thread_access( $thread_id, $user_id = false ) {
	global $bp;

	if ( !$user_id )
		$user_id = $bp->loggedin_user->id;

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

示例2: test_check_access_invalid_thread

 /**
  * @group check_access
  */
 public function test_check_access_invalid_thread()
 {
     $this->assertEquals(null, BP_Messages_Thread::check_access(999, 1));
 }
開發者ID:AceMedia,項目名稱:BuddyPress,代碼行數:7,代碼來源:class.bp-messages-thread.php

示例3: messages_check_thread_access

function messages_check_thread_access($thread_id, $user_id = 0)
{
    if (empty($user_id)) {
        $user_id = bp_loggedin_user_id();
    }
    return BP_Messages_Thread::check_access($thread_id, $user_id);
}
開發者ID:pyropictures,項目名稱:wordpress-plugins,代碼行數:7,代碼來源:bp-messages-functions.php

示例4: messages_action_bulk_delete

function messages_action_bulk_delete()
{
    global $bp, $thread_ids;
    if ($bp->current_component != $bp->messages->slug || $bp->action_variables[0] != 'bulk-delete') {
        return false;
    }
    $thread_ids = $_POST['thread_ids'];
    if (!$thread_ids || !BP_Messages_Thread::check_access($thread_ids)) {
        bp_core_redirect($bp->displayed_user->domain . $bp->current_component . '/' . $bp->current_action);
    } else {
        if (!messages_delete_thread($thread_ids)) {
            bp_core_add_message(__('There was an error deleting messages.', 'buddypress'), 'error');
        } else {
            bp_core_add_message(__('Messages deleted.', 'buddypress'));
        }
        bp_core_redirect($bp->loggedin_user->domain . $bp->current_component . '/' . $bp->current_action);
    }
}
開發者ID:alvaropereyra,項目名稱:shrekcms,代碼行數:18,代碼來源:bp-messages.php

示例5: messages_check_thread_access

function messages_check_thread_access($thread_id, $user_id = 0)
{
    global $bp;
    if (empty($user_id)) {
        $user_id = $bp->loggedin_user->id;
    }
    return BP_Messages_Thread::check_access($thread_id, $user_id);
}
開發者ID:hornetalcala,項目名稱:trunk,代碼行數:8,代碼來源:bp-messages-functions.php


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