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 | |
$bp_filetypes = array('128x128.png','128x128.jpg','256x256.png','256x256.jpg','logo.svg'); | |
foreach ($bp_filetypes as $bp_filetype) { | |
$logo_item = $bp_filetype; | |
$url = 'http://ps.w.org/' . $pb_plugin_item[plugin_slug] . '/assets/icon-' . $logo_item; | |
//echo $url; |
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
// Open chrome://cache/ and paste the following script in the console. Feel free to edit the filter variable | |
var filter = /cask\.scotch\.io(.)*\.(jpg|jpeg|png|gif)/g; | |
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ | |
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);retu |
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
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: openbazaar | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/stop openbazaar server | |
# Description: Start the openbazaar server as a specified user | |
### END INIT INFO |
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
<select name="currency_code"> | |
<option value="">Select Currency</option> | |
<option value="AUD">Australian Dollar</option> | |
<option value="BRL">Brazilian Real </option> | |
<option value="CAD">Canadian Dollar</option> | |
<option value="CZK">Czech Koruna</option> | |
<option value="DKK">Danish Krone</option> | |
<option value="EUR">Euro</option> | |
<option value="HKD">Hong Kong Dollar</option> | |
<option value="HUF">Hungarian Forint </option> |
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
/* WC Vendors Pro -- No % for commission, just a tiered fee structure */ | |
add_filter( 'wcv_commission_rate', 'my_wcv_commission_rate', 10, 5 ); | |
function my_wcv_commission_rate( $commission, $product_id, $product_price, $order, $qty ) { | |
// First, reduce price to qty1 to do calculations | |
$product_price = $product_price / $qty; | |
// Second, run through the price and apply the right commission fee | |
if ( $product_price > 48.99 ) { | |
$commission_fee = 3.36; |
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 | |
/* | |
Plugin Name: User Meta Upload | |
Plugin URI: http://trepmal.com | |
Description: Add a file-upload form to the user edit profile page | |
Version: 0.1 | |
Author: Kailey Lampert | |
Author URI: http://kaileylampert.com | |
Copyright (C) 2012 Kailey Lampert |
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
/** | |
* Update post meta key via ajax POST request | |
* | |
* @see http://wpquestions.com/question/showLoggedIn/id/10604 | |
* | |
* On the remote site send a POST request to: | |
* | |
* http://example.tld/wp-admin/admin-ajax.php?action=update_post_meta | |
* | |
* with the following payload: |
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
function cart_empty_redirect_to_shop() { | |
global $woocommerce; | |
if ( is_page('cart') and !sizeof($woocommerce->cart->cart_contents) ) { | |
wp_redirect( get_permalink( wc_get_page_id( 'shop' ) ) ); exit; | |
} | |
} | |
add_action( 'wp_head', 'cart_empty_redirect_to_shop' ); |
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
/** | |
* Block dependencies | |
*/ | |
import icon from './icon'; | |
import SelectTeam from '../select-team'; | |
//import './style.scss'; | |
import './editor.scss'; | |
/** | |
* Internal block libraries |
OlderNewer