WordPress.org

Support

Support » Plugins and Hacks » Adminimize » Certain usertypes do not save correctly.

Certain usertypes do not save correctly.

Viewing 1 replies (of 1 total)
  • oasisfleeting

    @oasisfleeting

    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'];
Viewing 1 replies (of 1 total)
  • The topic ‘Certain usertypes do not save correctly.’ is closed to new replies.
Skip to toolbar