bbp_is_forum

  • apply_filters( 'bbp_is_forum', $retval, $post_id )

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-common-template.php :: Trac Source Line: 80
      function bbp_is_forum( $post_id = 0 ) {
      
      	// Assume false
      	$retval = false;
      
      	// Supplied ID is a forum
      	if ( !empty( $post_id ) && ( bbp_get_forum_post_type() == get_post_type( $post_id ) ))
      		$retval = true;
      
      	return (bool) apply_filters( 'bbp_is_forum', $retval, $post_id );
      }
      
      /**
       * Check if we are viewing a forum archive.
       *
       * @since bbPress (r3251)
       *
       * @uses is_post_type_archive() To check if we are looking at the forum archive
       * @uses bbp_get_forum_post_type() To get the forum post type ID
       *
      

Comments are closed.