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( | |
'blocksy:pro:woocommerce-extra:swatches:has-single-product-swatches', | |
function ($has_single_product_swatches) { | |
global $product; | |
$products_without_swatches = [ | |
// list all product IDs that should not have swatches | |
105, |
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
<!-- wp:greenshift-blocks/container {"id":"gsbp-0d5da125-696c","flexbox":{"type":"flexbox","flexDirection":["row"],"alignItems":["center"]}} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-0d5da125-696c" id="gspb_container-id-gsbp-0d5da125-696c"><!-- wp:greenshift-blocks/container {"id":"gsbp-75215e2d-0f25"} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-75215e2d-0f25" id="gspb_container-id-gsbp-75215e2d-0f25"><!-- wp:greenshift-blocks/container {"id":"gsbp-e8691acf-5cf5"} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-e8691acf-5cf5" id="gspb_container-id-gsbp-e8691acf-5cf5"><!-- wp:greenshift-blocks/swiper {"id":"gsbp-2572c851-1139","tabs":6,"slidesPerView":[2.2,null,null,null],"speed":8000,"loop":true,"autoplay":true,"autoplayRestore":true,"autodelay":0,"navigationarrows":false,"bullets":false,"overflow":true,"freemode":true,"linearmode":true,"freemodeSticky":true} --> | |
<div class="wp-blo |
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('wp_head', function () { | |
$term_id = get_queried_object_id(); | |
if (! is_woocommerce() || ! $term_id || is_product()) { | |
return; | |
} | |
$attachment_id = get_term_meta($term_id, 'thumbnail_id'); |
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( | |
'blocksy:pro:post-types-extra:acf:collect-fields', | |
function ($fields, $all_fields) { | |
$fields_to_allow = ['image']; | |
$result = []; | |
foreach ($all_fields as $single_field) { |
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('blocksy:woocommerce:product-single:layout', function ($layout) { | |
// Inspect layout for more info | |
foreach ($layout as $key => $value) { | |
if ($value['id'] === 'product_title') { | |
$layout[$key]['enabled'] = 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 | |
add_action( | |
'blocksy:woocommerce:product-single:price:after', | |
function () { | |
if (function_exists('woocommerce_gzd_template_loop_price_unit')) { | |
woocommerce_gzd_template_loop_price_unit(); | |
} | |
} | |
); |
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
# WARNING: Run all the commands one by one and carefully examine the output of each command | |
# 1. First run the replace with dry run, to see which tables exactly will be affected and how many replacements will be there. | |
wp search-replace --dry-run "paletteColor" "theme-palette-color-" | |
wp search-replace --dry-run "buttonInitialColor" "theme-button-background-initial-color" | |
wp search-replace --dry-run "var(--fontFamily)" "var(--theme-font-family)" | |
wp search-replace --dry-run "var(--color)" "var(--theme-text-color)" | |
# 2. Actually perform the replacement |
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 | |
namespace Blocksy; | |
class Plugin { | |
/** | |
* Blocksy instance. | |
* | |
* Holds the blocksy plugin instance. | |
* |
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
import { dispatch, select } from '@wordpress/data' | |
import swipercss from '!!raw-loader!../../../../libs/swiper/swiper-bundle.min.css' | |
import { applyFilters } from '@wordpress/hooks' | |
export default function gspb_Css_Final(id, final_css = '', props = {}) { | |
let inlineloading = false | |
if (greenShift_params.isSaveInline) { | |
inlineloading = true |
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 | |
namespace Blocksy\CustomPostType\Integrations; | |
class GreenShift extends \Blocksy\CustomPostTypeRenderer { | |
public function get_content($args = []) { | |
return \Blocksy\CustomPostTypeRenderer::NOT_IMPLEMENTED; | |
/* | |
$content_post = get_post($this->id); |