View gist:4d23ba7e821ab9c82dd899a3426177ce
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) { |
View gist:1adbb9c2e2a3361137a5a56e3782da54
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; | |
} | |
} |
View gist:1c41932e1fa78096f126f225a668a053
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(); | |
} | |
} | |
); |
View migrate.sh
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 |
View plugin.php
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. | |
* |
View test.js
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 |
View greenshift.php
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); |
View capabilities.php
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 Capabilities { | |
private $accounts_cache = null; |
View gist:621acbf0552060b672ddc2cb88b5e1b4
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( | |
'template_redirect', | |
function () { | |
if ( | |
is_singular() | |
|| | |
is_single() | |
) { |
View v2-0-0.php
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\DbVersioning; | |
class V200 { | |
public function migrate() { | |
} | |
} |
NewerOlder