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( 'save_post_event', '__your_prefix__save_event_start_date_timestamp', 10, 3 ); | |
| function __your_prefix__save_event_start_date_timestamp( $post_id, $post, $update ) { | |
| if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { | |
| return; | |
| } | |
| $event_start_date = $_POST[ 'event_start_date' ]; |
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_filter( 'wp_dropdown_cats', 'remove_spacing_wp_dropdown_cats', 10, 2 ); | |
| function remove_spacing_wp_dropdown_cats( $output, $args ) { | |
| if ( $args['name'] === 'jet_ajax_search_categories' ) { | |
| $output = str_replace( ' ', '', $output ); | |
| } | |
| return $output; | |
| } |
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( 'elementor/widget/before_render_content', function( $widget ) { | |
| if ( 'shortcode' !== $widget->get_name() ) { | |
| return; | |
| } | |
| if ( false === strpos( $widget->get_settings_for_display( 'shortcode' ), '[HDquiz quiz' ) ) { | |
| 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
| /** | |
| * Adding custom icon to icon control in Elementor | |
| */ | |
| function jet_add_custom_icons_tab( $tabs = array() ) { | |
| // Append new icons | |
| $new_icons = array( | |
| 'account', | |
| 'airplane', | |
| 'wordpress', |
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_filter( 'jet-engine/listing/grid/posts-query-args', function ( $args ) { | |
| if ( in_array( 'tribe_events', $args['post_type'] ) ) { | |
| $args['suppress_filters'] = true; | |
| } | |
| return $args; | |
| } ); |
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
| function cf_search_join( $join ) { | |
| if ( is_admin() || ! is_search() ) { | |
| return $join; | |
| } | |
| global $wpdb; | |
| $join .= " LEFT JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_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
| add_action( 'init', function () { | |
| global $wp_scripts; | |
| $script = $wp_scripts->query( 'imagesloaded', 'registered' ); | |
| if ( ! $script ) { | |
| return; | |
| } | |
| if ( ! in_array( 'jquery', $script->deps ) ) { |
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_filter( 'the_posts', '__search_by_sku' ); | |
| function __search_by_sku( $posts ) { | |
| if ( is_admin() || ! is_search() ) { | |
| return $posts; | |
| } | |
| $ignoreIds = array( 0 ); | |
| foreach ( $posts as $post ) { |
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_filter( 'jet-engine/listings/filters-list', function( $list ) { | |
| $list['posts_list_by_ids'] = array( | |
| 'cb' => '__custom_posts_list_by_ids', | |
| 'args' => false, | |
| ); | |
| return $list; | |
| } ); |
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
| function rus_to_latin ( str ) { | |
| var ru = { | |
| 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', | |
| 'е': 'e', 'ё': 'e', 'ж': 'j', 'з': 'z', 'и': 'i', | |
| 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', | |
| 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', | |
| 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', | |
| 'щ': 'shch', 'ы': 'y', 'э': 'e', 'ю': 'u', 'я': 'ya' | |
| }, n_str = []; |