Codex: http://codex.wordpress.org/Function_Reference/add_menu_page
Available Dashicons: http://melchoyce.github.io/dashicons/
# Configuration file for varnish | |
# | |
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK | |
# to be set from this shell script fragment. | |
# | |
# Should we start varnishd at boot? Set to "no" to disable. | |
START=yes | |
# Maximum number of open files (for ulimit -n) |
# Default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
.connect_timeout = 60s; | |
.first_byte_timeout = 60s; | |
.between_bytes_timeout = 60s; | |
.max_connections = 800; | |
} |
Codex: http://codex.wordpress.org/Function_Reference/add_menu_page
Available Dashicons: http://melchoyce.github.io/dashicons/
require 'compass/import-once/activate' | |
# Require any additional compass plugins here. | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "/" # pour un otpout à la racine du projet | |
sass_dir = "sass" # pour un input dans le dossier sass | |
relative_assets = true # pour éviter les prb avec les sprites | |
images_dir = "images" # le nom du fichier image | |
javascripts_dir = "javascripts" |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
zip -r mes-logs.zip other_vhosts_access.log* | |
<?php | |
global $woocommerce; | |
$args = array( | |
'post_type' => 'shop_order', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'shop_order_status', |
<?php | |
function promo_product($productPromoID,$minItemBuy,$minPriceBuy){ | |
$productPromo = get_product($productPromoID); | |
// On vérifie si le produit à ofrir est en stock | |
if($productPromo->stock == 0 || $productPromo->stock < 0){ | |
define('PROMO', false);return false; | |
}else{ | |
define('PROMO', true); |
<?php | |
promo_product(get_field('gift-Product-ID','option'),2,18); | |
?> |
<?php | |
if ( is_user_logged_in() && ! current_user_can( 'manage_options' ) ) { | |
add_filter('show_admin_bar','__return_false'); | |
} | |
?> |