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_filter( 'wpum_get_option_members_can_view_profiles', 'my_wpum_get_option_members_can_view_profiles' ); | |
function my_wpum_get_option_members_can_view_profiles( $value ) { | |
if ( ! is_user_logged_in() ) { | |
return $value; | |
} | |
if ( ! current_user_can( 'manage_options' ) ) { | |
return $value; |
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_action( 'template_redirect', 'wpum_logged_in_login_redirect' ); | |
function wpum_logged_in_login_redirect() { | |
if ( ! is_user_logged_in() ) { | |
return; | |
} | |
if ( is_page( wpum_get_core_page_id( 'login' ) ) || is_page( wpum_get_core_page_id( 'register' ) ) ) { | |
wp_redirect( get_permalink( wpum_get_core_page_id( 'account' ) ) ); |
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 | |
function my_wpum_get_directory_user_templates( $directories ) { | |
$directories['custom'] = 'Custom User Template'; | |
return $directories; | |
} | |
add_filter( 'wpum_get_directory_user_templates', 'my_wpum_get_directory_user_templates' ); |
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 | |
function my_wpum_get_account_fields( $fields ) { | |
if ( isset( $fields['user_displayname']['options']['display_nickname'] ) ) { | |
unset( $fields['user_displayname']['options']['display_nickname'] ); | |
} | |
return $fields; | |
} |
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 | |
function my_wpum_get_comments_for_profile( $args ) { | |
$args['number'] = 100; | |
return $args; | |
} | |
add_filter( 'wpum_get_comments_for_profile', 'my_wpum_get_comments_for_profile' ); |
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_filter( 'wpum_get_registration_fields', 'my_wpum_get_registration_fields' ); | |
function my_wpum_get_registration_fields( $fields ) { | |
if ( isset( $fields['role'] ) ) { | |
$fields['role']['priority'] = - 1; | |
} | |
return $fields; | |
} |
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 | |
function my_wpum_add_profile_tab_link( $tabs ) { | |
$tabs['google'] = [ | |
'name' => esc_html( 'Google' ), | |
'priority' => 2, | |
]; | |
return $tabs; | |
} |
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 | |
// This file should live in | |
// wp-content/mu-plugins/wpum-templates/profiles/bookings.php | |
// Output your custom content |
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_filter( 'wpum_get_registered_profile_tabs', 'my_wpum_get_registered_profile_tabs' ); | |
function my_wpum_get_registered_profile_tabs( $tabs ) { | |
$tabs['about']['name'] = esc_html( 'About Me' ); | |
$tabs['posts']['name'] = esc_html( 'My Posts' ); | |
return $tabs; | |
} |
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 | |
function wpum_account_change_settings_tab_name( $tabs ) { | |
$tabs['settings']['name'] = esc_html( 'Profile' ); | |
return $tabs; | |
} | |
add_filter( 'wpum_get_account_page_tabs', 'wpum_account_change_settings_tab_name' ); |
OlderNewer