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
M500 ; reset EEPROM | |
G28 ; Home | |
M106 P0 S255 ; Set fan speed to 100% | |
M303 E0 S200 C8 U1 ; PID autotune extruder | |
M106 P0 S0 ; Turn off fan | |
M303 E-1 S50 C8 U1 ; PID autotune bed | |
M851 Z-1.0 ; Set z-offset | |
M503 ; Print current settings | |
M500 ; Save settings |
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 | |
remove_filter( 'woocommerce_cart_shipping_packages', 'dokan_custom_split_shipping_packages' ); | |
remove_filter( 'woocommerce_shipping_package_name', 'dokan_change_shipping_pack_name' ); | |
remove_action( 'woocommerce_checkout_create_order_shipping_item', 'dokan_add_shipping_pack_meta' ); | |
add_filter( 'woocommerce_shipping_methods', function($methods){ | |
unset( $methods['dokan_vendor_shipping'] ); | |
return $methods; | |
}, 11 ); |
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 | |
//FROM | |
//http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/ | |
//http://webstractions.com/wordpress/remove-recent-comments-inline-styl/ | |
//http://wpengineer.com/1438/wordpress-header/ | |
//https://github.com/boldperspective/Whiteboard-Framework | |
//REMOVE ADMIN BAR | |
add_filter( 'show_admin_bar', '__return_false' ); |
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 | |
/*--------------------- | |
Dashboard Menu Adjustments | |
---------------------*/ | |
// Only hide specific dashboard menu items on the live server. | |
// Show on localhost so we can control every component. | |
$whitelist = array('127.0.0.1','::1'); |
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
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
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_product_get_sale_price', 'fa_custom_sale_price', 10, 2 ); | |
add_filter( 'woocommerce_product_get_price', 'fa_custom_sale_price', 10, 2 ); | |
function fa_custom_sale_price( $sale_price, $product ) { | |
return $product->get_regular_price() * 0.5; | |
} |
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
/** | |
* Auto Complete all WooCommerce orders. | |
*/ | |
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); | |
function custom_woocommerce_auto_complete_order( $order_id ) { | |
if ( ! $order_id ) { | |
return; | |
} | |
$order = wc_get_order( $order_id ); |
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
/** | |
* Adds the ability to sort products in the shop based on the SKU | |
* Can be combined with tips here to display the SKU on the shop page: https://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
*/ | |
function sv_add_sku_sorting( $args ) { | |
$orderby_value = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); | |
if ( 'sku' == $orderby_value ) { |
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 a custom message about how long will take to delivery. | |
*/ | |
function my_wc_custom_cart_shipping_notice() { | |
echo '<tr class="shipping-notice"><td colspan="2"><small>'; | |
_e( '<strong>Atenção:</strong> O prazo de entrega começa a contar a partir da aprovação do pagamento.', 'my-text-domain' ); | |
echo '</small></td></tr>'; | |
} |
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 a detailed UI to WP's thumbnail HTML markup used in the Feature Image metabox. | |
* | |
* Adds a description of featured images, a listing of the formats used by GV and | |
* previews of how the images will appear in features slider and thumbnails. | |
* | |
* Note that $thumbnail_id is only saved when the post is saved. Immediately after the featured image is changed | |
* this value is updated, but not the postmeta field in the database (nor OUR fields which are tied to it) | |
* SO: |
NewerOlder