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 | |
/** | |
* Redirect "wp-login.php" Page To Youzer Login Page. | |
*/ | |
function yz_redirect_wplogin_to_youzer_login_page() { | |
if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'logout' || $_GET['action'] == 'lostpassword' || $_GET['action'] == 'rp' || $_GET['action'] == 'bp-resend-activation' ) ) { | |
return; | |
} |
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 yz_redirect_loggedin_user_from_home_to_profile() { | |
if ( is_user_logged_in() && ( is_home() || is_front_page() ) ) { | |
wp_redirect( bp_loggedin_user_domain() ); | |
exit; | |
} | |
} |
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 | |
// Translate "All Members" Button Title | |
function yzc_translate_all_members_link( $translated_text ) { | |
switch ( $translated_text ) { | |
case 'All Members %s' : | |
$translated_text = sprintf( __( 'All Authors %s', 'youzer' ), '<span>' . bp_get_total_member_count() . '</span>' ); | |
break; | |
} | |
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
function yz_edit_members_directory_link( $link ) { | |
return 'https://www.authorprinar.com/members/type/authors'; | |
} | |
add_filter( 'bp_get_members_directory_permalink', 'yz_edit_members_directory_link' ); |
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 | |
/** | |
* Redirect Non Logged In Users To Login Page. | |
*/ | |
function youzer_redirect_nonloggedin_users_to_login_page() { | |
if ( is_user_logged_in() ) { | |
return; | |
} | |
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 About me Head Data. | |
*/ | |
function youzer_about_me_widget_user_data() { | |
global $Youzer; | |
// Get User Dta. | |
$items = array( | |
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 | |
// Enable Root Profiles . | |
define ( 'BP_ENABLE_ROOT_PROFILES', true ); | |
add_filter( 'bp_core_enable_root_profiles', '__return_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
/** | |
* Remove Defer Scripts. | |
*/ | |
function yz_filter_defer_scripts_on_account_settings() { | |
if ( ! function_exists( 'bp_current_component' ) || ! bp_current_component() ) { | |
return false; | |
} |
OlderNewer