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
$("#suburbs_lookup").autocomplete({ | |
minLength:3, | |
source: function (request, response) { | |
var term = request.term; | |
$.ajax({ | |
type: 'POST', | |
url: 'http://ppdre.com.au/autosuggest/', | |
dataType: 'json', | |
data: { |
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
// Gravity Forms - Suburb Auto Suggest. | |
add_filter( 'gform_add_field_buttons', 'add_suburbs_field' ); | |
function add_suburbs_field( $field_groups ) { | |
foreach ( $field_groups as &$group ) { | |
if ( $group['name'] == 'advanced_fields' ) { | |
$group['fields'][] = array( | |
'class' => 'button', | |
'data-type' => 'suburbs', | |
'value' => __( 'Suburbs', 'gravityforms' ), |
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
var done = false; | |
function addEvent(obj, evt, fn) { | |
if (obj.addEventListener) { | |
obj.addEventListener(evt, fn, false); | |
} | |
else if (obj.attachEvent) { | |
obj.attachEvent("on" + evt, fn); | |
} | |
} |
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 get_posts_for_pagination() { | |
$html = ''; | |
$paged = ( $_GET['page'] ) ? $_GET['page'] : 1; | |
$post_type = $_GET['posttype']; | |
if ( empty($post_type) ) { | |
return ''; | |
} | |
if( filter_var( intval( $paged ), FILTER_VALIDATE_INT ) ) { |
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("gform_pre_submission_filter", "after_submission", 10, 2); | |
function after_submission($form) { | |
//only process if this is the profile details form | |
if($form["id"] == 12) { | |
//save data and notify admin that data has been updated. |
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
<html> | |
<head> | |
<title></title> | |
<script src="jquery.min.js"></script> | |
<script type='text/javascript' src="http://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.1/jquery.xdomainrequest.min.js"></script> | |
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/hmac-sha1.js"></script> | |
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-base64-min.js"></script> | |
<script type="text/javascript"> |
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
/* | |
Permalink structure: | |
/blogs | |
/blogs/page/%n% | |
/blogs/article/%post% | |
/blogs/%term% | |
/blogs/%term%/page/%n% | |
/blogs/%term%/%post% |
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 | |
if ( !class_exists( 'GFForms' ) || !defined( 'WPINC' ) ) { | |
return; | |
} | |
class BTFunds { | |
/** | |
* Dashboard-only initialization. | |
*/ |
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
var poll; | |
var timeout = 100; // gives up after 10 seconds | |
poll = function () { | |
setTimeout(function () { | |
timeout--; | |
if ( $('#myid').length === 1 ) { | |
var script= document.createElement('script'); | |
script.type = 'text/javascript'; |
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 wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com'); |
NewerOlder