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
# Habilitar o PHP 7.0 | |
AddHandler application/x-httpd-php70 .php | |
<IfModule mod_suphp.c> | |
suPHP_ConfigPath /opt/php70/lib | |
</IfModule> |
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
INSERT INTO `wp_terms` (`term_id`, `name`, `slug`, `term_group`) VALUES | |
(63, 'AC', 'ac', 0), | |
(64, 'Acre', 'acre', 0), | |
(65, 'Acrelândia', 'acrelandia', 0), | |
(66, 'Assis Brasil', 'assis-brasil', 0), | |
(67, 'Brasiléia', 'brasileia', 0), | |
(68, 'Bujari', 'bujari', 0), | |
(69, 'Capixaba', 'capixaba', 0), | |
(70, 'Cruzeiro do Sul', 'cruzeiro-do-sul', 0), |
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 | |
// Modify the default WooCommerce orderby dropdown | |
// | |
// Options: menu_order, popularity, rating, date, price, price-desc | |
// In this example I'm removing price & price-desc but you can remove any of the options | |
function my_woocommerce_catalog_orderby( $orderby ) { | |
unset($orderby["price"]); | |
unset($orderby["price-desc"]); | |
return $orderby; | |
} |
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 | |
/** | |
* Plugin Name: Replace WordPress Dashboard | |
* Description: Replaces the default WordPress dashboard with a custom one. | |
* Author: Micah Wood | |
* Author URI: http://micahwood.me | |
* Version: 0.1 | |
* License: GPL3 | |
*/ |
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 | |
/** | |
* Disables repeat purchase for products / variations | |
* | |
* @param bool $purchasable true if product can be purchased | |
* @param \WC_Product $product the WooCommerce product | |
* @return bool $purchasable the updated is_purchasable check | |
*/ | |
function sv_disable_repeat_purchase( $purchasable, $product ) { |
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
add_filter( 'woocommerce_product_tabs', 'wcs_woo_remove_reviews_tab', 98 ); | |
function wcs_woo_remove_reviews_tab($tabs) { | |
unset($tabs['reviews']); | |
return $tabs; | |
} |
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 | |
// hide coupon on cart | |
function hide_coupon_on_cart( $enabled ) { | |
if ( is_cart() ) { | |
$enabled = false; | |
} | |
return $enabled; | |
} | |
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_on_cart' ); |
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 | |
/* | |
* | |
* | |
* REMOVER WORDPRESS SUBMENU EN ADMIN BAR | |
* | |
* | |
*/ | |
if (!current_user_can('administrator')): |
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 items from the admin bar to not administrators | |
add_action( 'wp_before_admin_bar_render', 'hide_before_admin_bar_render' ); | |
function hide_before_admin_bar_render() { | |
if (!current_user_can('administrator')) { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('wp-logo'); //WordPress Logo | |
$wp_admin_bar->remove_menu('site-name'); //Site Name | |
$wp_admin_bar->remove_menu('view-site'); //View Site | |
$wp_admin_bar->remove_menu('comments'); //Comments |