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
function remove_guten_wrapper_styles(){ | |
wp_dequeue_style( 'wp-block-library' ); | |
wp_dequeue_style( 'wp-block-library-theme' ); | |
wp_dequeue_style( 'wc-block-style' ); // REMOVE WOOCOMMERCE BLOCK CSS | |
wp_dequeue_style( 'global-styles' ); // REMOVE THEME.JSON | |
} |
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( 'block_editor_settings' , [$this, 'remove_guten_wrapper_styles'] ); | |
// disable Gutenberg for posts | |
add_filter('use_block_editor_for_post', '__return_false', 10); | |
// disable Gutenberg for post types | |
add_filter('use_block_editor_for_page', '__return_false', 10); | |
add_filter('should_load_block_editor_scripts_and_styles', '__return_false', 10); | |
remove_theme_support( 'editor-color-palette' ); | |
remove_theme_support( 'wp-block-styles' ); | |
remove_theme_support( 'core-block-patterns' ); |
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
// disable Gutenberg for posts | |
add_filter('use_block_editor_for_post', '__return_false', 10); | |
// disable Gutenberg for post types | |
add_filter('use_block_editor_for_page', '__return_false', 10); | |
add_filter('should_load_block_editor_scripts_and_styles', '__return_false', 10); | |
remove_theme_support( 'editor-color-palette' ); | |
remove_theme_support( 'wp-block-styles' ); | |
remove_theme_support( 'core-block-patterns' ); | |
remove_theme_support( 'editor-gradient-presets' ); | |
remove_theme_support( 'editor-font-sizes' ); |
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( 'woocommerce_package_rates', 'ras_custom_shipping_costs', 20, 2 ); | |
function ras_custom_shipping_costs( $rates, $package ) { | |
$weights_prices_field = get_field('shipping_weights', 'options'); | |
$weights_prices = []; | |
foreach ($weights_prices_field as $weights_price) { | |
$weights_prices[floatval($weights_price['weight'])] = floatval($weights_price['price']); | |
} | |
foreach( $rates as $rate_key => $rate ){ |
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
function filter_clinics_index( $query ) { | |
if ( !is_admin() && $query->is_main_query() && is_post_type_archive( 'clinic' )){ | |
$meta_query = $query->get('meta_query'); | |
if( is_array($meta_query) ) { | |
$meta_query['order_clinic_clause'] = [ | |
'key' => 'order_clinic', | |
'compare' => 'EXISTS', | |
'type' => 'NUMERIC' | |
]; |
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 static function getImage( $pic, $parent_id = '', $filename = false ) { | |
$server = WC_LI_Settings::SERVER; | |
$dev = get_option( 'wc_linet_dev' ); | |
if ( $dev == 'on' ) { | |
$server = WC_LI_Settings::DEV_SERVER; | |
} | |
$basePath = wp_upload_dir()['basedir'] . '/'; | |
if( $filename ) { |
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
<iframe src="https://iqosiframe2.ussl.co/" width="100%" height="200px" style="border: 0; position: fixed; left: 0; bottom: 0; width: 100%; max-height: 100%; transition: 0.15s ease-out height;" class="mozi_iframe"></iframe> | |
<script> | |
var eventMethod = window.addEventListener | |
? "addEventListener" | |
: "attachEvent"; | |
var eventer = window[eventMethod]; | |
var messageEvent = eventMethod === "attachEvent" | |
? "onmessage" |
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
<iframe src="https://iqosiframe.ussl.co/" width="100%" height="200px" style="border: 0; position: fixed; left: 0; bottom: 0; width: 100%; max-height: 100%; transition: 0.15s ease-out height;" class="mozi_iframe"></iframe> | |
<script> | |
var eventMethod = window.addEventListener | |
? "addEventListener" | |
: "attachEvent"; | |
var eventer = window[eventMethod]; | |
var messageEvent = eventMethod === "attachEvent" | |
? "onmessage" |
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('get_footer', function () { | |
wp_enqueue_script( 'selectWoo' ); | |
wp_enqueue_style( 'select2' ); | |
wp_enqueue_script( 'delivery-js' ); | |
}); ?> | |
<section class="delivery position-relative"> | |
<?php | |
$bg = get_sub_field('bg'); | |
if( isset($bg) && !empty($bg) ) { |
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
if ( false === ( $customQuery = get_transient( 'projectName_related_products' ) ) ) { | |
$args = [ | |
'post_type' => 'post', | |
]; | |
$customQuery = new WP_Query($args); | |
set_transient( 'projectName_related_products', $customQuery, 99999 * HOUR_IN_SECONDS ); | |
NewerOlder