activity_loop_start

  • do_action('activity_loop_start')

    Source Reference:

    • Component: BuddyPress:: bp-activity
      File: /bp-activity/bp-activity-template.php :: Trac Source Line: 224
      		global $activity;
      
      		$this->in_the_loop = true;
      		$this->activity = $this->next_activity();
      
      		if ( is_array( $this->activity ) )
      			$this->activity = (object) $this->activity;
      
      		if ( $this->current_activity == 0 ) // loop has just started
      			do_action('activity_loop_start');
      	}
      }
      
      /**
       * Initializes the activity loop.
       *
       * Based on the $args passed, bp_has_activities() populates the $activities_template global.
       *
       * @since 1.0.0
       *
      

Hook: add_action: activity_loop_start instances (1)

  • add_action( 'activity_loop_start', 'bp_activity_embed' )
    $function_to_add: bp_activity_embed
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-activity
      File: /bp-activity/bp-activity-functions.php :: Trac Source Line: 1347
       * @uses add_filter() To attach 'bp_get_activity_id' to 'embed_post_id'
       * @uses add_filter() To attach 'bp_embed_activity_cache' to 'bp_embed_get_cache'
       * @uses add_action() To attach 'bp_embed_activity_save_cache' to 'bp_embed_update_cache'
       */
      function bp_activity_embed() {
      	add_filter( 'embed_post_id',         'bp_get_activity_id'                  );
      	add_filter( 'bp_embed_get_cache',    'bp_embed_activity_cache',      10, 3 );
      	add_action( 'bp_embed_update_cache', 'bp_embed_activity_save_cache', 10, 3 );
      }
      add_action( 'activity_loop_start', 'bp_activity_embed' );
      
      /**
       * Grabs the activity comment ID and attempts to retrieve the oEmbed cache (if it exists)
       * when BP is recursing through activity comments {@link bp_activity_recurse_comments()}.
       * If no cache and link is embeddable, cache it.
       *
       * @since 1.5
       *
       * @see BP_Embed
       * @see bp_embed_activity_cache()
      

Comments are closed.