Tribe__Events__Repositories__Event::filter_by_sticky( bool $sticky = true )
Filters events to include only those that match the provided sticky state.
Contents
Parameters
- $sticky
-
(bool) (Optional) Whether the events should be sticky or not.
Default value: true
Source
File: src/Tribe/Repositories/Event.php
public function filter_by_sticky( $sticky = true ) { // Support negative menu_order lookups. add_action( 'pre_get_posts', array( $this, 'support_negative_menu_order' ) ); $this->menu_order = (bool) $sticky ? - 1 : 0; $this->by( 'menu_order', $this->menu_order ); }
Changelog
Version | Description |
---|---|
4.9 | Introduced. |