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 um_102621_blockedemails( $args ) { | |
| $emails = UM()->options()->get( 'blocked_emails' ); | |
| if ( ! $emails ) { | |
| return; | |
| } | |
| $emails = array_map( 'rtrim', explode( "\n", $emails ) ); |
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
| $emails = array_map( 'rtrim', explode( ",", $emails ) ); |
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("woocommerce_created_customer","um_122421_woo_created_customer", 10, 3); | |
| function um_122421_woo_created_customer( $customer_id, $new_customer_data, $password_generated ){ | |
| um_fetch_user( $customer_id ); | |
| UM()->user()->approve(); | |
| } |
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("template_redirect","um_122321_disable_cover_photo_update"); | |
| function um_122321_disable_cover_photo_update(){ | |
| if( isset( $_REQUEST['um_action'] ) && "edit" == $_REQUEST['um_action'] ){ | |
| remove_action( 'um_profile_header_cover_area', 'um_profile_header_cover_area', 9 ); | |
| add_action( 'um_profile_header_cover_area', 'um_122321_profile_header_cover_area', 9 ); | |
| } | |
| } | |
| function um_122321_profile_header_cover_area( $args ){ |
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_submit_form_register","um_122221_submit_form_register"); | |
| function um_122221_submit_form_register( $post_form ){ | |
| // Trigger error when the Passcode field is empty | |
| if( isset( $post_form['user_passcode'] ) && empty( $post_form['user_passcode'] ) ){ | |
| UM()->form()->add_error('user_passcode', __( 'Passcode field can\'t be blank.', 'ultimate-member' ) ); | |
| } | |
| // Trigger error when the Passcode entered is incorrect | |
| if( isset( $post_form['user_passcode'] ) && ! empty( $post_form['user_passcode'] ) && "Banana" !== $post_form['user_passcode'] ){ |
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
| / Redirect administrators back to member director after updating the user status from member directory | |
| add_action("um_after_user_status_is_changed","um_122121_redirect_back_to_directory", 1 ); | |
| function um_122121_redirect_back_to_directory(){ | |
| if( ! function_exists("um_get_core_page") ) return; | |
| if( um_get_core_page("user") && isset( $_REQUEST['um_action'] ) ){ | |
| add_filter("um_get_current_page_url",function( $current_url ){ | |
| $url = $_SERVER['HTTP_REFERER']; | |
| if( strpos( $url,"/members/") > -1 ){ |
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_registration_complete’, ‘um_121721_change_registration_role’ ,1 ); | |
| function um_121721_change_registration_role( $user_id ){ | |
| um_fetch_user( $user_id ); | |
| UM()->user()->auto_login( $user_id ); | |
| wp_redirect( get_permalink() ); 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
| .um-profile .um-name a{ | |
| color:#fff !important | |
| } | |
| .um-profile .um-meta-text { | |
| color:#fff !important | |
| } |
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
| // Auto approve a user on registration in WP Admin | |
| add_action("um_registration_complete","um_120621_wpadmin_approve_register_user"); | |
| function um_120621_wpadmin_approve_register_user( $user_id ){ | |
| if( is_admin() ){ | |
| um_fetch_user( $user_id ); | |
| UM()->user()->approve(); | |
| } | |
| } |
OlderNewer