This file contains hidden or 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 exclude_roles_from_members_loop( $retval ) { | |
| if ( bp_is_members_directory() ) { | |
| $exclude_ids = get_users( | |
| array( | |
| 'fields' => 'ID', | |
| 'role__in' => array( 'editor', 'author' ) // change the roles here | |
| ) | |
| ); |
This file contains hidden or 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( 'bp_email_set_reply_to', function( $retval ) { | |
| return new BP_Email_Recipient( '[email protected]' ); | |
| } ); |
This file contains hidden or 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 | |
| /** | |
| * Disable BuddyPress registration process and fallsback to WordPress' one. | |
| */ | |
| function yzc_disable_bp_registration() { | |
| if ( is_user_logged_in() ) { | |
| return false; | |
| } |
This file contains hidden or 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 auto_update_specific_plugins ( $update, $item ) { | |
| // Array of plugin slugs to always auto-update | |
| $plugins = array ( | |
| 'akismet', | |
| 'buddypress', | |
| ); | |
| if ( in_array( $item->slug, $plugins ) ) { | |
| // Always update plugins in this array | |
| return true; | |
| } else { |
This file contains hidden or 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 | |
| /** | |
| * Require user to have access level to view BuddyPress page | |
| */ | |
| add_filter( 'rcp_member_can_access', function ( $can_access ) { | |
| $access_level = 4; | |
| $page_slug = 'activity'; | |
| $customer = rcp_get_customer_by_user_id( get_current_user_id() ); |
This file contains hidden or 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 friends_only_activity_args($args) | |
| { | |
| if (!bp_is_activity_directory() || !is_user_logged_in()) | |
| { | |
| return $args; | |
| } | |
| $user_id = get_current_user_id(); | |
| $user_ids = friends_get_friend_user_ids($user_id); |
This file contains hidden or 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 | |
| /** | |
| * Activity status | |
| */ | |
| function yzc_activity_state_add_show_everything_filter_actions( $actions ) { | |
| $actions[] = 'activity_status'; | |
| return $actions; | |
| } | |
| add_filter( 'yz_wall_show_everything_filter_actions', 'yzc_activity_state_add_show_everything_filter_actions' ); |
This file contains hidden or 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 | |
| /** | |
| * Woffice Theme Fix. | |
| */ | |
| function yzc_woffice_theme_fix() { | |
| // Get Current Page Path ! | |
| $page_path = $_SERVER['REQUEST_URI']; |
This file contains hidden or 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 | |
| /** | |
| * For more information about how to use the bp-custom.php file | |
| * @see https://codex.buddypress.org/themes/bp-custom-php/ | |
| */ | |
| // Exit if accessed directly | |
| defined( 'ABSPATH' ) || exit; | |
| /** |
This file contains hidden or 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 custom_filter_notifications_get_registered_components( $component_names = array() ) { | |
| // Force $component_names to be an array | |
| if ( ! is_array( $component_names ) ) { | |
| $component_names = array(); | |
| } | |
| // Add 'insert_post_comment' component to registered components array | |
| array_push( $component_names, 'insert_post_comment' ); |
NewerOlder