s(){ // Enqueue buddyPress Custom Css file wp_enqueue_style( 'tie-css-buddypress', TIELABS_TEMPLATE_URL.'/assets/css/plugins/buddypress'. TIELABS_STYLES::is_minified() .'.css', array('dashicons'), TIELABS_DB_VERSION, 'all' ); // For Grid Archives if( ! is_buddypress() ){ return; } wp_enqueue_script( 'jquery-masonry' ); $masonry_js = " jQuery(document).ready(function(){ jQuery( '#buddypress' ).on( 'bp_ajax_request', '.dir-list', function(){ if( jQuery.fn.masonry ){ var grid = jQuery('.bp-list.grid'); if( grid.length ){ grid.masonry({ percentPosition : true, isInitLayout : false, // v3 initLayout : false, // v4 originLeft : ! is_RTL, isOriginLeft : ! is_RTL }); setTimeout(function(){ grid.masonry('layout'); }, 1); if( jQuery.fn.imagesLoaded ){ grid.imagesLoaded().progress( function(){ grid.masonry('layout'); }); } } } }); }); "; TIELABS_HELPER::inline_script( 'jquery-masonry', $masonry_js ); } /** * Notifications Menu Content */ function get_notifications(){ if( ! function_exists( 'bp_notifications_get_notifications_for_user' ) ){ return false; } $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id(), 'object' ); $count = ( ! empty( $notifications ) && is_array( $notifications ) ) ? count( $notifications ) : 0; $count = (int) $count > 0 ? number_format_i18n( $count ) : ''; $menu_link = '#'; if( function_exists( 'bp_get_notifications_permalink' ) ){ $menu_link = bp_get_notifications_permalink(); } $out_data = ''; return array( 'data' => $out_data, 'count' => $count, 'link' => $menu_link, ); } /** * BuddyPress Cover Image */ function cover_image_css( $settings = array() ){ $settings['callback'] = array( $this, 'cover_image_callback' ); $settings['theme_handle'] = 'tie-css-buddypress'; $settings['width'] = 1400; $settings['height'] = 440; $settings['default_cover'] = TIELABS_TEMPLATE_URL. '/assets/images/default-cover-image.jpg'; return $settings; } /** * Cover Image CSS */ function cover_image_callback( $params = array() ){ if ( empty( $params ) ){ return; } $background_attr = ''; if( $params['cover_image'] == TIELABS_TEMPLATE_URL. '/assets/images/default-cover-image.jpg' ){ $background_attr = ' background-repeat: repeat !important; background-size: 400px !important; '; } return ' #buddypress #header-cover-image { background-image: url(' . $params['cover_image'] . '); '. $background_attr .' } '; } /** * Get BuddyPress Custom Option */ public static function get_page_data( $option, $default = false ){ // Members if( bp_is_user() || bp_is_current_component( 'members' ) ){ return tie_get_option( 'bp_members_' . $option ); } // Groups if( bp_is_current_component( 'groups' ) ){ return tie_get_option( 'bp_groups_' . $option ); } // Activity if( bp_is_current_component( 'activity' ) ){ return tie_get_option( 'bp_activity_' . $option ); } // Registration if( bp_is_current_component( 'register' ) ){ return tie_get_option( 'bp_register_' . $option ); } // Default if( $default ){ return $default; } return false; } /** * Add is_buddypress to main tie js var */ public static function js_var( $array ){ $array['is_buddypress_active'] = true; return $array; } } // Instantiate the class new TIELABS_BUDDYPRESS(); }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/themes/jannah/framework/plugins/class-tielabs-buddypress.php:1) in /htdocs/wp-includes/pluggable.php on line 1450

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/themes/jannah/framework/plugins/class-tielabs-buddypress.php:1) in /htdocs/wp-includes/pluggable.php on line 1453