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 ( ! defined( 'ABSPATH' ) ) exit; ?> | |
<!-- This file should primarily consist of HTML with a little bit of PHP. --> | |
<div class="um-field um-field-type_terms_conditions" data-key="use_terms_conditions_agreement" style="display:block;padding:0;"> | |
<div class="um-field-area"> | |
<?php $confirm = ! empty( $args['use_gdpr_agreement'] ) ? $args['use_gdpr_agreement'] : __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ); ?> | |
<label class="um-field-checkbox"> |
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 ( ! defined( 'ABSPATH' ) ) exit; ?> | |
<div class="um-field um-field-type_terms_conditions" data-key="use_terms_conditions_agreement" style="display: block;padding:0px"> | |
<div class="um-field-area"> | |
<div class="um-terms-conditions-content" style="display:none"> | |
<?php if ( ! empty( $args['use_terms_conditions_content_id'] ) ) { | |
if ( isset( $um_content_query ) ) { ?> | |
<a href="<?php echo get_the_permalink( $args['use_terms_conditions_content_id'] );?>" target="_blank" class="um-hide-terms"> | |
<?php echo ! empty( $args['use_terms_conditions_toggle_hide'] ) ? $args['use_terms_conditions_toggle_hide'] : __( 'Hide Terms', 'um-terms-conditions' ); ?> | |
</a> | |
<?php echo apply_filters( 'um_terms_conditions_tc_page_content', $um_content_query->post_content, $args ); |
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 | |
/** | |
* Open files in the current window | |
* @author www.champ.ninja | |
* | |
**/ | |
add_filter("um_profile_field_filter_hook__file","um_custom_profile_field_filter_hook__file", 100); | |
function um_custom_profile_field_filter_hook__file( $output ){ | |
$output = str_replace("_blank","", $output ); | |
return $output; |
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
add_action("template_redirect","um_custom_add_new_role_posts_restriction"); | |
function um_custom_add_new_role_posts_restriction(){ | |
$p_query = new WP_Query; | |
$posts = $p_query->query( array( | |
'post_type' => 'any', | |
'posts_per_page' => -1, | |
'fields' => 'ids' | |
) ); | |
if ( ! empty( $posts ) ) { |
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 a new Profile tab with custom link | |
* @param array $tabs | |
* www.champ.ninja | |
* @return array | |
*/ | |
function um_mycustomtab_add_tab( $tabs ) { | |
$tabs[ 'mycustomtab' ] = 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 /* Template: Profile Tab */ ?> | |
<div class="um <?php echo $this->get_class( $mode ); ?> um-<?php echo $form_id; ?>"> | |
<div class="um-form"> | |
<?php | |
$edit = ( isset( $_GET['um_action'] ) && $_GET['um_action'] == 'edit' ); | |
if ( $edit && ! isset( UM()->user()->cannot_edit ) ) { | |
echo '<form method="post" action="">'; | |
} |
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
/** | |
* More Ultimate Member tutorials at www.champ.ninja | |
*/ | |
add_action( 'um_cron_delete_users_cron', 'um_delete_users_awaiting_email' ); | |
function um_delete_users_awaiting_email(){ | |
$args = array( | |
'fields' => 'ID', | |
'number' => -1, | |
'date_query' => array( | |
array( 'after' => '5 days ago midnight', 'inclusive' => 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
/** | |
* Author: Champ | |
* Website: www.champ.ninja | |
*/ | |
function um_custom_messaging_user_got_message($to, $from, $conversation_id ){ | |
if ( ! UM()->Messaging_API()->api()->enabled_email( $to, '_enable_reminder_pm' ) ) { | |
return; | |
} | |
remove_action( 'um_after_existing_conversation', 'um_messaging_user_got_message', 20, 3 ); // Remove the original email notification with timestamp |