@extend('app')
@section('stuff')
Stuff goes here...
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('woocommerce_shipping_chosen_method', function ($default, $rates = [], $chosen_method = null) { | |
$rates = $rates ? (array)$rates : []; | |
if ($chosen_method and isset($rates[(string)$chosen_method])) { | |
return $chosen_method; | |
} | |
return $default; | |
}, 10, 3); |
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 | |
$file_path = $argv[1] ?? null; | |
$file_path_abs = ''; | |
if (!$file_path) { | |
throw new \Error('No file Path arg provided'); | |
} | |
if (is_readable($file_path)) { | |
$file_path_abs = $file_path; |
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 | |
/** | |
* Usage | |
* bem-block-rename.php ./templates/ .renaming-block-name .destination-block-name # will change every `.blade.php` in directory | |
* bem-block-rename.php .renaming-block--with-mod .dest-block--with-renamed-mode # will change every `.blade.php` in CWD directory | |
* bem-block-rename.php specified-file.php .renaming-block-name__child .destination-block-name__renamed-child # will change only `specified-file.php` | |
*/ | |
namespace BemClassesTools; |
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 | |
/** | |
* Adds classes for menu link | |
* If menu container has classes [base-menu baseMenu] | |
* than links will get classes [base-menu--link baseMenuLink] | |
*/ | |
add_filter('nav_menu_link_attributes', function ($atts, $item, $args, $depth) | |
{ | |
$classes = explode(' ', $args->container_class ?: $args->menu_class); |
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
# For production no filters will be applied | |
WP_ENV=development | |
WP_HOME=http://example.com | |
WP_SITEURL=${WP_HOME}/wp | |
# Should be defined for staging and development, has no effect for production | |
UPLOADS_URL='http://example.com/app/uploads' | |
# Should be defined for development, maybe skipped for staging if Bedrock used | |
UPLOADS_URL_STAGING='//stage.example.com/app/uploads' |
Allows to link any domain to use with Valet / Valet+.
You a free to use any domain name, e.g.: dev.exmaple.com
, google.com
, etc. Not only .test
domains.
Add new config file for Dnsmasq:
sudo echo "conf-file=$HOME/.valet/dnsmasq-extra-domains.conf" >> $(brew --prefix)/etc/dnsmasq.conf
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 VerticalAlignOptions from "./VerticalAlignOptions.jsx" | |
const | |
{InspectorControls} = wp.editor, | |
{PanelBody} = wp.components, | |
{__} = wp.i18n | |
export default function ColumnsInspectorControls(props) { | |
const {attributes, setAttributes, usePanel} = props |