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
### Keybase proof | |
I hereby claim: | |
* I am digitalchild on github. | |
* I am digitalchild (https://keybase.io/digitalchild) on keybase. | |
* I have a public key whose fingerprint is CB38 6F3C 4BB3 09EF F3B4 D65E 6C71 8445 A94D 14BC | |
To claim this, I am signing this object: |
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 jplayer_custom_field ( $post_id ) { | |
$title = $_POST['jplayer_title']; | |
# get the files media id | |
$file_id = get_post_meta( $post_id, 'jplayer_file', true ); | |
# create the path for upload | |
$file_path = wp_get_attachment_url( $file_id ) ; | |
$jplayer_data[] = array( 'title' => $title, 'path' => $file_path ); | |
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
$author_id = get_current_user_id(); | |
$shop_name_set = PV_Vendors::get_vendor_shop_name( $author_id ); | |
$vendor_login = get_userdata($author_id); | |
if ($shop_name_set == $vendor_login->user_login) { | |
// Only choose one of the following lines depending on what theme you have. | |
// Use the following line if you have a WooThemes theme. | |
echo do_shortcode( '[box type="alert"]<strong><h3>You havent configured your store name!</h3><p>More message text here.<br><br><a href="'.$settings_page.'">Click here to set your store name</a></p>.[/box]' ); | |
// Use this line for any other theme | |
echo '<h3>You havent configured your store name!</h3><p>More message text here.<br><br><a href="'.$settings_page.'">Click here to set your store name</a>.</p>'; |
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
[libdefaults] | |
default_realm = MYDOMAIN.COM.AU | |
dns_lookup_realm = false | |
dns_lookup_kdc = true |
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('wp_login','check_terms_accepted'); | |
//check if user has accepted the terms when logging in | |
function check_terms_accepted($login) { | |
$user = get_user_by('login', $login); | |
$terms_accepted = get_user_meta( $user->ID, 'new_terms'); |
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 | |
/* Buddypress Private Messaging Mod */ | |
/* | |
Usage : | |
Put this in your templates to create a message link you can then style | |
templates this could go in : | |
* description.php (put the message link in the end of the description) |
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 | |
global $woocommerce; ?> | |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?> | |
<h2><?php printf( 'Orders for %s', get_product( $product_id )->get_title() ); ?></h2> | |
<table class="table table-striped table-bordered"> | |
<thead> |
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
/** | |
* Format WordPress User's "Display Name" to Full Name on Login | |
* ------------------------------------------------------------------------------ | |
*/ | |
add_action( 'wp_login', 'wpse_9326315_format_user_display_name_on_login' ); | |
function wpse_9326315_format_user_display_name_on_login( $username ) { | |
$user = get_user_by( 'login', $username ); |
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 | |
/** | |
* Place this in your functions.php | |
*/ | |
if ( is_user_logged_in() ) { | |
add_filter('show_admin_bar', '__return_false'); | |
} | |
?> |
OlderNewer