Skip to content

Instantly share code, notes, and snippets.

View andreiglingeanu's full-sized avatar

Andrei Glingeanu andreiglingeanu

View GitHub Profile
<?php
namespace Blocksy\DbVersioning;
class V200 {
public function migrate() {
}
}
<?php
// Current palette
$palette = blocksy_manager()->colors->get_color_palette();
print_r($palette);
// 1. Update palette
$current_palette = blocksy_get_theme_mod(
<?php
add_filter(
'blocksy:ext:woocommerce-extra:wish-list:enabled',
function ($has_wishlist, $place) {
if ($place === 'archive') {
// My logic here...
// true | false
return true;
}
<?php
if (! isset($selector)) {
$selector = ':root';
}
if (! isset($only_palette)) {
$only_palette = false;
}
<?php
remove_action(
'woocommerce_after_main_content',
'blocksy_woo_single_product_after_main_content',
5
);
<?php
remove_action(
'woocommerce_single_product_summary',
'blocksy_output_single_product_meta',
39
);
<?php
add_filter('blocksy:breadcrumbs:items-array', function ($items) {
if (! is_product()) {
return $items;
}
// Your custom condition
$product_should_not_have_breadcrumbs = true;
[
{
"title": "Toyota Auris 2017",
"price": 10300,
"date": "Bucuresti, Sectorul 1 - Reactualizat la 17 iulie 2023"
},
{
"title": "Toyota Corolla 2018, unic proprietar, TVA deductibil",
"link": "https://www.olx.ro/d/oferta/toyota-corolla-2018-unic-proprietar-tva-deductibil-IDhk7kM.html",
"price": 9990,
<?php
add_filter(
'blocksy:pro:post-types-extra:custom:collect-fields',
function ($fields, $post_type) {
if ($post_type !== 'post') {
return $fields;
}
$fields['test'] = __('Test Label', 'blocksy');
<?php
add_filter(
'blocksy:header:logo:image-id',
function ($image_id) {
// Other attachment ID
return 45;
}
);