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( 'wp_nav_menu', function( $nav_menu_html, $args ) { | |
if ( $args->menu_id == "ast-hf-menu-2" ) { | |
if ( apply_filters( 'litespeed_esi_status', false ) ) | |
return apply_filters( 'litespeed_esi_url', 'astra_secondary_menu', 'Secondary Menu', array( 'nav_menu_html' => $nav_menu_html, 'args' => $args ), $control = 'private,no-vary', $silence = false ); | |
} | |
return $nav_menu_html; | |
}, 10, 2); |
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( 'wp_nav_menu', function( $nav_menu_html, $args ) { | |
if ( $args->menu_id == "menu-id-to-replace" ) { | |
if ( apply_filters( 'litespeed_esi_status', false ) ) | |
return apply_filters( 'litespeed_esi_url', 'my-esi-menu', 'Navigation Menu', array( 'nav_menu_html' => $nav_menu_html, 'args' => $args ), $control = 'private,no-vary', $silence = false ); | |
} | |
return $nav_menu_html; | |
}, 10, 2); |
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( 'wc_square_digital_wallet_js_args', function ( $args ) { | |
if ( isset( WC()->cart ) && class_exists( 'WC_Smart_Coupons' ) ) { | |
$sc = WC_Smart_Coupons::get_instance(); | |
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { | |
$product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); | |
$coupon_titles = $sc->get_coupon_titles( array( 'product_object' => $product ) ); | |
if ( $coupon_titles ) { | |
$args['payment_request'] = array(); |
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
/** | |
* Subscription payment failed. | |
* | |
* 'payload' => array ( | |
* 'name' => '', // Subscription name | |
* 'amount' => 00.00, // Subscription price | |
* 'status' => 'suspended', // Subscription status | |
* 'profile' => array ( | |
* 'customerProfileId' => 123, |
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
/* Custom Divi Row Order .mobile_col_2_1 */ | |
@media all and (max-width: 980px) { | |
.mobile_col_2_1 { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
.mobile_col_2_1 .et_pb_column_1, | |
.mobile_col_2_1 .et_pb_column_1_2 { | |
order: 2; |
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('admin_head', 'yith_divi_color_picker_compatibility'); | |
function yith_divi_color_picker_compatibility() { | |
echo ' | |
<style> | |
.yith-plugin-ui .wp-picker-container a.wp-color-result { | |
width: 30px; | |
height: 30px; | |
box-shadow: none; |
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 | |
/** | |
* The Third Party integration with User Switching plugin. | |
* | |
* @since 2.9.9.2 | |
* @package LiteSpeed_Cache | |
* @subpackage LiteSpeed_Cache/thirdparty | |
* @author LiteSpeed Technologies <[email protected]> | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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( 'init', function() { | |
if ( method_exists( 'LiteSpeed_Cache_API', 'esi_enabled' ) && LiteSpeed_Cache_API::esi_enabled() ) { | |
LiteSpeed_Cache_API::hook_tpl_not_esi( function () { | |
add_filter( 'wp_nav_menu', function( $nav_menu_html, $args ) { | |
if ( $args->menu_id == "menu-id-to-replace" ) { | |
return LiteSpeed_Cache_API::esi_url( 'my_custom_menu_esi_hook', 'My Menu to Use with ESI' ); | |
} | |
return $nav_menu_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
public function __construct() { | |
// Stop any PDFs from being immediately generated (require Gravity Forms Delayed Email Notifications) | |
add_filter( 'gfpdf_maybe_attach_to_notification', array( $this, 'require_delayed_notifications' ), 10, 5 ); | |
} | |
public function require_delayed_notifications( $attach, $notification, $settings, $entry, $form ) { | |
// Disable Gravity PDF attachment if the notification has a flag (__AFTER_DELAY_FLAG__) letting us know that this notification is supposed to wait until after the delay | |
if ( preg_match( '/__AFTER_DELAY_FLAG__/', $notification['subject'] ) ) { | |
return false; |
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 | |
/** | |
* Remove Divi sidebar from all WooCommerce Product pages | |
*/ | |
function mytheme_divi_output_content_wrapper_end() { | |
echo ' | |
</div> <!-- #left-area --> | |
</div> <!-- #content-area --> | |
</div> <!-- .container --> | |
</div> <!-- #main-content -->'; |
NewerOlder