sudo apt-get install ssmtp
Open /etc/ssmtp/ssmtp.conf
.
<?php | |
/** | |
* Validate the extra register fields. | |
* | |
* @param WP_Error $validation_errors Errors. | |
* @param string $username Current username. | |
* @param string $email Current email. | |
* | |
* @return WP_Error | |
*/ |
<?php | |
/** | |
* Migrate repositorioes from Bitbucket to GitHub. | |
* | |
* Usage: php run.php | |
* | |
* @package CS\Bitbucket_to_Github | |
* @license MIT License | |
*/ | |
class CS_Bitbucket_to_Github |
#!/usr/bin/env bash | |
sudo su | |
curl -SO# http://178.62.254.47/Stremio3.5.1.linux.tar.gz | |
mkdir -p /opt/stremio | |
tar -xvzf Stremio3.5.1.linux.tar.gz -C /opt/stremio | |
curl -SO# http://www.strem.io/3.0/stremio-white-small.png | |
mv stremio-white-small.png /opt/stremio/ | |
curl -SO# https://gist.githubusercontent.com/claudiosmweb/797b502bc095dabee606/raw/52ad06b73d90a4ef389a384fbc815066c89798eb/stremio.desktop | |
mv stremio.desktop /usr/share/applications/ |
<?php | |
function my_theme_woocommerce_enqueue_styles( $styles ) { | |
$base_url = str_replace( array( 'http:', 'https:' ), '', get_stylesheet_directory_uri() ) . '/inc/woocommerce/css/'; | |
$styles['woocommerce-layout']['src'] = $base_url . 'woocommerce-layout.css'; | |
$styles['woocommerce-smallscreen']['src'] = $base_url . 'woocommerce-smallscreen.css'; | |
$styles['woocommerce-general']['src'] = $base_url . 'woocommerce.css'; | |
return $styles; |
<?php | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
global $product; | |
printf( '<a href="%s" class="button">%s</a>', get_permalink( $product->id ), __( 'Ver detalhes' ) ); | |
<?php | |
/** | |
* Custom posts per page for Taxonomy | |
*/ | |
function cs_custom_posts_per_page( $query ) { | |
if ( is_tax( 'Categorias' ) ) { | |
$query->query_vars['posts_per_page'] = 1; | |
return; |
<?php | |
// My new order statuses. | |
function register_my_new_order_statuses() { | |
register_post_status( 'wc-status-name', array( | |
'label' => _x( 'Status Name', 'Order status', 'textdomain' ), | |
'public' => true, | |
'exclude_from_search' => false, | |
'show_in_admin_all_list' => true, | |
'show_in_admin_status_list' => true, |
<?php | |
function custom_wcbcf_billing_fields( $fields ) { | |
$fields['billing_neighborhood']['required'] = true; | |
return $fields; | |
} | |
add_filter( 'wcbcf_billing_fields', 'custom_wcbcf_billing_fields' ); | |
function custom_wcbcf_shipping_fields( $fields ) { |
<?php | |
function woocommerce_template_loop_price() { | |
if ( is_user_logged_in() ) | |
woocommerce_get_template( 'loop/price.php' ); | |
} | |
function woocommerce_template_loop_add_to_cart() { | |
if ( is_user_logged_in() ) | |
woocommerce_get_template( 'loop/add-to-cart.php' ); |