Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
KaineLabs / yzd_disable_membership_system_on_wc_form.php
Created Sep 20, 2021
BuddyPress - Disable Youzify Membership System on Woocommerce Login Form.
View yzd_disable_membership_system_on_wc_form.php
<?php
/**
* BuddyPress - Youzify Disable Membership System on WooCommerce Login Form.
**/
add_filter( 'youzify_enable_login_hooks', 'yzd_disable_membership_system_on_wc_form', 10);
function yzd_disable_membership_system_on_wc_form( $default ) {
if ( isset( $_POST['woocommerce-login-nonce'] ) ) {
@KaineLabs
KaineLabs / yzc_change_share_button.php
Created Sep 19, 2021
BuddyPress - Youzify Change Share Button Title
View yzc_change_share_button.php
<?php
/**
* BuddyPress - Youzify Change Share Button Title.
**/
add_filter( 'youzify_wall_get_share_button_title', 'yzc_change_share_button', 10, 2 );
function yzc_change_share_button( $share_count, $count ) {
echo $share_count;
@KaineLabs
KaineLabs / yzc_fix_jnews_theme_script.php
Last active Sep 14, 2021
Youzify - Fix Jnews Theme
View yzc_fix_jnews_theme_script.php
<?php
/**
* Youzify - Fix Jnews Theme.
* */
add_action( 'wp_head', 'yzc_fix_jnews_theme_script', 999 );
function yzc_fix_jnews_theme_script() {
if ( is_user_logged_in() ) {
@KaineLabs
KaineLabs / yzc_activity_scripts.php
Last active Aug 30, 2021
Youzify - BuddyPress Add Activity Reactions to Home Page.
View yzc_activity_scripts.php
<?php
/**
* Youzify - BuddyPress Add Activity Reactions to Home Page.
*/
function yzc_activity_scripts( ) {
if ( is_home() || is_front_page() ) {
if ( function_exists( 'yzpr_scripts' ) ) {
yzpr_scripts();
@KaineLabs
KaineLabs / yzc_change_og_profile_cover_image.php
Created Aug 25, 2021
Youzify - Social Share Change Profile Cover with Avatar
View yzc_change_og_profile_cover_image.php
<?php
/**
* Youzify - Social Share Change Profile Cover with Avatar.
* */
add_filter( 'youzify_og_profile_cover_image', 'yzc_change_og_profile_cover_image' );
function yzc_change_og_profile_cover_image() {
return bp_core_fetch_avatar(
array(
@KaineLabs
KaineLabs / yzc_hide_reviews_for_specific_roles.php
Last active Aug 16, 2021
Youzify - BuddyPress Hide Reviews by Role
View yzc_hide_reviews_for_specific_roles.php
<?php
/**
* Youzify - BuddyPress Hide Reviews by Role.
*/
add_filter( 'youzify_is_user_can_receive_reviews', 'yzc_hide_reviews_for_specific_roles', 10, 2 );
function yzc_hide_reviews_for_specific_roles( $default, $user_id ) {
if ( empty( $user_id ) ) {
@KaineLabs
KaineLabs / youzify_min_options_to_show_search.php
Created Aug 12, 2021
Youzify - Min Options Number to show search box.
View youzify_min_options_to_show_search.php
<?php
/**
* Youzify - Min Options Number to show search box.
*/
add_filter( 'youzify_min_options_to_show_search', 'yzc_min_options_to_show_search' );
function yzc_min_options_to_show_search() {
// Default is 5.
return 10;
}
@KaineLabs
KaineLabs / youzify_disable_directories_header.php
Last active Aug 10, 2021
Youzify - Disable Directories Header
View youzify_disable_directories_header.php
<?php
// Disable Directories Header.
add_filter( 'youzify_show_directories_header', '__return_false' );
/**
* Add CSS.
*/
add_action( 'wp_head', 'yzc_add_members_directory_css' );
@KaineLabs
KaineLabs / yzc_hide_media_category_from_wordpress.php
Created Aug 5, 2021
Youzify - Hide Youzify Media Category from WordPress
View yzc_hide_media_category_from_wordpress.php
<?php
/**
* Hide Youzify Media Category from WordPress
*/
add_filter( 'widget_categories_args', 'yzc_hide_media_category_from_wordpress', 10 );
function yzc_hide_media_category_from_wordpress( $args ) {
// Get Media Category.
$media_category = get_category_by_slug( 'youzify_media' );
@KaineLabs
KaineLabs / youzify_force_styling.php
Created Aug 2, 2021
Youzify - Disable Custom Styling "Important!" Word
View youzify_force_styling.php
<?php
// Youzify - Disable Custom Stying "Important!" Word.
add_filter( 'youzify_force_styling', '__return_false' );