bp_forums_new_post

  • do_action( 'bp_forums_new_post', $post_id )

    Source Reference:

    • Component: BuddyPress:: bp-forums
      File: /bp-forums/bp-forums-functions.php :: Trac Source Line: 507
      	if ( !isset( $post_time ) )
      		$post_time = $post->post_time;
      
      	if ( !isset( $post_position ) )
      		$post_position = $post->post_position;
      
      	$post_id = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );
      
      	if ( !empty( $post_id ) )
      		do_action( 'bp_forums_new_post', $post_id );
      
      	return $post_id;
      }
      
      function bp_forums_get_post_extras( $posts ) {
      	global $bp, $wpdb;
      
      	if ( empty( $posts ) )
      		return $posts;
      

Hook: add_action: bp_forums_new_post instances (1)

  • add_action( 'bp_forums_new_post',  'bp_core_clear_cache' )
    $function_to_add: bp_core_clear_cache
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-forums
      File: /bp-forums/bp-forums-functions.php :: Trac Source Line: 617
       * Caching
       *
       * Caching functions handle the clearing of cached objects and pages on specific
       * actions throughout BuddyPress.
       */
      
      // List actions to clear super cached pages on, if super cache is installed
      add_action( 'bp_forums_new_forum', 'bp_core_clear_cache' );
      add_action( 'bp_forums_new_topic', 'bp_core_clear_cache' );
      add_action( 'bp_forums_new_post',  'bp_core_clear_cache' );
      
      /** Embeds *******************************************************************/
      
      /**
       * Grabs the topic post ID and attempts to retrieve the oEmbed cache (if it exists)
       * during the forum topic loop.  If no cache and link is embeddable, cache it.
       *
       * @see BP_Embed
       * @see bp_embed_forum_cache()
      

Comments are closed.