Settings, Commands etc....
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
$font-awesome: 'Font Awesome 5 Pro'; | |
$color-alert: #e74b4b; | |
a { | |
color: $color-alert !important; | |
padding-left: 1.65rem; | |
&:before { | |
position: absolute; | |
width: 0.9rem; |
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 | |
define('VENDOR_PLUGIN_TEMPLATE_PATH', plugin_dir_path( __FILE__ ).'/templates/'); | |
function override_template( $template, $template_name, $template_path ) { | |
$originTemplate = $template_path.$template_name; | |
$pluginTemplate = VENDOR_PLUGIN_TEMPLATE_PATH.$originTemplate; | |
if(file_exists($pluginTemplate)) { | |
$template = $pluginTemplate; |
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('admin_footer-post-new.php', 'wp_admin_default_media_attachment_filter'); | |
add_action('admin_footer-post.php', 'wp_admin_default_media_attachment_filter'); | |
function wp_admin_default_media_attachment_filter() | |
{ | |
?> | |
<script type="text/javascript"> | |
jQuery(document).on("DOMNodeInserted", function () { | |
jQuery('select.attachment-filters [value="uploaded"]').attr('selected', true).parent().trigger('change'); |
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('wpcf7_skip_mail', function ($skip_mail, $contact_form) { | |
$skip = [ | |
'1', | |
'2', | |
'3', | |
]; | |
return in_array($contact_form->id(), $skip); |
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 | |
// Source: https://woocommerce.com/document/hide-other-shipping-methods-when-free-shipping-is-available/ | |
/** | |
* Hide shipping rates when free shipping is available. | |
* Updated to support WooCommerce 2.6 Shipping Zones. | |
* | |
* @param array $rates Array of rates found for the package. | |
* @return array |
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_register_post_type_product', 'wc_add_revision_support' ); | |
function wc_add_revision_support( $args ) { | |
$args['supports'][] = 'revisions'; | |
return $args; | |
} |
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 App\Nova; | |
use Illuminate\Database\Eloquent\Builder; | |
use Laravel\Nova\Http\Requests\NovaRequest; | |
use Laravel\Nova\Resource as NovaResource; | |
use Laravel\Scout\Builder as ScoutBuilder; | |
abstract class Resource extends NovaResource |
Create if not exist resources/views/vendor/nova/partials/meta.blade.php
Add your elements in this file:
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/[YOUR-ID].js" crossorigin="anonymous"></script>
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_email_attachments', function ($attachments, $emailId, $order) { | |
/* @var WC_Order $order */ | |
$attachTo = [ | |
'new_order', | |
'customer_on_hold_order', | |
'customer_processing_order', | |
'customer_completed_order', | |
'customer_refunded_order', |