I hereby claim:
- I am hugosolar on github.
- I am hsolar (https://keybase.io/hsolar) on keybase.
- I have a public key ASAt1Z0R_QV4ntyIrlfqgkVougp_9l6S2otDvPz3P3lRLgo
To claim this, I am signing this object:
<?php | |
/** | |
* Obtain youtube video API object and transients it | |
* eg. $video = new youtube_videos('simonscat'); | |
* $video->get_videos(array('offset' => 5,'num_videos' => 10)); | |
* @param $account string Account youtube name | |
* @return none | |
* @author Hugo Solar <contacto@hugosolar.net> | |
* */ |
#!/bin/bash | |
for file in ./front-themes/*; do | |
if [ -d $file ]; then | |
DIRECTORY="${file##"./front-themes/"}"; #obtenemos el nombre del directorio de origen y lo aislamos (debe haber algo mas elegante para hacerlo) | |
if [[ "$DIRECTORY" == *"-2013" ]]; then | |
STYLE1="$file/style.css"; #archivo fuente | |
STYLE2="./htdocs/wp-content/themes/$DIRECTORY/style.css"; #archivo destino | |
DIRECTORY2="./htdocs/wp-content/themes/$DIRECTORY/"; #directorio de destino | |
if [[ "$STYLE1" -nt "$STYLE2" ]]; then #comparamos si origen es mas nuevo que destino |
* significa que lo genera Grunt | |
------------------------------------ | |
. | |
|-- Gruntfile.js ( el de arriba) | |
|-- css | |
| |-- style.css (development *) | |
| `-- style.min.css ( production * ) | |
|-- font -> ../../framework/font | |
|-- img -> ../../framework/img | |
|-- index.html |
<?php | |
class videos { | |
/* function get_video | |
* Extract and return video id from youtbe & vimeo videos | |
* @param url : Video url | |
*/ | |
static function get_video($url,$width=560,$height=315) { | |
if (strstr($url,'youtube')){ | |
$parse_url=parse_url($url); | |
parse_str($parse_url['query']); |
<?php | |
error_reporting(0); | |
//FORM ID | |
$id_form = 8; | |
//manual translate of smileyrate | |
function smilley_translate($smile) { | |
switch ($smile) { | |
case 'frown': return 'molesto'; break; | |
case 'sad': return 'Muy insatisfecho(a)'; break; |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Change the placeholder image | |
*/ | |
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); | |
function custom_woocommerce_placeholder_img_src($src) | |
{ | |
global $post; | |
$terms = wp_get_post_terms($post->ID, 'product_cat'); | |
$thumbnail_id = get_woocommerce_term_meta($terms[0]->term_id, 'thumbnail_id', true); |