$posts $posts : array Stream post cache. This will only be populated when TimberStream::get_posts is run without a $query argument. Type array
$default_options $default_options : array Default stream options, used when creating a new stream. Type array
$options $options : array Stream options. This is set by __construct based on what is stored in the database. Type array
__construct() __construct(integer|boolean|string $pid = null) Init Stream object Parameters integer|boolean|string $pid Post ID or slug
get_posts() get_posts(array $query = array(), string $PostClass = 'TimberPost') : array Get filtered & sorted collection of posts in the stream Parameters array $query WP_Query query argument string $PostClass Timber post class Returns array — collection of TimberPost objects
get_posts_without_tax_query() get_posts_without_tax_query( $query, $PostClass = 'TimberPost') Get the ids of all saved posts, including any removed by the taxonomy query Parameters $query $PostClass
filter_stream() filter_stream( $attribute, $value) : array Filter posts in the stream, returning only the filtered posts (including their position). Parameters $attribute $value Returns array — filtered posts
repopulate_stream() repopulate_stream() Enforce the stream length. If there are fewer posts than allowed, add some from the base query. If there are more, remove them.
check_post() check_post(integer $post_id) : array Checks if a post exists in a stream Parameters integer $post_id Post ID Returns array — returns the data saved in the stream, plus its position
remove_post() remove_post(integer $post_id, boolean $repopulate = true) Removes a post from a stream and, by default, fills in the empty space at the end. Parameters integer $post_id Post ID boolean $repopulate add/remove posts to enforce stream length
insert_post() insert_post(integer $post_id) Inserts a post in the stream Parameters integer $post_id Post ID
remove_pinned() remove_pinned() Temporarily removes pinned items from the stream, for the purpose of modifying the auto-flowing stream.
reinsert_pinned() reinsert_pinned() Place the pinned items back in the stream in their appropriate locations