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
/* | |
The following code will create a pv_recent_products short code that is a duplicate of the internal woocommerce | |
shortcode for recent products (See : http://docs.woothemes.com/document/woocommerce-shortcodes/) but provides a | |
new attribute 'login'. This will filter the results by author allowing you to have recent products per vendor. | |
Please Note: This code relies on a 3rd party plugin from Matt Gates. (http://shop.mgates.me/shop/wc-marketing/wc-product-vendor/) | |
Usage: [pv_recent_products per_page="5" login="usernicename" ] | |
All attributes are documentent on the woocommerce docs page above. |
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 | |
if ( !class_exists( 'WC_Payment_Gateway' ) ) return false; | |
/** | |
* Add the gateway to WooCommerce | |
* | |
* @access public | |
* @param array $methods | |
* @return array |
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 | |
// This snippet will add an extra tab to the buddy press user profile that can call any shortcode defined in WC Vendors. | |
// This code should be inserted into your bp-custom.php file. | |
function my_bp_nav_adder() { | |
if (class_exists('WC_Vendors')) { | |
$wcv_profile_id = bp_displayed_user_id(); | |
$wcv_profile_info = get_userdata( bp_displayed_user_id() ); | |
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> |
OlderNewer