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
<?php | |
add_filter( 'slim_seo_bricks_skipped_elements', function( $elements ) { | |
$elements[] = 'jet-engine-listing-grid'; | |
return $elements; | |
} ); |
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
<?php | |
add_filter( 'jet-engine/listing/render/default-settings', function( $settings ){ | |
$settings['jet_break_alphabetically'] = $settings['jet_break_alphabetically'] ?? false; | |
$settings['jet_break_by_prop'] = $settings['jet_break_by_prop'] ?? false; | |
$settings['jet_break_markup'] = $settings['jet_break_jet_break_markupalphabetically'] ?? false; | |
return $settings; | |
} ); | |
add_filter( 'jet-engine/listing/grid/nav-widget-settings', function( $nav, $settings ) { |
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
<?php | |
add_filter( 'jet-form-builder/form-refer-url', function ( $refer ) { | |
if ( empty( $_POST['action'] ) || $_POST['action'] !== 'jet_popup_get_content' ) { | |
return $refer; | |
} | |
$url = $_POST['data']['page_url'] ?? ''; | |
if ( empty( $url ) ) { |
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
<script> | |
document.addEventListener( 'DOMContentLoaded', function() { | |
if ( ! window?.JetPlugins?.hooks ) { | |
return; | |
} | |
const { | |
addAction, | |
} = window.JetPlugins.hooks; |
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
<?php | |
add_action( 'jet-engine/component/before-content', function( $component ) { | |
add_filter( 'oembed_result', 'jet_components_fix_oembed_vars', 99 ); | |
} ); | |
add_action( 'jet-engine/component/after-content', function() { | |
remove_filter( 'oembed_result', 'jet_components_fix_oembed_vars', 99 ); | |
} ); | |
function jet_components_fix_oembed_vars( $html ) { |
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
<?php | |
add_action( 'jet-form-builder/custom-action/update-user-address', function( $request ) { | |
if ( ! function_exists( 'jet_engine' ) ) { | |
return; | |
} | |
if ( empty( $request['user_id'] ) ) { | |
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
<?php | |
add_filter( 'jet-engine/custom-content-types/update-item/sanitize-field-value', function( $value, $field_name, $field ) { | |
if ( ! is_string( $value ) ) { | |
return $value; | |
} | |
if ( empty( $field['type'] ) || ! in_array( $field['type'], array( 'text', 'textarea' ) ) ) { | |
return $value; | |
} |
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
//assuming the ID of the form is 1709, and map field name if 'map1' | |
const formId = 1709; | |
const mapFieldName = 'map1'; | |
const observable = JetFormBuilder[ formId ]; | |
const mapField = observable.getInput( mapFieldName ); |
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
<?php | |
//Google maps | |
add_filter( 'jet-engine/maps-listings/autocomplete-url-args/google', function($args){ | |
$args['components'] = 'country:de|country:at|country:ch'; | |
return $args; | |
} ); | |
//Openstreetmaps |
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
<?php | |
class JFB_Autoembed_Fix { | |
public function __construct() { | |
add_filter( 'jet-form-builder/before-start-form', array( $this, 'add_filter' ) ); | |
add_filter( 'jet-form-builder/after-end-form', array( $this, 'remove_filter' ) ); | |
} | |
public function add_filter( $start ) { |
NewerOlder