Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
KaineLabs / yz-force-bp-covers-activation.php
Created February 7, 2018 00:13
Force Buddypress Covers Activation.
/**
* Force Buddypress Covers Activation.
*/
function youzer_activate_buddypress_covers() {
return true;
}
add_filter( 'bp_is_profile_cover_image_active', 'youzer_activate_buddypress_covers', 999 );
add_filter( 'bp_is_groups_cover_image_active', 'youzer_activate_buddypress_covers', 999 );
@KaineLabs
KaineLabs / yz-add-change-cover-to-profile-account-menu.php
Last active February 14, 2022 01:42
Add "Change Cover" to Profile Account Menu
<?php
/**
* Add "Change Cover" to profile account menu.
*/
function yz_add_change_cover_to_profile_account_menu( $links ) {
// Change Cover Link
$link['change-cover-image'] = array(
'icon' => 'fas fa-image',
'href' => yz_get_profile_settings_url( 'change-cover-image' ),
@KaineLabs
KaineLabs / yz-set-youzer-borders.css
Last active February 10, 2018 00:17
Set Border to all Youzer Boxes
.yz-widget,
yz-wall-nav,
#yz-wall-form,
#message-recipients,
table.notifications,
.yz-my-account-widget,
table.messages-notices,
.youzer .item-list-tabs,
.youzer .activity-list>li,
#message-thread .message-box,
@KaineLabs
KaineLabs / yz-jannah-css-fix.css
Last active February 13, 2018 00:58
Jannah CSS Fix
.logy .container-wrapper,
.youzer .container-wrapper {
background: transparent;
border: none;
padding:0;
margin:0;
}
.youzer #content {
margin: 0;
@KaineLabs
KaineLabs / yz-change-author-link-to-author-profile-posts-tab.php
Created February 13, 2018 00:59
Change Author Link to Author Profile Posts Tab.
@KaineLabs
KaineLabs / yz-md-show-all-site-members-count.php
Created February 13, 2018 02:46
Show All Site Members Count.
/**
* Show All Site Members Count.
*/
function youzer_show_all_site_members_count() {
return bp_get_total_site_member_count();
}
add_filter( 'bp_get_total_member_count', 'youzer_show_all_site_members_count' );
@KaineLabs
KaineLabs / yz-exclude-spam-users.php
Created February 13, 2018 02:47
Exclude spam users
/**
* Exclude Spam Users
*/
function youzer_md_exclude_spam_users( $retval ) {
global $wpdb;
$sql = "SELECT ID FROM {$wpdb->users} WHERE user_status != 0";
$exclude_spam_users = $wpdb->get_col( $sql );
@KaineLabs
KaineLabs / yz-change-widgets-settings-to-overview-settings.php
Last active July 28, 2018 03:43
Change "Widgets Settings" to "Overview Settings"
<?php
/**
* Translate Text
*/
function yz_translate_youzer_text( $translated_text ) {
switch ( $translated_text ) {
case 'widgets settings' :
$translated_text = __( 'Overview Settings', 'youzer' );
break;
@KaineLabs
KaineLabs / yz-fix-theme-uncode-icons.php
Created February 20, 2018 13:47
Theme Uncode Fix Icons
/**
* Remove The old Font Awesome Versions
*/
function youzer_remove_fa_css() {
wp_dequeue_style( 'font-awesome-fa' );
wp_dequeue_style( 'uncode-icons' );
}
add_action( 'wp_enqueue_scripts' , 'youzer_remove_fa_css', 999 );
@KaineLabs
KaineLabs / yz-enable-onesocial-theme-widgets-settings.php
Created February 25, 2018 18:22
Enable Onesocial Theme Widgets Settings
/**
* Enable Onesocial Theme Widgets Settings.
*/
function yz_enable_onesocial_theme_widgets_settings() {
// Remove Action.
remove_action( 'wp', 'onesocial_bp_remove_nav_item' );
}