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 JEC_Repeater_Format_Number { | |
| public function __construct() { | |
| add_filter( | |
| 'jet-engine/listings/filters-list', | |
| array( $this, 'add_callback' ) | |
| ); | |
| } | |
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-engine/gallery/grid/args', function( $args ) { | |
| $args['lightbox'] = true; | |
| // default args: | |
| // 'size' => 'full', | |
| // 'lightbox' => false, | |
| // 'cols_desk' => 3, | |
| // 'cols_tablet' => 3, |
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 | |
| use Jet_Engine\Query_Builder\Manager; | |
| add_filter('jet-smart-filters/post-type/meta-fields-settings', 'custom_register_controls'); | |
| function custom_register_controls($fields) { | |
| $queries = Manager::instance()->get_queries_for_options(); |
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-form-builder/content-filters', function( $filters ) { | |
| class Get_Labels_By_Glossary extends \Jet_Form_Builder\Classes\Filters\Base_Filter { | |
| public function get_id(): string { | |
| return 'get_label_by_glossary'; | |
| } |
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/register-macros', function(){ | |
| class JEC_Queried_Term_Option extends \Jet_Engine\Macros\Queried_Term { | |
| /** | |
| * Macros tag - this macro will look like %current_user_prop|ID% if typed manually | |
| */ | |
| public function macros_tag() { | |
| return 'queried_term_option'; |
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 | |
| /** | |
| * Key points: | |
| * - refresh_user_date - hook name for the JetFormBuild Call a Hook action | |
| * - user_date - meta field we need to update | |
| * - DAY_IN_SECONDS - subscription cycle | |
| */ | |
| add_action( 'jet-form-builder/custom-action/refresh_user_date', function( $request ) { | |
| if ( ! empty( $request['user_id'] ) ) { | |
| $new_exp = time() + DAY_IN_SECONDS; |
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-search/tools/get-post-types', function( $post_types ) { | |
| $post_types['attachment'] = 'Media'; | |
| return $post_types; | |
| } ); | |
| add_filter( 'jet-search/ajax-search/query-args', function( $query ) { | |
| if ( in_array( 'attachment', $query['post_type'] ) ){ | |
| $query['post_status'] = [ 'any' ]; |
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 FIX_NESTED_POSTS { | |
| private $object = null; | |
| public function __construct() { | |
| if ( ! function_exists( 'jet_engine' ) ) { | |
| return; | |
| } | |
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; | |
| } | |
| $store_type = jet_abaf()->settings->get( 'filters_store_type' ); | |
| foreach ( $query['meta_query'] as $index => $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/final-query', function( $query ) { | |
| if ( empty( $query['meta_query'] ) ) { | |
| return $query; | |
| } | |
| foreach ( $query['meta_query'] as $index => $meta_query ) { | |
| if ( isset( $meta_query['key'] ) && '_seasonal_price' === $meta_query['key'] ) { // `_seasonal_price` unique key from Query Variable filter option. | |
| $excluded = jet_abaf_get_excluded_apartments( $meta_query['value'] ); |
NewerOlder