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_action('admin_notices', 'aa99_delete_pass_nag', 1); | |
function aa99_delete_pass_nag() { | |
remove_action('admin_notices','default_password_nag'); | |
} | |
function aa99_add_password_nag() { | |
global $pagenow; | |
if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) | |
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
// gravity form hacks | |
add_filter("gform_address_zip", "change_address_zip", 10, 2); | |
function change_address_zip($label, $form_id){ | |
return "Postcode"; | |
} | |
add_filter("gform_address_state", "change_address_state", 10, 2); | |
function change_address_state($label, $form_id){ | |
return "State"; |
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 my_theme_add_editor_styles() { | |
add_editor_style( 'editor-style.css' ); | |
} | |
add_action( 'after_setup_theme', 'my_theme_add_editor_styles' ); |
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
jquery scrolling goodness | |
jQuery(".scroll").click(function() { | |
var target = jQuery(this).attr("href"); | |
jQuery("html, body").animate({ | |
scrollTop: jQuery(target).offset().top}, 1000); | |
}); |
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
/** | |
* Cool orderby function from Monkey Puzzle. Adapted from: | |
* Tutorial: http://www.skyverge.com/blog/sort-woocommerce-products-custom-fields/ | |
**/ | |
function monkey_ordering_args( $sort_args ) { | |
$orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); | |
switch( $orderby_value ) { | |
// Name your sortby key whatever you'd like; must correspond to the $sortby in the next function |
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 $user_id = get_current_user_id(); | |
$groups_user = new Groups_User( $user_id ); | |
$groups = $groups_user->groups; | |
$my_groups = array(); | |
foreach($groups as $g) { | |
$my_groups[] = $g->name; | |
OlderNewer