I hereby claim:
- I am CoenJacobs on github.
- I am coenjacobs (https://keybase.io/coenjacobs) on keybase.
- I have a public key whose fingerprint is 4925 71BD 1469 C165 B383 A62A 5D7F A24B B215 0324
To claim this, I am signing this object:
<?php | |
$result = wp_remote_get('yourredirectingdomain.com'); | |
$history = $result['http_response']->get_response_object()->history; | |
foreach( $history as $part ) { | |
echo $part->headers->getValues('location'); | |
} |
<?php | |
class MetaChecker { | |
public function checkMeta( WP_Post $post ) { | |
$value = get_post_meta($post->ID, 'key_of_value_store', true); | |
// @TODO: Do magic with $value | |
} | |
} |
<?php | |
class Object { | |
public function setup() { | |
add_action('init', array($this, 'init') ); | |
} | |
} |
<?php | |
namespace CoenJacobs\StefExample\PostTypes; | |
abstract class AbstractType { | |
public function setup() { | |
// possibly some setup logic here? | |
} | |
public function register() { |
I hereby claim:
To claim this, I am signing this object:
if ( $ip ) { | |
$parts = array_map( 'intval', explode( '.', $ip ) ); | |
if ( 127 === $parts[0] || 10 === $parts[0] | |
|| ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] ) | |
|| ( 192 === $parts[0] && 168 === $parts[1] ) | |
) { | |
// If host appears local, reject unless specifically allowed. | |
/** | |
* Check if HTTP request is external or not. | |
* |
#!/bin/bash | |
vagrant up | |
vagrant ssh << EOF | |
# If directory doesn't exist, clone the repository in ~/.dotfiles | |
if [ ! -d ~/.dotfiles ]; | |
then | |
git clone --recursive https://github.com/coenjacobs/dotfiles.git ~/.dotfiles | |
fi |
<?php | |
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 1, 10 ); | |
/* | |
* Return a new number of maximum columns for shop archives | |
* @param int Original value | |
* @return int New number of columns | |
*/ | |
function wc_loop_shop_columns( $number_columns ) { |
<?php | |
add_filter( 'woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args' ); | |
function custom_woocommerce_get_catalog_ordering_args( $args ) { | |
$orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); | |
if ( 'random_list' == $orderby_value ) { | |
$args['orderby'] = 'rand'; | |
$args['order'] = ''; |
<?php | |
/* | |
Plugin Name: WC Disable Shipping for Classes | |
Description: Disables specific shipping methods if there are products with one or more specified shipping classes in the cart. | |
Author: Coen Jacobs | |
Author URI: http://coenjacobs.me | |
Version: 1.0 | |
*/ |