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 JetEngineDlUrlSaver { | |
private $url = ''; | |
private static $instance = null; | |
private function __construct() { | |
add_filter( 'jet-engine/listings/dynamic-link/pre-render-link', array( $this, 'store_url' ), 100000, 4 ); | |
} |
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 | |
/** | |
* How to use: | |
* 1. Add this code to your website with any code snippets plugin or into functions.php of your active theme. | |
* 2. In your admin area go to JetEngine/Macros Generator, generate and copy macros you need. | |
* 3. Use this macros anywhere with shortcode in following format: [jet_engine_macros macros="%generated_macros%"] | |
* | |
* Real world example: | |
* [jet_engine_macros macros="%jet_engine_field_name|event_date|field_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 | |
add_filter( 'jet-form-builder/form-action-url', function( $url ) { | |
$form_id = ( int ) ( jet_fb_live()->form_id ?? 0 ); | |
if ( $form_id === 12598 ) { | |
return 'https://google.com'; | |
} | |
return $url; |
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 JE_Component_Shortcode { | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ), 100 ); | |
} | |
public function init() { | |
if ( ! function_exists( 'jet_engine' ) ) { |
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 JFB_Currency_Mask { | |
private $processed = false; | |
public function __construct() { | |
add_filter( 'jet-form-builder/render/text-field/attributes', array( $this, 'process_fields' ), 10, 2 ); | |
} | |
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( 'slim_seo_bricks_skipped_elements', function( $elements ) { | |
$elements[] = 'jet-engine-listing-grid'; | |
return $elements; | |
} ); |
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 JBBP_Terms_Fix { | |
public function __construct() { | |
add_filter( 'jet-engine/listing/render/default-settings', array( $this, 'default_settings' ) ); | |
add_filter( 'jet-engine/listing/grid/nav-widget-settings', array( $this, 'nav_settings' ), 10, 2 ); | |
add_filter( 'jet-engine-break-alphabetically/prev-post', array( $this, 'prev_term' ), 100, 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 | |
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 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
<script> | |
document.addEventListener( 'DOMContentLoaded', function() { | |
if ( ! window?.JetPlugins?.hooks ) { | |
return; | |
} | |
const { | |
addAction, | |
} = window.JetPlugins.hooks; |