This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'jet-smart-filters/query/final-query', function( $query ) { | |
| if ( empty( $query['meta_query'] ) ) { | |
| return $query; | |
| } | |
| foreach ( $query['meta_query'] as $index => $meta_query_item ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class JSF_Search_By_ID_With_Query_Included { | |
| public $key = 'search__ID'; | |
| public $id = 0; | |
| public function __construct() { | |
| add_filter( 'jet-smart-filters/query/final-query', array( $this, 'modify_query' ) ); | |
| add_filter( 'jet-smart-filters/query/meta-query-row', array( $this, 'clear_meta_query' ) ); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'jet-smart-filters/query/meta-query-row', function( $row ) { | |
| if ( in_array( $row['key'], array( '__reload_provider' ) ) ) { | |
| $row = array(); | |
| } | |
| return $row; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //add --random-seed to query name | |
| class JSF_Random_Pagination { | |
| public function __construct() { | |
| add_action( 'jet-engine/query-builder/query/after-query-setup', array( $this, 'maybe_set_seed' ), 100 ); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class JSF_Sort_Gigabytes { | |
| public function __construct() { | |
| add_filter( 'jet-smart-filters/filters/filter-options', array( $this, 'sort' ), 0, 2 ); | |
| } | |
| public function sort( $options, $filter_id ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class JSF_Extend_Search { | |
| public function __construct() { | |
| add_filter( 'jet-smart-filters/query/request', array( $this, 'modify_request' ), 0, 2 ); | |
| } | |
| public function modify_request( $request, $manager ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'jet-engine/register-macros', function(){ | |
| /** | |
| * Return week number in the cycle. | |
| */ | |
| class Week_In_Cycle extends \Jet_Engine_Base_Macros { | |
| public function macros_tag() { | |
| return 'week_in_cycle'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'jet-engine/callbacks/register', function( $callbacks ) { | |
| if ( ! class_exists( '\JetLimitResponsesCore\Common\MetaQuery' ) ) { | |
| return; | |
| } | |
| $form_ids = array(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Jet_Engine_Rank_Math_Timestamp { | |
| public function __construct() { | |
| add_action( 'rank_math/vars/register_extra_replacements', array( $this, 'register_snippet' ) ); | |
| } | |
| public function register_snippet() { | |