I do not see any reason to have the CSS files in hook_init...

Comments

aaron’s picture

 	// Add css for styled floats.
 	drupal_add_css(drupal_get_path('module', 'nrembrowser') .'/themes/css/nrembrowser.styles.css');
 	// Add css for "Add media" dialog popup's iframe.
 	drupal_add_css(drupal_get_path('module', 'nrembrowser') .'/themes/css/nrembrowser.widget.css'); 

The first is required because we can't add CSS dynamically with filtered content.

The second is only required on any forms with the WYSIWYG or fields, including, but not limited to, node edit forms. We could probably add that to whenever the widget is added, of course...