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 | |
| /** | |
| * Gets the coordinates from an address via Google Geocode API | |
| * | |
| * @param string $address The address to fetch coordinates from | |
| * | |
| * @return object An object with the necessary values. | |
| **/ | |
| function get_location( $address ) { |
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
| /** | |
| * An improved version for loading template parts. | |
| * | |
| * Load a template part into a template | |
| * | |
| * Makes it easy for a theme to reuse sections of code in a easy to overload way | |
| * for child themes. | |
| * | |
| * Includes the named template part for a theme or if a name is specified then a | |
| * specialised part will be included. If the theme contains no {slug}.php file |
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
| /** | |
| * Filters the query | |
| * | |
| * @param string $query The query instance | |
| * @param array $sql The array of the query to be run | |
| * | |
| * @return array | |
| **/ | |
| function bp_filter_member_query( $query, $sql ) { |
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
| @mixin breakpoint($breakpoint, $orientation:"") { | |
| $break: $breakpoint; | |
| $orient: ""; | |
| @if $breakpoint == 'small' { | |
| $break: $small-only; |
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 id_replace_images($content) { | |
| $dom = new domDocument; | |
| $dom->loadHTML('<?xml encoding="UTF-8">' . $content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); | |
| // dirty fix | |
| foreach ($dom->childNodes as $elem) | |
| if ($elem->nodeType == XML_PI_NODE) | |
| $dom->removeChild($elem); // remove hack |
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
| #!/bin/sh | |
| # default path | |
| dir="$PWD" | |
| parentdir="$(dirname "$dir")" | |
| template="$dir/template" | |
| subdomains="$parentdir/subdomains" | |
| domain="dev.anunatak.com" | |
| # ask for template path |
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
| [ | |
| { | |
| "featureType":"administrative", | |
| "elementType":"labels.text.fill", | |
| "stylers":[ | |
| { | |
| "color":"#444444" | |
| } | |
| ] | |
| }, |
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
| #!/bin/sh | |
| echo "%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#" | |
| INSTALL="none" | |
| VAGRANT="$HOME/vagrant-local" | |
| while getopts :n:u:v FLAG; do | |
| case $FLAG in | |
| n) #set option "a" |
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
| add_action('pre_get_posts', function($query) { | |
| if(is_admin()) { | |
| return; | |
| } | |
| if(!$query->is_main_query()) { | |
| return; | |
| } | |
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
| #!/bin/bash | |
| # Run wp-cli as vagrant user | |
| if (( $EUID == 0 )); then | |
| wp() { sudo -EH -u vagrant -- wp "$@"; } | |
| fi | |
| # RESTART SERVICES | |
| # | |
| # Make sure the services we expect to be running are running. |