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


PHP BP_Activity_Activity::get_id方法代碼示例

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


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

示例1: bp_activity_get_activity_id

/**
 * Fetch the activity_id for an existing activity entry in the DB.
 *
 * @since BuddyPress (1.2.0)
 *
 * @see BP_Activity_Activity::get() For more information on accepted arguments.
 * @uses wp_parse_args()
 * @uses apply_filters() To call the 'bp_activity_get_activity_id' hook.
 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity}
 *
 * @param array $args See BP_Activity_Activity::get() for description.
 * @return int $activity_id The ID of the activity item found.
 */
function bp_activity_get_activity_id($args = '')
{
    $r = bp_parse_args($args, array('user_id' => false, 'component' => false, 'type' => false, 'item_id' => false, 'secondary_item_id' => false, 'action' => false, 'content' => false, 'date_recorded' => false));
    return apply_filters('bp_activity_get_activity_id', BP_Activity_Activity::get_id($r['user_id'], $r['component'], $r['type'], $r['item_id'], $r['secondary_item_id'], $r['action'], $r['content'], $r['date_recorded']));
}
開發者ID:eresyyl,項目名稱:mk,代碼行數:18,代碼來源:bp-activity-functions.php

示例2: test_get_id_with_secondary_item_id

 /**
  * @group get_id
  */
 public function test_get_id_with_secondary_item_id()
 {
     $a1 = $this->factory->activity->create(array('secondary_item_id' => 523));
     $a2 = $this->factory->activity->create(array('secondary_content' => 1888));
     $activity = BP_Activity_Activity::get_id(false, false, false, false, 523, false, false, false);
     $this->assertEquals($a1, $activity);
 }
開發者ID:JeroenNouws,項目名稱:BuddyPress,代碼行數:10,代碼來源:class.BP_Activity_Activity.php

示例3: bp_activity_get_activity_id

/**
 * Fetch the activity_id for an existing activity entry in the DB.
 *
 * @since 1.2.0
 *
 * @see BP_Activity_Activity::get() For more information on accepted arguments.
 * @uses wp_parse_args()
 * @uses apply_filters() To call the 'bp_activity_get_activity_id' hook.
 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity}
 *
 * @param array|string $args See BP_Activity_Activity::get() for description.
 * @return int $activity_id The ID of the activity item found.
 */
function bp_activity_get_activity_id($args = '')
{
    $r = bp_parse_args($args, array('user_id' => false, 'component' => false, 'type' => false, 'item_id' => false, 'secondary_item_id' => false, 'action' => false, 'content' => false, 'date_recorded' => false));
    /**
     * Filters the activity ID being requested.
     *
     * @since 1.2.0
     * @since 2.5.0 Added the `$r` and `$args` parameters.
     *
     * @param BP_Activity_Activity $value ID returned by BP_Activity_Activity get_id() method with provided arguments.
     * @param array                $r     Parsed function arguments.
     * @param array                $args  Arguments passed to the function.
     */
    return apply_filters('bp_activity_get_activity_id', BP_Activity_Activity::get_id($r['user_id'], $r['component'], $r['type'], $r['item_id'], $r['secondary_item_id'], $r['action'], $r['content'], $r['date_recorded']), $r, $args);
}
開發者ID:humanmade,項目名稱:BuddyPress,代碼行數:28,代碼來源:bp-activity-functions.php

示例4: bp_activity_get_activity_id

/**
 * Fetch the activity_id for an existing activity entry in the DB.
 *
 * @since 1.2.0
 *
 * @param array $args See docs for $defaults for details
 *
 * @uses nxt_parse_args()
 * @uses apply_filters() To call the 'bp_activity_get_activity_id' hook
 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity}
 *
 * @return int $activity_id The activity id
 */
function bp_activity_get_activity_id($args = '')
{
    $defaults = array('user_id' => false, 'component' => false, 'type' => false, 'item_id' => false, 'secondary_item_id' => false, 'action' => false, 'content' => false, 'date_recorded' => false);
    $r = nxt_parse_args($args, $defaults);
    extract($r, EXTR_SKIP);
    return apply_filters('bp_activity_get_activity_id', BP_Activity_Activity::get_id($user_id, $component, $type, $item_id, $secondary_item_id, $action, $content, $date_recorded));
}
開發者ID:nxtclass,項目名稱:NXTClass,代碼行數:20,代碼來源:bp-activity-functions.php

示例5: bp_activity_get_activity_id

/**
 * Fetch the activity_id for an existing activity entry in the DB.
 *
 * @since BuddyPress (1.2.0)
 *
 * @see BP_Activity_Activity::get() For more information on accepted arguments.
 * @uses wp_parse_args()
 * @uses apply_filters() To call the 'bp_activity_get_activity_id' hook.
 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity}
 *
 * @param array $args See BP_Activity_Activity::get() for description.
 * @return int $activity_id The ID of the activity item found.
 */
function bp_activity_get_activity_id( $args = '' ) {

	$r = bp_parse_args( $args, array(
		'user_id'           => false,
		'component'         => false,
		'type'              => false,
		'item_id'           => false,
		'secondary_item_id' => false,
		'action'            => false,
		'content'           => false,
		'date_recorded'     => false,
	) );

	/**
	 * Filters the activity ID being requested.
	 *
	 * @since BuddyPress (1.2.0)
	 *
	 * @param BP_Activity_Activity ID returned by BP_Activity_Activity get_id() method with provided arguments.
	 */
	return apply_filters( 'bp_activity_get_activity_id', BP_Activity_Activity::get_id(
		$r['user_id'],
		$r['component'],
		$r['type'],
		$r['item_id'],
		$r['secondary_item_id'],
		$r['action'],
		$r['content'],
		$r['date_recorded']
	) );
}
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:44,代碼來源:bp-activity-functions.php


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