Certain usertypes do not save correctly. (2 posts)

  1. oasisfleeting
    Posted 2 years 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.

    Here is a screenshot of what it looks like after I update the options.

    Here is another screenshot showing my problem with javascript checking all boxes for the corrupt usernames

    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


  2. oasisfleeting
    Posted 2 years 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'];

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Adminimize
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic