Remove “Export data” from profile settings WPLMS v4

Home Forums Legacy Support Support queries Setup issues Remove “Export data” from profile settings WPLMS v4

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #374544
    kenetork
    Participant
    Hi, I tried using this codes you sais in another posts in the wplms customizer plugin.php Either use this code add_filter( ‘bp_settings_show_user_data_page’, ‘__return_false’ ); OR add_action( ‘bp_actions’, ‘remove_export_data_bp’,99 ); function remove_export_data_bp() { bp_core_remove_subnav_item( ‘settings’, ‘data’ ); } and nothing is working, I still can see this; https://prnt.sc/1ze2skf I need to remove all that part from user to see it. My code looked like this:
    <?php
    /*
    Plugin Name: WPLMS Customizer Plugin
    Plugin URI: http://www.Vibethemes.com
    Description: A simple WordPress plugin to modify WPLMS template
    Version: 1.0
    Author: VibeThemes
    Author URI: http://www.vibethemes.com
    License: GPL2
    */
    /*
    Copyright 2014  VibeThemes  (email : [email protected])
    
    wplms_customizer program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as 
    published by the Free Software Foundation.
    
    wplms_customizer program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with wplms_customizer program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */
    
    include_once 'classes/customizer_class.php';
    
    if(class_exists('WPLMS_Customizer_Plugin_Class'))
    {	
        // instantiate the plugin class
        $wplms_customizer = new WPLMS_Customizer_Plugin_Class();
    }
    add_filter('wplms_course_sub_nav',function($settings){
    	foreach ($settings as $key => $ss) {
    		if(in_array($ss['slug'], array(BP_COURSE_STATS_SLUG,'quiz_results','assignment_results','notes_reviews' ))){
    			unset($settings[$key]);
    		}
    	}
    	return $settings;
    });
    
    add_filter('vibebp_component_icon',function($icon,$compoent){
    
    if($compoent == 'course'){ // Check component id , set $icon as svg
    $icon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-monitor"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>';
    }
    return $icon;
    
    },99999,2);
    //add
    add_filter('wplms_get_student_mmy_course_tabs',function($tabs){
    
    	unset($tabs['announcementsnews']);
    	unset($tabs['qna']);
    	unset($tabs['notes']);
    	return $tabs;
    });
    
    add_filter('wplms_course_nav_menu','wplms_remove_course_menu',999999999,1);
    function wplms_remove_course_menu($defaults){
      unset($defaults['news']);
      return $defaults;
    }
    add_action('wplms_course_details_widget',function($details,$id){
        if(!class_exists('WPLMS_tips')){
            return $details;
        }
        $tips = WPLMS_tips::init();
        if(isset($tips) && isset($tips->settings) && !empty($tips->settings['calculate_course_duration_from_start_course'])){
            $status = bp_course_get_user_course_status(get_current_user_id(),$id);
            if(!empty($status) && $status <= 1){
                unset($details['time']);
            }
        }
        return $details;
    },999999999,2);
    
    Please let me know how exactly to indert those codes or maybe a new ones that actually works please, because I am ahaving a hard time trying to remoe it, or please take a look of v4 in your local with css to remove it properly, i test some css code you provided with no luck either. Please help!
    #374634
    Veronica
    Moderator
    hi you can use this custom CSS to hide export data from settings div#vibebp_member .profile_grid .profile_settings .portal:nth-child(4){ display:none } refer: http://prntscr.com/1znss3k
    #374948
    kenetork
    Participant
    Thanks, that worked, now please help me removing the last thing remaining the active session part, I dont the user to get out himself from the session please: See this: https://prnt.sc/20j46fk Any other css code to remove it or somethig elese to remove that? Thanks
    #375017
    Veronica
    Moderator
    hi first unable to find the above mentioned active session area here: http://prntscr.com/20mr8fk and second please explain the exact requirement do you want to just hide the setting or diable the functionality completely?
    #375040
    kenetork
    Participant
    This are is under settings, BUT HERE IS ANOTHER SCREEN CAPTURE, FOM ANOTHER OF MY SITES: https://prnt.sc/20o3vmo I need to remove that final part showing the session up, weird thing is in the site you tried accessing this is not showing, but in this site is showing up. Maybe is a buddypress settings, I prefer to not show that for the users. Thanks!
    #375055
    Veronica
    Moderator
    hi try to add this code in custom CSS section .vibebp_myprofile.dark_theme.elegance .profile_grid .profile_settings :nth-child(5) { display:none; } if doesn't work then please share exact site details
    #375216
    kenetork
    Participant
    I didnt work, but I edited and make it work based on your last code, this was the CSS code: div#vibebp_member .profile_grid .profile_settings :nth-child(5) { display:none; } Thanks, you can close this topic!
    #375230
    Veronica
    Moderator
    good to know topic closed
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Remove “Export data” from profile settings WPLMS v4’ is closed to new replies.