This file contains 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
window.addEventListener( 'DOMContentLoaded', function() { | |
var $map = $( '.jet-map-listing' ); | |
if ( ! $map.length ) { | |
return; | |
} | |
$map.on( 'jet-filter-custom-content-render', function( event, response ) { |
This file contains 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/listing/calendar/before', function ( $settings, $render ) { | |
$calendar_id = 'custom_calendar'; | |
if ( empty( $settings['_element_id'] ) || $calendar_id !== $settings['_element_id'] ) { | |
return; | |
} | |
$posts_week_day = array(); | |
$date_key = $settings['group_by_key']; |
This file contains 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
1) Add `random_users` CSS ID for Listing Grid widget https://tppr.me/7S5Xg | |
2) Add follow code to the functions.php file of child theme: | |
add_action( 'jet-engine/listing/grid/users-query-args', function( $args, $render ) { | |
if ( 'random_users' !== $render->get( '_element_id' ) ) { | |
return $args; | |
} |
This file contains 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
$data = preg_replace_callback('!s:\d+:"(.*?)";!s', | |
function($m) { | |
return "s:" . strlen($m[1]) . ':"'.$m[1].'";'; | |
}, $data | |
); |
This file contains 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_filter( 'do_shortcode_tag', function ( $output, $tag, $attr ) { | |
if ( 'jet_engine' !== $tag ) { | |
return $output; | |
} | |
if ( empty( $attr['component'] ) || 'meta_field' !== $attr['component'] ) { | |
return $output; | |
} |
This file contains 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_filter( 'jet-engine/listing/grid/arrow-icons/options', function ( $options ) { | |
$options['my_icon'] = __( 'My icon', 'text-domain' ); | |
return $options; | |
} ); | |
add_filter( 'jet-engine/listing/grid/arrow-icon/my_icon', function ( $icon ) { | |
$icon = '<svg viewBox="0 0 179 179" xmlns="http://www.w3.org/2000/svg"><path transform="scale(0.1,-0.1) translate(0,-1536)" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 |
This file contains 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( 'admin_init', function () { | |
if ( ! isset( $_REQUEST['page'] ) ) { | |
return; | |
} | |
if ( ! isset( $_REQUEST['action'] ) || 'jet-engine-op-save-settings' !== $_REQUEST['action'] ) { | |
return; | |
} |
This file contains 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_filter( 'jet-engine/listing/grid/posts-query-args', function( $args ) { | |
$args['has_password'] = false; | |
return $args; | |
} ); |
This file contains 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_filter( 'jet-engine/listing/grid/posts-query-args', function( $args, $instance, $settings ) { | |
if ( ! empty( $args['post__in'] ) && ! empty( $args['post__not_in'] ) ) { | |
$args['post__in'] = array_diff( $args['post__in'], $args['post__not_in'] ); | |
} | |
return $args; | |
}, 20, 3 ); |
NewerOlder