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