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 | |
// Youzify - Change Reset Password / Lost Password Form Action | |
function yzc_change_lost_password_link( $action, $form ) { | |
if ( $form == 'lost_password' ) { | |
return '/wp-logmein.php'; | |
} | |
return $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
<?php | |
/** | |
* Youzify - BuddyPress Allow Specific Roles to Delete All Activity Posts | |
**/ | |
add_filter( 'bp_activity_user_can_delete', 'yzc_make_other_roles_able_to_delete_activity', 10 ); | |
function yzc_make_other_roles_able_to_delete_activity( $allow ) { | |
// Get Current User Data. |
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 | |
// Youzify - BuddyPress Prevent Comments Scroll | |
add_action('wp_footer', 'youzify_prevent_comments_scroll'); | |
function youzify_prevent_comments_scroll() { | |
?> | |
<script type="text/javascript"> | |
var youzify_prevent_comments_scroll = 'on'; | |
</script> |
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 | |
/** | |
* Youzify - BuddyPress Disable Blog Comments. | |
* */ | |
function yzc_blogs_record_comment_post_types( $value ) { | |
return array(); | |
} | |
add_action('init', 'yzc_disable_adding_commets_to_blog_posts'); | |
function yzc_disable_adding_commets_to_blog_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 | |
/** | |
* Youzify - Add Profile Widget in Custom Info. | |
* */ | |
add_action('bp_after_profile_loop_content', 'yzc_add_widget_in_custom_info'); | |
function yzc_add_widget_in_custom_info() { | |
$widget = new Youzify_Widgets(); | |
$widgets_list = array( 'skills' => 'visible' ); | |
$widget->get_widget_content( $widgets_list ); | |
} |
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 Groups Directory Statistics Old Style. | |
*/ | |
function yzc_add_groups_directory_statistics() { | |
if ( ! bp_is_groups_directory() ) { | |
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 | |
/** | |
* Youzify - BuddyPress Make all Users Friend With Admin | |
* **/ | |
function yzc_make_all_accounts_friend_with_admin() { | |
$option_name = 'yzc_make_all_admin_friends'; | |
if ( ! get_option( $option_name ) && bp_is_active( 'friends' ) ) { |
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( 'wp_enqueue_scripts', 'yp_dequeue_fa_scripts', 11 ); | |
function yp_dequeue_fa_scripts() { | |
if ( bp_current_component() ) { | |
wp_dequeue_script( 'font-awesome' ); | |
wp_dequeue_script( 'font-awesome-v4-shims' ); | |
} | |
} |
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 | |
/* | |
* Youzify - BuddyPress Automatically add new users to a group after a complete payment | |
*/ | |
add_action( 'woocommerce_payment_complete', 'yzc_auto_join_groups_on_payment' ); | |
function yzc_auto_join_groups_on_payment( $order_id ) { | |
// Get data. | |
$order = wc_get_order( $order_id ); |
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 Custom Tab | |
**/ | |
function yzc_redirect_tab() { | |
if ( ! is_user_logged_in() || bp_current_component() != 'visitors' ) { | |
return; | |
} |