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 | |
function my_facetwp_sort_options( $options, $params ) { | |
$options['rating'] = array( | |
'label' => 'Rating', | |
'query_args' => array( | |
'orderby' => 'meta_value_num', // sort by numerical custom field | |
'meta_key' => 'rating', // required when sorting by custom fields | |
'order' => 'DESC', // descending order | |
) |
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($) { | |
$(document).on('click', '.pagination a', function(e) { | |
e.preventDefault(); | |
var matches = $(this).attr('href').match(/\/page\/(\d+)/); | |
if (null != matches) { | |
FWP.paged = parseInt(matches[1]); | |
} | |
FWP.soft_refresh = true; | |
FWP.refresh(); | |
}); |
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 custom location rule type to column one for selecting an Event category | |
add_filter( 'acf/location/rule_types', 'mc_location_rule_types' ); | |
function mc_location_rule_types( $choices ) { | |
$choices['Events']['event_type'] = 'Event Type'; | |
return $choices; |
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_filter( 'gform_pre_render_9', 'uri_interested_property' ); | |
add_filter( 'gform_pre_validation_9', 'uri_interested_property' ); | |
add_filter( 'gform_pre_submission_9', 'uri_interested_property' ); | |
add_filter( 'gform_admin_pre_render_9', 'uri_interested_property' ); | |
/** | |
* Dynamically builds Gravity Fields dropdown for Property of Interest form field | |
* | |
* @param $form | |
* | |
* @return mixed |
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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
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 | |
function brrad_geocode($street_address,$city,$state){ | |
$street_address = str_replace(" ", "+", $street_address); //google doesn't like spaces in urls, but who does? | |
$city = str_replace(" ", "+", $city); | |
$state = str_replace(" ", "+", $state); | |
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=$street_address,+$city,+$state&sensor=false"; | |
$google_api_response = wp_remote_get( $url ); | |
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
jQuery( document ).ready( function ( $ ) { | |
'use strict'; | |
// Smooth scroll anchors | |
$( 'a[href*="#"]:not([href="#"])' ).click( function () { | |
if ( location.pathname.replace( /^\//, '' ) === this.pathname.replace( /^\//, '' ) && location.hostname === this.hostname ) { | |
var target = $( this.hash ); |
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
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, curl wget, rsync, git, subversion and composer. | |
# | |
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
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 | |
namespace Chouinard\Logo; | |
/** | |
* Class MCLoginLogo | |
* @package Chouinard\Logo | |
*/ | |
class MCLoginLogo { |