WordPress.org

Ready to get started?Download WordPress

Forums

Resume Submissions & Job Postings
[resolved] Subscriber Dashboard: Hide Recently Submitted Resume (3 posts)

  1. UaMV
    Member
    Posted 1 year ago #

    Excited to implement this plugin. However, i first need to hide the Recently Submitted Resumes' module from the Dashboard of subscribers. They can currently view a list of submitted resumes, but do not have permissions to view the actual resumes. Can this list be hidden from those without permissions? Thanks!

    http://wordpress.org/extend/plugins/resume-submissions-job-postings/

  2. kandrews
    Member
    Plugin Author

    Posted 1 year ago #

    Right now I don't have time to release an update, but if you go to the resume-submission.php page in the plugin file, look for:

    // Add widget to Dashboard
    function rsjp_dashboard_widget_function() {
    	include( 'includes/dashboard-widget.php' );
    }
    
    function rsjp_dashboard() {
    	wp_add_dashboard_widget( 'rsjp_dashboard_widget', __( 'RSJP - Recently Submitted Resumes' ), 'rsjp_dashboard_widget_function' );
    }
    add_action( 'wp_dashboard_setup', 'rsjp_dashboard' );

    and replace with:

    // Add widget to Dashboard
    if ( current_user_can( MANAGEMENT_PERMISSION ) ) {
    	function rsjp_dashboard_widget_function() {
    		include( 'includes/dashboard-widget.php' );
    	}
    
            function rsjp_dashboard() {
    	        wp_add_dashboard_widget( 'rsjp_dashboard_widget', __( 'RSJP - Recently Submitted Resumes' ), 'rsjp_dashboard_widget_function' );
            }
    	add_action( 'wp_dashboard_setup', 'rsjp_dashboard' );
    }

    Hope this helps!

  3. UaMV
    Member
    Posted 1 year ago #

    Thanks! Strangely, didn't get an email update about this post yet, and just this morning found another solution that will survive any plugin updates. Placed the following in my functions.php file ...

    // Remove Dashboard Widgets
    function remove_dashboard_widgets() {
      global $wp_meta_boxes;
      if ( !current_user_can( 'edit_dashboard' ) ) {
    	  unset($wp_meta_boxes['dashboard']['normal']['core']['rsjp_dashboard_widget']);
    	}
    }
    add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

    Thanks to this site: http://wp-snippets.com/disable-dashboard-widgets/

    Again, thank you for your response and your work on this plugin! It will be a very valuable tool for us.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic