WordPress.org

Ready to get started?Download WordPress

Forums

Adminimize
Certain usertypes do not save correctly. (2 posts)

  1. oasisfleeting
    Member
    Posted 7 months ago #

    I am having the same problem as John Sexton. I went in to add a new css id to adminimize and updated the options, and it will save options for everyone but two usertypes.

    Another quirk is that when you check on one header/usertype it will check all the boxes for that usertype as well as the other 2 usertypes that will not save.

    There are no javascript errors.

    Here is a screenshot of what it looks like before I update the options.
    https://docs.google.com/a/silvergear.com/file/d/0B66lbhbv74hEVXl5em1ka3dQelU/edit?usp=drivesdk

    Here is a screenshot of what it looks like after I update the options.
    https://docs.google.com/a/silvergear.com/file/d/0B66lbhbv74hEVTNOUkhZRFE1bFU/edit?usp=drivesdk

    Here is another screenshot showing my problem with javascript checking all boxes for the corrupt usernames
    https://docs.google.com/a/silvergear.com/file/d/0B66lbhbv74hEdWN2Y3ZJZG9xYUU/edit?usp=drivesdk

    I've dumped all the data from the wp_options table in regards to adminimize and tried to enter the settings again and nothing changes.

    MFSAM - I am not experiencing the same problem as you.

    WordPress 3.7.1

    http://wordpress.org/plugins/adminimize/

  2. oasisfleeting
    Member
    Posted 7 months ago #

    so, the problem is this...
    The data is being posted, I can see it in web dev tools. But when I check the $_POST variable in the plugin inside of _mw_adminimize_update()
    The data is not in that $_POST variable.

    In order to get the data into those user roles I had to add the following code to that function.

    // global_options, metaboxes update
    	foreach ( $user_roles as $role ) {
    
    		// global options
    		if ( isset( $_POST['mw_adminimize_disabled_global_option_' . $role . '_items'] ) ) {
    			$adminimizeoptions['mw_adminimize_disabled_global_option_' . $role . '_items']  = $_POST['mw_adminimize_disabled_global_option_' . $role . '_items'];
    
    		} else {
    			$adminimizeoptions['mw_adminimize_disabled_global_option_' . $role . '_items'] = array();
    		}
    
    //custom code is here
    		if($role == 'contributorhumanresources')
    			$adminimizeoptions['mw_adminimize_disabled_global_option_contributorhumanresources_items'] = $adminimizeoptions['mw_adminimize_disabled_global_option_contributor_items'];
    		if($role == 'contributorswedenationstation')
    			$adminimizeoptions['mw_adminimize_disabled_global_option_contributorswedenationstation_items'] = $adminimizeoptions['mw_adminimize_disabled_global_option_contributor_items'];

Reply

You must log in to post.

About this Plugin

About this Topic