The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| <?php | |
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
| <?php | |
| /* | |
| // Añadimos un campo llamado user_telephone | |
| - ojo al if(!is_admin ) | |
| - ojo en que fichero se meten las líneas de códigon ( tenemos tres ficheros ) | |
| - dependencia del plugin Theme My Login | |
| */ | |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| background: linear-gradient(270deg, #9c8078, #e2c383, #debd7a, #eab489, #f9ddc6, #eac083, #e6cab2); | |
| background-size: 1400% 1400%; | |
| -webkit-animation: AnimationName 30s ease infinite; | |
| -moz-animation: AnimationName 30s ease infinite; | |
| -o-animation: AnimationName 30s ease infinite; | |
| animation: AnimationName 30s ease infinite; | |
| @-webkit-keyframes AnimationName { | |
| 0%{background-position:0% 50%} | |
| 50%{background-position:100% 50%} | |
| 100%{background-position:0% 50%} |
| <?php | |
| /** | |
| * Change text strings | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function my_text_strings( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Sale!' : | |
| $translated_text = __( 'Clearance!', 'woocommerce' ); |
| // dev note: make sure to use an autoprefixer... | |
| @mixin underline($background: #fff, $text: #000, $selection: #ffc, $position: 86%){ | |
| color: inherit; | |
| text-decoration: none; | |
| background: linear-gradient($background, $background), linear-gradient($background, $background), linear-gradient($text, $text); | |
| background-size: .05em 1px, .05em 1px, 1px 1px; | |
| background-repeat: no-repeat, no-repeat, repeat-x; | |
| text-shadow: 0.03em 0 $background, -0.03em 0 $background, 0 0.03em $background, 0 -0.03em $background, 0.06em 0 $background, -0.06em 0 $background, 0.09em 0 $background, -0.09em 0 $background, 0.12em 0 $background, -0.12em 0 $background, 0.15em 0 $background, -0.15em 0 $background; | |
| background-position-y: $position,$position, $position; |
| var selector = 'img' // Replace this with the selector for the element you want to make transformable | |
| jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() { | |
| jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() { | |
| (function() { | |
| var $, applyTransform, getTransform, makeTransformable; | |
| $ = jQuery; |