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_filter('um_admin_custom_search_filters','add_my_custom_search_fields', 10, 1); | |
function add_my_custom_search_fields($fields) { | |
$fields['field_meta_key'] = array('title' => 'Enter field title'); // replace 'field_meta_key' with your field meta key | |
return $fields; | |
} |
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
<?php /* Don't include this line if your child theme functions.php already includes it */ | |
function my_et_divi_output_content_wrapper_end() { | |
echo '</div> <!-- #left-area -->'; | |
if ( | |
( is_product() && 'et_full_width_page' !== get_post_meta( get_the_ID(), '_et_pb_page_layout', true ) ) | |
|| | |
( ( is_shop() || is_product_category() || is_product_tag() ) && 'et_full_width_page' !== et_get_option( 'divi_shop_page_sidebar', 'et_right_sidebar' ) ) | |
) { | |
dynamic_sidebar( 'eCommerce Sidebar' ); |
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
<?php | |
/** | |
* Change Date format in front-end | |
*/ | |
add_filter('um_profile_field_filter_hook__date','my_custom_sanitize_fields', 9999, 2 ); | |
function my_custom_sanitize_fields( $value, $data ){ | |
global $ultimatemember; | |
if( $data['metakey'] == 'date-pickah' ){ | |
$value = $ultimatemember->datetime->format( $value, "d M Y"); |
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
<?php | |
/** | |
* Custom sanitization of fields | |
*/ | |
add_filter('um_profile_field_filter_hook__','my_custom_sanitize_fields', 99, 2 ); | |
function my_custom_sanitize_fields( $value, $data ){ | |
// Add tags to mail value | |
if ( !is_array( $value ) ) { |
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
<?php | |
/** | |
* Display Simple Product SKU, in WooCommerce loop pages, before item name | |
* | |
* @return void | |
*/ | |
function simple_product_sku_before_loop_item_title(){ | |
global $product; | |
$type = $product->product_type; |
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( 'um_before_new_user_register', 'require_whitelisted_email_for_signup' ); | |
function require_whitelisted_email_for_signup( $args ) { | |
$user_email = $args['user_email']; | |
$approved_domains = array( 'yahoo.com', 'gmail.com', 'hotmail.com' ); | |
$email_approved = false; | |
foreach ( $approved_domains as $domain ) { | |
$prefixed_domain = '@' . $domain; | |
if ( str_ends_with( $user_email, $prefixed_domain ) ) { | |
$email_approved = true; |
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
//* http://gasolicious.com/remove-tabs-keep-product-description-woocommerce/ | |
// Location: add to functions.php | |
// Output: removes woocommerce tabs | |
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); |
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
<?php | |
/** | |
* Plugin Name: Ultimate Member Modifications | |
* Plugin URI: http://geminilabs.io | |
* Description: This plugin adds custom features and modifications to the Ultimate Member plugin family. | |
* Version: 1.0.0 | |
* Author: Gemini Labs | |
* Author URI: http://geminilabs.io | |
* License: MIT License | |
*/ |
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 new tab called "mytab" */ | |
add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 ); | |
function my_custom_tab_in_um( $tabs ) { | |
$tabs[800]['mytab']['icon'] = 'um-faicon-pencil'; | |
$tabs[800]['mytab']['title'] = 'My Custom Tab'; | |
$tabs[800]['mytab']['custom'] = true; | |
return $tabs; | |
} | |