This file contains hidden or 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
// Process Confirmation and Reminders | |
add_filter( 'app_confirmation_message', 'append_location_to_app_email', 10, 3 ); | |
add_filter( 'app_reminder_message', 'append_location_to_app_email', 10, 3 ); | |
function append_location_to_app_email( $msg, $r, $app_id) { | |
// Get Worker Address from BuddyPress | |
$worker_location = xprofile_get_field_data( 'address', $r->worker ); | |
if ( $worker_location ) { | |
$msg = str_replace( 'LOCATION', 'Location: ' . $worker_location, $msg ); | |
} |
This file contains hidden or 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
public function process_purchase() { | |
global $M_options; | |
if ( empty( $M_options['paymentcurrency'] ) ) { | |
$M_options['paymentcurrency'] = 'USD'; | |
} | |
if ( ! is_ssl() ) { | |
wp_die( __( 'You must use HTTPS in order to do this', 'membership' ) ); | |
exit; | |
} |
This file contains hidden or 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 emergency_mail_send() | |
{ | |
global $wpdb; | |
$expiring_users = $wpdb->get_results(" | |
SELECT `ID` , `sub_id` , `level_id`, `user_email` , `user_login` , `display_name` | |
FROM `wp_m_membership_relationships` | |
INNER JOIN `wp_users` ON wp_m_membership_relationships.user_id = wp_users.ID | |
WHERE `expirydate` | |
BETWEEN '2015-01-30 23:59:59' |
This file contains hidden or 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
// Some themes cause issues with the product list MarketPress displays, especially the Lightboxes | |
add_filter('mp_product_image','fix_lightbox',10,4); | |
function fix_lightbox( $image, $context, $post_id, $size ) { | |
// Apply this fix only when its a product list | |
if ($context === 'list') : | |
$thumb_html = get_the_post_thumbnail($post_id, $size); |
This file contains hidden or 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 _swabpfbActiveHandler = false; | |
(function($){ | |
$(function() { | |
var $form; | |
var $text; | |
var $textContainer; | |
This file contains hidden or 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
<script> | |
$.noConflict(); | |
// Explicitly put code in noConflict mode and wrap around with ready.fn.() | |
jQuery( document ).ready(function( $ ) { | |
var _bpfbActiveHandler=false;(function(e){e(function(){function u(){var e='<div class="bpfb_actions_container bpfb-theme-'+_bpfb_data.theme.replace(/[^-_a-z0-9]/ig,"")+" bpfb-alignment-"+_bpfb_data.alignment.replace(/[^-_a-z0-9]/ig,"")+'">'+'<div class="bpfb_toolbar_container">'+'<a href="#photos" class="bpfb_toolbarItem" title="'+l10nBpfb.add_photos+'" id="bpfb_addPhotos"><span>'+l10nBpfb.add_photos+"</span></a>"+" "+'<a href="#videos" class="bpfb_toolbarItem" title="'+l10nBpfb.add_videos+'" id="bpfb_addVideos"><span>'+l10nBpfb.add_videos+"</span></a>"+" "+'<a href="#links" class="bpfb_toolbarItem" title="'+l10nBpfb.add_links+'" id="bpfb_addLinks"><span>'+l10nBpfb.add_links+"</span></a>"+"</div>"+'<div class="bpfb_controls_container">'+"</div>"+'<div class="bpfb_preview_container">'+"</div>"+'<div class="bpfb_action_container">'+"</div>"+'<input type="b |
This file contains hidden or 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('wp_footer', 'custom_dial_colors', 100); | |
function custom_dial_colors() { | |
$script = <<< EOT | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
if ( $( ".knob" ).length ) { | |
jQuery(".knob").trigger( | |
'configure', | |
{ |
This file contains hidden or 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
// Modify two functions in your ajax-cart.js file. | |
// It can be found in the marketpress-includes/js folder. | |
// Simply copy/paste and //replace the 2 functions there with the code from here | |
// `mp_store_listeners` and `get_and_insert_products` | |
//general store listeners (e.g. pagination, etc) | |
function mp_store_listeners(){ | |
// on next/prev link click, get page number and update products | |
$(document).on('click', '#mp_product_nav a', function(e){ | |
e.preventDefault(); |
This file contains hidden or 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
// Special Thanks to Ashok and Tyler Postle for this code ( UNTESTED ) | |
function wpms_one_blog_only($active_signup) { | |
// Get an array of the current user's blogs | |
$blogs = get_blogs_of_user( get_current_user_id() ); | |
if ($blogs["1"]) unset($blogs["1"]); | |
$n = count($blogs); | |
if(n > 0){ | |
$active_signup = 'none'; | |
echo ''; |