Skip to content

Instantly share code, notes, and snippets.

'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(
/*
* ==============
/**
* 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;
}
/**
* 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() );
<?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'
*/
'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'),
# 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:
/*!
* 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
diff --git a/Gruntfile.js b/Gruntfile.js
index 53fe849..80ce14a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -56,6 +56,16 @@ module.exports = function (grunt) {
max_jshint_notifications: 5
}
},
+ uncss: {
+ gettingStarted: {
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function(grunt) {
// load all grunt tasks
require('load-grunt-tasks')(grunt);