Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
KaineLabs / youzer-navbar-icons-above-titles.css
Created December 26, 2017 20:52
Youzer - Navbar Icons above titles
.yz-profile-navmenu .yz-navbar-item a i {
display: block;
margin: 0 0 10px;
}
.youzer.yz-horizontal-layout .yz-navbar-item a {
min-width: 80px;
}
@media screen and (max-width: 768px) {
@KaineLabs
KaineLabs / yz-redirect-wplogin-to-yzlogin.php
Last active July 2, 2020 05:31
Redirect "wp-login.php" Page To Youzer Login Page
<?php
/**
* Redirect "wp-login.php" Page To Youzer Login Page.
*/
function yz_redirect_wplogin_to_youzer_login_page() {
if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'logout' || $_GET['action'] == 'lostpassword' || $_GET['action'] == 'rp' || $_GET['action'] == 'bp-resend-activation' ) ) {
return;
}
@KaineLabs
KaineLabs / yz-show-buttons-for-non-logged-in-users.php
Last active July 26, 2022 09:48
BuddyPres - Youzify Add Buttons for non-logged-in users
<?php
/**
* BuddyPres - Youzify Add Buttons for non-logged-in users
*/
function youify_add_buttons_for_nonloggedin_users() {
if ( is_user_logged_in() || ! function_exists( 'youzify_get_login_page_url' ) ) {
return false;
}
@KaineLabs
KaineLabs / yz-redirect-loggedin-user-from-home-to-profile.php
Last active April 9, 2020 01:05
Redirect Logged-in Users from Home Page to Their Profile
<?php
function yz_redirect_loggedin_user_from_home_to_profile() {
if ( is_user_logged_in() && ( is_home() || is_front_page() ) ) {
wp_redirect( bp_loggedin_user_domain() );
exit;
}
}
@KaineLabs
KaineLabs / yz-translate-all-members-link.php
Last active May 22, 2021 02:32
Translater "All Members" Button Title
@KaineLabs
KaineLabs / yz-edit-members-directory-link.php
Created January 7, 2018 20:25
Edit Members Directory Link
@KaineLabs
KaineLabs / yz-redirect-non-loggedin-user-to-login-page.php
Last active July 21, 2018 00:45
Redirect Non Logged In Users To Login Page
<?php
/**
* Redirect Non Logged In Users To Login Page.
*/
function youzer_redirect_nonloggedin_users_to_login_page() {
if ( is_user_logged_in() ) {
return;
}
@KaineLabs
KaineLabs / yz-add-aboutme-widget-head-data.php
Last active February 1, 2018 22:32
Add About Me Widget - Head Data.
/**
* Add About me Head Data.
*/
function youzer_about_me_widget_user_data() {
global $Youzer;
// Get User Dta.
$items = array(
array(
<?php
// Enable Root Profiles .
define ( 'BP_ENABLE_ROOT_PROFILES', true );
add_filter( 'bp_core_enable_root_profiles', '__return_true' );
@KaineLabs
KaineLabs / yz-remove-defer-script.php
Created February 5, 2018 20:33
Remove Defer Script
/**
* Remove Defer Scripts.
*/
function yz_filter_defer_scripts_on_account_settings() {
if ( ! function_exists( 'bp_current_component' ) || ! bp_current_component() ) {
return false;
}