bbp_get_all_child_ids

  • apply_filters( 'bbp_get_all_child_ids', $child_ids, (int) $parent_id, $post_type )

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-common-functions.php :: Trac Source Line: 1312
      	$post_status = "'" . join( "', '", $post_status ) . "'";
      
      	// Check for cache and set if needed
      	if ( !$child_ids = wp_cache_get( $cache_id, 'bbpress' ) ) {
      		$child_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC;", $parent_id, $post_type ) );
      		wp_cache_set( $cache_id, $child_ids, 'bbpress' );
      	}
      
      	// Filter and return
      	return apply_filters( 'bbp_get_all_child_ids', $child_ids, (int) $parent_id, $post_type );
      }
      
      /** Feeds *********************************************************************/
      
      /**
       * This function is hooked into the WordPress 'request' action and is
       * responsible for sniffing out the query vars and serving up RSS2 feeds if
       * the stars align and the user has requested a feed of any bbPress type.
       *
       * @since bbPress (r3171)
      

Comments are closed.