/* global registerGlobalBackward, DataProviderFacade */

registerGlobalBackward('1.4.14', function (control) {
    'use strict';

    if (DataProviderFacade.getCmsInfo().cmsName === 'Drupal') {
        var controls = Object.keys(control.controls);
        for (var i = 0; i < controls.length; i++) {
            if (control.controls[controls[i]].constructorName === 'PostIconCategory' ||
                control.controls[controls[i]].constructorName === 'PostIconEdit') {
                delete control.controls[controls[i]];
            }
        }
    }

    return control;
});