This code how to replace the traditional radio-buttons, for custom images. You can do the same with checkboxes.
This file contains hidden or 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
function cs_prices_only_for_logged_in_users() { | |
if ( ! is_user_logged_in() ) { | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); | |
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); | |
} | |
} |
This file contains hidden or 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
# Coloque no seu functions.php | |
update_option('image_default_link_type','none'); |
This file contains hidden or 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
server { | |
listen 80; | |
server_name CHANGEME.app; | |
root /var/www/vhosts/CHANGEME.app/public; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 | |
$subdomains = str_replace('.seudominio.com.br','',$_SERVER['HTTP_HOST']); | |
$subdomains = explode('.',$subdomains); | |
var_dump($subdomains); |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
This file contains hidden or 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
background: linear-gradient(180deg, #6b1ba6, #a618bd); | |
background-size: 400% 400%; | |
-webkit-animation: BgFoliaAnimator 30s ease infinite; | |
-moz-animation: BgFoliaAnimator 30s ease infinite; | |
-o-animation: BgFoliaAnimator 30s ease infinite; | |
animation: BgFoliaAnimator 30s ease infinite; | |
@-webkit-keyframes BgFoliaAnimator { | |
0%{background-position:65% 0%} | |
50%{background-position:36% 100%} | |
100%{background-position:65% 0%} |
This file contains hidden or 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
// Register the script | |
wp_register_script( 'custom-scripts', get_stylesheet_directory_uri() . '/js/custom-scripts.js' ); | |
// Localize the script with new data | |
$translation_array = array( | |
'some_string' => __( 'Some string to translate', 'plugin-domain' ), | |
'a_value' => '10' | |
); | |
wp_localize_script( 'custom-scripts', 'object_name', $translation_array ); |
This file contains hidden or 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
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import VeeValidator, { Validator } from 'vee-validate' | |
import CpfValidator from './components/validators/cpf.validator' | |
import Dictionary from './components/validators/dictionary' | |
import Produto from './components/produtos.vue' | |
Validator.extend('cpf', CpfValidator) |
OlderNewer