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 | |
set -e | |
PHP_VERSION=7.0.0 | |
# Dependencies | |
apt-get update | |
apt-get install -y \ |
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: WooCommerce New Fields | |
Plugin URI: https://georgejipa.com/ | |
Description: Add new billing fields | |
Version: 1.0 | |
Author: George Jipa | |
Author URI: http://georgejipa.com | |
*/ |
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 | |
# Generate a Markdown change log of pull requests from commits between two tags | |
# Author: Russell Heimlich | |
# URL: https://gist.github.com/kingkool68/09a201a35c83e43af08fcbacee5c315a | |
# HOW TO USE | |
# Copy this script to a directory under Git version control | |
# Make the script executable i.e. chmod +x changelog.sh | |
# Run it! ./changelog.sh | |
# Check CHANGELOG.md to see your results |
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 | |
/** | |
* Insert an array into another array before/after a certain key | |
* | |
* @param array $array The initial array | |
* @param array $pairs The array to insert | |
* @param string $key The certain key | |
* @param string $position Wether to insert the array before or after the key | |
* @return 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 | |
add_action('wp_head', 'webworks_facebook_analytics'); | |
function webworks_facebook_analytics() { | |
if(current_user_can('manage_options')) { | |
return; | |
} | |
?> |
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 enqueue_assets() { | |
if (!is_singular()) { | |
return; | |
} | |
$content = get_post_field('post_content', get_the_ID()); | |
if (!has_shortcode($content, 'shortcode_name_here')) { | |
return; | |
} |
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 | |
trait EnhancedEnum | |
{ | |
/** | |
* Get the enum value from the name. e.g case INVOICE = 'invoice'; will return 'invoice' | |
* | |
* @param string $name | |
* @return static | |
*/ |
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
<div class="relative"> | |
<div id="#search-box"></div> | |
<div id="#hits"></div> | |
</div> |
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 | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |