This file contains 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
/*! | |
* Grunt | |
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Sass |
This file contains 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
# Change Java Runtime: | |
sudo update-alternatives --config java | |
# Delete Open-JDK | |
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
# Change fonts - remove hinting: | |
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
# Change RubyMine AntiAliasing first: |
This file contains 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 strict'; | |
var gulp = require('gulp'), | |
connect = require('gulp-connect'), | |
gulpLoadPlugins = require('gulp-load-plugins'), | |
cleanhtml = require('gulp-cleanhtml'), | |
dev = require('gulp-dev'), | |
browserSync = require('browser-sync'), | |
plugins = gulpLoadPlugins(), | |
webpack = require('webpack'), |
This file contains 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 | |
//* Do NOT include the opening php tag | |
add_filter( "genesis_structural_wrap-footer-widgets", 'jmw_filter_footer_widgets_structural_wrap', 10, 2); | |
/** | |
* Filter the footer-widgets context of the genesis_structural_wrap to add a div before the closing wrap div. | |
* | |
* @param string $output The markup to be returned | |
* @param string $original_output Set to either 'open' or 'close' | |
*/ |
This file contains 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
/** | |
* Mostra as categorias associadas ao tema | |
*/ | |
add_action( 'woocommerce_after_shop_loop_item_title', 'mw_archive_add_theme_category', 5 ); | |
function mw_archive_add_theme_category() | |
{ | |
global $product; | |
$out = '<div class="product-categories">'; | |
$out .= strip_tags( $product->get_categories() ); |
This file contains 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
/** | |
* Sanitize File name during upload | |
* http://stackoverflow.com/questions/3259696/rename-files-during-upload-within-wordpress-backend | |
*/ | |
function make_filename_hash($filename) { | |
$info = pathinfo($filename); | |
$ext = empty($info['extension']) ? '' : '.' . $info['extension']; | |
$name = basename($filename, $ext); | |
return md5($name) . $ext; | |
} |
This file contains 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
'homepage' => array( | |
'existing_section' => false, | |
'args' => array( | |
'title' => __( 'HomePage Options', 'mw_theme_options' ), | |
'description' => __( 'Configure your homepage visualization options', 'mw_theme_options' ), | |
'priority' => 3 | |
), | |
'fields' => array( | |
/* | |
* ============== |
This file contains 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 | |
$args = array( | |
'post_type' => 'product', | |
'meta_key' => '_featured', | |
'meta_value' => 'yes', | |
'posts_per_page' => 6 | |
); | |
$featured_query = new WP_Query( $args ); | |
if ($featured_query->have_posts()) : | |
?> |
This file contains 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 | |
$args = array( | |
'post_type' => 'product', | |
'meta_query' => array( | |
'relation' => 'OR', | |
array( // Simple products type | |
'key' => '_sale_price', | |
'value' => 0, | |
'compare' => '>', | |
'type' => 'numeric' |
This file contains 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
add_filter( 'wp_nav_menu_items', 'your_custom_menu_item', 10, 2 ); | |
function your_custom_menu_item ( $items, $args ) { | |
if ($args->theme_location == 'header') { | |
$items .= '<li class="menu-item"><a id="openOptionsSidebar" class="shifter-handle">More</a></li>'; | |
} | |
return $items; | |
} |