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 | |
/** | |
* Put this into your functions.php of your child-theme or custom plugin | |
* you can create the role with wp-cli by running `wp shell` and running the command: | |
* add_role('merchant','Merchant',array('read' => true, 'delete_posts' => false) ); | |
*/ | |
/** | |
* Step #1: create the field used to store the new sale_price for product_variation and for products | |
*/ |
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
name: wordpress | |
recipe: wordpress | |
services: | |
appserver: | |
webroot: . | |
xdebug: debug | |
config: | |
php: .vscode/php.ini | |
tooling: | |
install:wordpress: |
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
const fs = require( 'fs' ) | |
const themeJson = fs.readFileSync( './theme.json' ) | |
const theme = JSON.parse( themeJson ) | |
const colors = theme.settings.color.palette.reduce( ( acc, item ) => { | |
const [color, number] = item.slug.split( '-' ) | |
// If there is a number identifier, make this an object | |
if(undefined !== number) { |