document.addEventListener( 'jet-smart-filters/inited', function( initEvent ) {
console.log( 'filters init' );
} );
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-apb/time-slots/slots-html/slots-list', function( $slots, $format, $dataset, $date, $service, $provider ) { | |
| $duration = jet_apb()->calendar->get_schedule_settings( $provider, $service, null, 'default_slot' ); | |
| foreach ( $slots as $time => $slot ) { | |
| if ( $slot['to'] - $slot['from'] < $duration ) { | |
| unset( $slots[ $time ] ); | |
| } |
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 ) ) { | |
| return $query; | |
| } | |
| foreach ( $query as $var => $value ) { | |
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 | |
| /** | |
| * Functions may be used as a custom post type column callback | |
| */ | |
| /** | |
| * If the function name does not contain 'jet_engine_custom_cb' prefix, | |
| * the callback takes only two arguments: column name and post ID | |
| * You may use such callbacks if you do not need to specify any arguments | |
| * Example: show post author in a column |
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
| document.addEventListener( 'jet-smart-filters/inited', ( e ) => { | |
| jQuery( document ).on( 'jet-filter-content-rendered', function( event, $provider ) { | |
| $provider.find( '.variations_form' ).each( function() { | |
| jQuery( this ).wc_variation_form(); | |
| }); | |
| } ); | |
| jQuery( document ).on( 'jet-engine/listing-grid/after-load-more', function( event, args, response ) { | |
| if ( ! response.success ) { | |
| 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-form-builder/default-process-event/executors', | |
| 'jet_fb_custom_modify_default_executors', | |
| 11 | |
| ); | |
| /** | |
| * Works with JetFormBuilder >= 3.2 |
Call these methods not earlier than on 'init' with the priority of 12, queries are not registered before that
Returns an array of $id => $name
$queries = \Jet_Engine\Query_Builder\Manager::instance()->get_queries_for_options()ID is an integer, can be found in query URL in Query Builder; \
returns true/false; call not earlier than 'init' action with the priority of 1
$module_active = jet_engine()->modules->is_module_active( 'data-stores' );returns instance of \Jet_Engine\Modules\Data_Stores\Stores\Factory\
NewerOlder