This file contains hidden or 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 | |
// uses Google's http://goo.gl/ URL shortener | |
/* Enter your url below */ | |
$url = "aroundtheweb.info"; | |
/* Function to get the short url */ | |
function get_short_url($url) { | |
$ch = curl_init("http://goo.gl/api/url?url=" . urlencode($url)); | |
curl_setopt($ch, CURLOPT_POST ,1); |
This file contains hidden or 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
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
This file contains hidden or 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 | |
add_filter( 'posts_clauses', 'filter_clauses', 10, 2 ); | |
/** | |
* Filtering everything. | |
* | |
* @param array $clauses Array with all parts of the query. | |
* @param WP_Query $wp_query Object. | |
* @return string |
This file contains hidden or 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
# Delete missing files | |
svn status | ? { $_ -match '^!\s+(.*)' } | % { svn rm $Matches[1] } | |
# Added new files | |
svn status | ? { $_ -match '^\?\s+(.*)' } | % { svn add $Matches[1] } | |
# Commit repository | |
svn commit -m "This commit is done by a PowerShell bat" |
This file contains hidden or 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
function woo_scripts_cleaner() { | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { | |
$woo_styles = [ | |
'woocommerce_frontend_styles', | |
'woocommerce-general', | |
'woocommerce-layout', | |
'woocommerce-smallscreen', | |
'woocommerce_fancybox_styles', | |
'woocommerce_chosen_styles', |