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 checkZipCodeState(zip){ | |
jQuery.ajax( | |
'http://api.zippopotam.us/us/'+zip, | |
{ | |
success:function(data){ | |
return 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
function get_ai1ec_upcoming_events($number = 3){ | |
global $wpdb; | |
$todaysDate = date('Y-m-d G:i:s'); | |
$upcomingEvents = $wpdb->get_results( | |
"SELECT | |
{$wpdb->prefix}posts.post_title, | |
{$wpdb->prefix}posts.ID, | |
{$wpdb->prefix}ai1ec_event_instances.start, | |
{$wpdb->prefix}ai1ec_event_instances.end | |
FROM |
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
preg_replace('/<a /','<a target="_blank" ',make_clickable(get_tweet())) |
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
if (typeof(console) === 'undefined') { | |
console = { | |
log : function(data){}, | |
table : function(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
add_shortcode('donation-posts', 'fnDonatePosts'); | |
function fnDonatePosts($attr, $content) | |
{ | |
ob_start(); | |
get_template_part('donation', 'posts'); | |
$ret = ob_get_contents(); | |
ob_end_clean(); | |
return $ret; | |
} |
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_postmeta set meta_value = CONCAT(UCASE(SUBSTRING(meta_value, 1, 1)), LOWER(SUBSTRING(meta_value FROM 2))) WHERE meta_key='firstname' |
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
$edit_editor = get_role('editor'); | |
$edit_editor->add_cap('add_users'); | |
$edit_editor->add_cap('create_users'); | |
$edit_editor->add_cap('delete_users'); | |
$edit_editor->add_cap('edit_users'); | |
$edit_editor->add_cap('list_users'); | |
$edit_editor->add_cap('edit_theme_options'); |
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
define( 'FTP_HOST', '###HOST##' ); | |
define( 'FTP_USER', '###USERNAME###' ); | |
define( 'FTP_PASS', '###PASSWORD###' ); |
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 add_grav_forms(){ | |
$role = get_role('editor'); | |
$role->add_cap('gform_full_access'); | |
} | |
add_action('admin_init','add_grav_forms'); |
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
$args = array( | |
'post_status' => 'publish', | |
'post_type' => '###POSTTYPE###', | |
'meta_key' => '###METAKEY###', | |
'orderby' => 'meta_value_num', | |
'order' => 'DESC' | |
); |