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 Comment Media to Activity Media Widget and Tab | |
add_filter( 'youzify_get_media_activity_types', 'yzc_add_activity_comment_to_media', 10, 2 ); | |
function yzc_add_activity_comment_to_media( $activity_sql, $type ) { | |
$activity_sql .= ",'activity_comment'"; | |
return $activity_sql; | |
} |
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 yzc_get_linked_member_types_and_user_roles_2() { | |
// Set Member Type Name => User Role | |
return array( | |
'teacher' => 'subscriber', | |
'type2' => 'editor' | |
); |
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' ); | |
} | |
} |