View yzc_redirect_tab.php
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; | |
} |
View yzc_hide_md_cards_meta.php
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 - Hide BuddyPress Members Directory Default Meta | |
function yzc_hide_md_cards_meta() { | |
return ''; | |
} | |
add_filter( 'youzify_members_directory_user_default_meta', 'yzc_hide_md_cards_meta' ); |
View yzc_sort_by_favorites.php
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 | |
class BP_Loop_Filters { | |
/** | |
* Constructor | |
*/ | |
public function __construct() { | |
$this->setup_actions(); | |
$this->setup_filters(); | |
} |
View yzc_add_members_directory_ratings_filter.php
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 "By ratings" option to the sorting dropdown menu | |
function yzc_add_members_directory_ratings_filter() { | |
echo '<option value="youzify_user_ratings_total">' . __( 'By ratings', 'youzer' ) . '</option>'; | |
} | |
add_action( 'bp_members_directory_order_options', 'yzc_add_members_directory_ratings_filter' ); | |
// Modify the query to sort the members by the number of ratings in descending order | |
function yzc_sort_members_youzify_user_ratings_total( $query ) { |
View yzc_letters_restrictions.php
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 - Activity Posts & Comments Letters Restrictions | |
*/ | |
add_action( 'bp_activity_before_save', 'yzc_letters_restrictions', 10 ); | |
function yzc_letters_restrictions( $activity ) { | |
$error_msg = 'Sorry, you have added too many letters.'; |
View yzc_reorder_group_tabs.php
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_reorder_group_tabs() { | |
global $bp; | |
if ( isset( $bp->groups->current_group->slug ) && $bp->groups->current_group->slug == $bp->current_item ) { | |
$bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['position'] = 10; | |
$bp->bp_options_nav[$bp->groups->current_group->slug]['home']['position'] = 20; | |
$bp->bp_options_nav[$bp->groups->current_group->slug]['info']['position'] = 30; | |
$bp->bp_options_nav[$bp->groups->current_group->slug]['members']['position'] = 40; | |
$bp->bp_options_nav[$bp->groups->current_group->slug]['media']['position'] = 50; | |
} |
View youzify_profile_header_show_member_type_meta.php
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( 'youzify_profile_header_show_member_type_meta', '_return_false' ); |
View bp_activities_sync_favorites.php
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 | |
/** | |
* BuddyPress Sync Activities Favourite with Activities Reactions. | |
* */ | |
add_action( 'bp_init', function() { | |
if ( ! function_exists( 'yzar_option' ) ) { | |
return; | |
} |
View yzc_add_update_group_cache.php
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 | |
/* | |
* BuddyPress - Update Members Status & Update Groups Cache | |
*/ | |
function yzc_add_update_group_cache() { | |
$members = get_users( 'fields=ID' ); | |
foreach ( $members as $user_id ) { | |
bp_update_user_last_activity( $user_id, bp_core_current_time() ); |
NewerOlder