function mepr_replace_country_code_with_country_name ( $address, $user ) { $countries = require( MEPR_I18N_PATH . ‘/countries.php’ ); $addr1 = get_user_meta( $user->ID, ‘mepr-address-one’, true ); $addr2 = get_user_meta( $user->ID, ‘mepr-address-two’, true ); $city = get_user_meta( $user->ID, ‘mepr-address-city’, true ); $state = get_user_meta( $user->ID, ‘mepr-address-state’,…Continue reading
/** * Plugin Name: WP Simple Pay – BuddyBoss Compatibility Fix */ if ( isset( $_GET[‘simpay-preview’] ) ) { remove_action( ‘bp_nouveau_enqueue_scripts’, ‘bp_nouveau_search_enqueue_scripts’ ); }Continue reading
/** Activates all Vendor Stores **/ function wcv_activate_all_vendors() { global $wpdb; $vendors = get_users( array( ‘fields’ => array( ‘ID’ ), ‘role’ => ‘Vendor’ ) ); $meta_key = ‘_wcv_vendor_status’; foreach($vendors as $vendor){ $wpdb->query($wpdb->prepare(“UPDATE wp_usermeta SET meta_value=’active’ WHERE user_id=$vendor->ID AND (meta_key=’$meta_key’ AND…Continue reading
/** * Displays the donation summary ( updated to show custom fields ) * * Override this template by copying it to yourtheme/charitable/donation-receipt/summary.php * * @author WP Charitable LLC * @package Charitable/Templates/Donation Receipt * @since 1.0.0 * @version 1.4.7 */…Continue reading
add_filter(‘big_image_size_threshold’, ‘__return_false’ );Continue reading
add_filter( ‘charitable_session_donation_amount’, ‘example_get_donation_amount_in_session’, 999, 2 ); function example_get_donation_amount_in_session( $amount = false, $campaign = false ) { // If the donation amount is not set in the session, return the default amount. // WARNING: Setting a default amount here will override…Continue reading
/*’Remember Me’ checked by default */ add_action( ‘init’, ‘rd_login_checked_rememberme’ ); function rd_login_checked_rememberme() { add_filter( ‘login_footer’, ‘rd_check_rememberme’ ); } function rd_check_rememberme() { echo ““; }Continue reading
/* If a user’s login fails, don’t tell them whether the username or password was incorrect */ add_filter ( ‘login_errors’, ‘rd_failed_login’ ); function rd_failed_login () { return ‘Login failed because either your username or password is incorrect. Please try again.’;…Continue reading
/* Remove image link from media uploads */ function wpb_imagelink_setup() { $image_set = get_option( ‘image_default_link_type’ ); if ($image_set !== ‘none’) { update_option(‘image_default_link_type’, ‘none’); } } add_action(‘admin_init’, ‘wpb_imagelink_setup’, 10);Continue reading